Takashi Asano
/
linearMirrorMotion1017
sotsuron
Fork of linearMirrorMotion1017 by
renderclass.h
- Committer:
- hiromasaoku
- Date:
- 2013-05-31
- Revision:
- 20:8475768fc2f7
- Parent:
- 19:8e9fe7d25b9c
- Child:
- 21:4095a071724d
- Child:
- 29:aa8fe9fccec8
File content as of revision 20:8475768fc2f7:
#include "mbed.h" #include <vector> #define PI 3.14159 #define RENDER_INTERVAL 700// 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 vx, float vy); int shearingSwitch; private: vector<letter> *ptext; vector<letter> translated; int currentLetters; int currentPoints; point2dl drawPoint; Ticker renderTimer; Timer speedTimer; float speed; float angle; };