Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of linearMirrorMotion by
renderclass.h@17:dce982e0a383, 2013-05-20 (annotated)
- Committer:
- hiromasaoku
- Date:
- Mon May 20 08:51:07 2013 +0000
- Revision:
- 17:dce982e0a383
- Parent:
- 16:6dd2e60bc5bc
- Child:
- 18:6f86abfae754
error vanished!!
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| hiromasaoku | 16:6dd2e60bc5bc | 1 | #include "mbed.h" |
| hiromasaoku | 16:6dd2e60bc5bc | 2 | #include <vector> |
| hiromasaoku | 16:6dd2e60bc5bc | 3 | |
| hiromasaoku | 17:dce982e0a383 | 4 | #define RENDER_INTERVAL 200 // in microseconds |
| hiromasaoku | 17:dce982e0a383 | 5 | |
| hiromasaoku | 16:6dd2e60bc5bc | 6 | struct point2dl { |
| hiromasaoku | 16:6dd2e60bc5bc | 7 | int x,y; |
| hiromasaoku | 16:6dd2e60bc5bc | 8 | int laserSwitch; // laser {1: on 0:off} until next step |
| hiromasaoku | 16:6dd2e60bc5bc | 9 | }; |
| hiromasaoku | 16:6dd2e60bc5bc | 10 | |
| hiromasaoku | 16:6dd2e60bc5bc | 11 | struct letter { |
| hiromasaoku | 16:6dd2e60bc5bc | 12 | int pointnum; |
| hiromasaoku | 16:6dd2e60bc5bc | 13 | vector<point2dl> letpoints; |
| hiromasaoku | 16:6dd2e60bc5bc | 14 | }; |
| hiromasaoku | 16:6dd2e60bc5bc | 15 | |
| hiromasaoku | 16:6dd2e60bc5bc | 16 | class render{ |
| hiromasaoku | 16:6dd2e60bc5bc | 17 | public: |
| hiromasaoku | 16:6dd2e60bc5bc | 18 | void startRender(); |
| hiromasaoku | 16:6dd2e60bc5bc | 19 | void setRender(vector<letter> *p); |
| hiromasaoku | 16:6dd2e60bc5bc | 20 | void translating(float speed, float angle); |
| hiromasaoku | 16:6dd2e60bc5bc | 21 | void stopRender(); |
| hiromasaoku | 16:6dd2e60bc5bc | 22 | void draw(); |
| hiromasaoku | 16:6dd2e60bc5bc | 23 | private: |
| hiromasaoku | 16:6dd2e60bc5bc | 24 | vector<letter> *ptext; |
| hiromasaoku | 16:6dd2e60bc5bc | 25 | vector<letter> translated; |
| hiromasaoku | 16:6dd2e60bc5bc | 26 | int currentLetters; |
| hiromasaoku | 16:6dd2e60bc5bc | 27 | int currentPoints; |
| hiromasaoku | 16:6dd2e60bc5bc | 28 | point2dl drawPoint; |
| hiromasaoku | 17:dce982e0a383 | 29 | |
| hiromasaoku | 17:dce982e0a383 | 30 | Ticker renderTimer; |
| hiromasaoku | 16:6dd2e60bc5bc | 31 | }; |
