sotsuron

Fork of linearMirrorMotion1017 by Hiromasa Oku

Committer:
hiromasaoku
Date:
Fri May 31 06:32:07 2013 +0000
Revision:
20:8475768fc2f7
Parent:
19:8e9fe7d25b9c
Child:
21:4095a071724d
Child:
29:aa8fe9fccec8
for sharing

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 20:8475768fc2f7 5 #define RENDER_INTERVAL 700// 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 20:8475768fc2f7 28
hiromasaoku 20:8475768fc2f7 29 int shearingSwitch;
hiromasaoku 18:6f86abfae754 30
hiromasaoku 16:6dd2e60bc5bc 31 private:
hiromasaoku 16:6dd2e60bc5bc 32 vector<letter> *ptext;
hiromasaoku 16:6dd2e60bc5bc 33 vector<letter> translated;
hiromasaoku 16:6dd2e60bc5bc 34 int currentLetters;
hiromasaoku 16:6dd2e60bc5bc 35 int currentPoints;
hiromasaoku 16:6dd2e60bc5bc 36 point2dl drawPoint;
hiromasaoku 17:dce982e0a383 37
hiromasaoku 17:dce982e0a383 38 Ticker renderTimer;
hiromasaoku 20:8475768fc2f7 39 Timer speedTimer;
hiromasaoku 18:6f86abfae754 40
hiromasaoku 18:6f86abfae754 41 float speed;
hiromasaoku 18:6f86abfae754 42 float angle;
hiromasaoku 20:8475768fc2f7 43
hiromasaoku 16:6dd2e60bc5bc 44 };