Takashi Asano
/
linearMirrorMotion1017
sotsuron
Fork of linearMirrorMotion1017 by
renderclass.h
- Committer:
- takapiasano
- Date:
- 2013-06-28
- Revision:
- 22:e86d63dfbbe1
- Parent:
- 21:4095a071724d
- Child:
- 24:ab74d2018e6c
File content as of revision 22:e86d63dfbbe1:
#include "mbed.h" #include <vector> #define PI 3.14159 #define RENDER_INTERVAL 7000// in microseconds struct point2dl { int x,y; int laserSwitch; // laser {1: on 0:off} until next step }; struct letter { int pointnum; vector<point2dl> letpoints; }; class render{ public: void startRender(); void setRender(vector<letter> *p); void translating(float speed, float angle); void stopRender(); void draw(); void transform(point2dl& mypoint); void shearing(point2dl& dataBefore); void rotation(point2dl& dataBefore); void updateSpeed(float gspeed, float gangle, float vvx, float vvy); int shearingSwitch; private: vector<letter> *ptext; vector<letter> translated; int currentLetters; int currentPoints; point2dl drawPoint; Ticker renderTimer; Timer speedTimer; float speed; float angle; float vx; float vy; int radious; };