sotsuron

Fork of linearMirrorMotion1017 by Hiromasa Oku

Committer:
hiromasaoku
Date:
Fri May 24 06:37:58 2013 +0000
Revision:
19:8e9fe7d25b9c
Parent:
18:6f86abfae754
Child:
20:8475768fc2f7
moves almost successfully  \(^u^)/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hiromasaoku 16:6dd2e60bc5bc 1 #include "mbed.h"
hiromasaoku 16:6dd2e60bc5bc 2 #include <vector>
hiromasaoku 19:8e9fe7d25b9c 3 #define PI 3.14159
hiromasaoku 16:6dd2e60bc5bc 4
hiromasaoku 19:8e9fe7d25b9c 5 #define RENDER_INTERVAL 1000// in microseconds
hiromasaoku 17:dce982e0a383 6
hiromasaoku 16:6dd2e60bc5bc 7 struct point2dl {
hiromasaoku 16:6dd2e60bc5bc 8 int x,y;
hiromasaoku 16:6dd2e60bc5bc 9 int laserSwitch; // laser {1: on 0:off} until next step
hiromasaoku 16:6dd2e60bc5bc 10 };
hiromasaoku 16:6dd2e60bc5bc 11
hiromasaoku 16:6dd2e60bc5bc 12 struct letter {
hiromasaoku 16:6dd2e60bc5bc 13 int pointnum;
hiromasaoku 16:6dd2e60bc5bc 14 vector<point2dl> letpoints;
hiromasaoku 16:6dd2e60bc5bc 15 };
hiromasaoku 16:6dd2e60bc5bc 16
hiromasaoku 16:6dd2e60bc5bc 17 class render{
hiromasaoku 16:6dd2e60bc5bc 18 public:
hiromasaoku 16:6dd2e60bc5bc 19 void startRender();
hiromasaoku 16:6dd2e60bc5bc 20 void setRender(vector<letter> *p);
hiromasaoku 16:6dd2e60bc5bc 21 void translating(float speed, float angle);
hiromasaoku 16:6dd2e60bc5bc 22 void stopRender();
hiromasaoku 16:6dd2e60bc5bc 23 void draw();
hiromasaoku 18:6f86abfae754 24 void transform(point2dl& mypoint);
hiromasaoku 18:6f86abfae754 25 void shearing(point2dl& dataBefore);
hiromasaoku 18:6f86abfae754 26 void rotation(point2dl& dataBefore);
hiromasaoku 18:6f86abfae754 27 void updateSpeed(float vx, float vy);
hiromasaoku 18:6f86abfae754 28
hiromasaoku 16:6dd2e60bc5bc 29 private:
hiromasaoku 16:6dd2e60bc5bc 30 vector<letter> *ptext;
hiromasaoku 16:6dd2e60bc5bc 31 vector<letter> translated;
hiromasaoku 16:6dd2e60bc5bc 32 int currentLetters;
hiromasaoku 16:6dd2e60bc5bc 33 int currentPoints;
hiromasaoku 16:6dd2e60bc5bc 34 point2dl drawPoint;
hiromasaoku 17:dce982e0a383 35
hiromasaoku 17:dce982e0a383 36 Ticker renderTimer;
hiromasaoku 18:6f86abfae754 37
hiromasaoku 18:6f86abfae754 38 float speed;
hiromasaoku 18:6f86abfae754 39 float angle;
hiromasaoku 16:6dd2e60bc5bc 40 };