sotsuron

Fork of linearMirrorMotion1017 by Hiromasa Oku

Committer:
hiromasaoku
Date:
Mon May 20 09:31:29 2013 +0000
Revision:
18:6f86abfae754
Parent:
17:dce982e0a383
Child:
19:8e9fe7d25b9c
Cleanup done!!!!!!!!!!!

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 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 18:6f86abfae754 23 void transform(point2dl& mypoint);
hiromasaoku 18:6f86abfae754 24 void shearing(point2dl& dataBefore);
hiromasaoku 18:6f86abfae754 25 void rotation(point2dl& dataBefore);
hiromasaoku 18:6f86abfae754 26 void updateSpeed(float vx, float vy);
hiromasaoku 18:6f86abfae754 27
hiromasaoku 16:6dd2e60bc5bc 28 private:
hiromasaoku 16:6dd2e60bc5bc 29 vector<letter> *ptext;
hiromasaoku 16:6dd2e60bc5bc 30 vector<letter> translated;
hiromasaoku 16:6dd2e60bc5bc 31 int currentLetters;
hiromasaoku 16:6dd2e60bc5bc 32 int currentPoints;
hiromasaoku 16:6dd2e60bc5bc 33 point2dl drawPoint;
hiromasaoku 17:dce982e0a383 34
hiromasaoku 17:dce982e0a383 35 Ticker renderTimer;
hiromasaoku 18:6f86abfae754 36
hiromasaoku 18:6f86abfae754 37 float speed;
hiromasaoku 18:6f86abfae754 38 float angle;
hiromasaoku 16:6dd2e60bc5bc 39 };