sotsuron

Fork of linearMirrorMotion1017 by Hiromasa Oku

Committer:
takapiasano
Date:
Fri Jun 28 02:30:51 2013 +0000
Revision:
22:e86d63dfbbe1
Parent:
21:4095a071724d
Child:
24:ab74d2018e6c
horizontal demo

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
takapiasano 21:4095a071724d 5 #define RENDER_INTERVAL 7000// 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);
takapiasano 22:e86d63dfbbe1 27 void updateSpeed(float gspeed, float gangle, float vvx, float vvy);
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;
takapiasano 22:e86d63dfbbe1 43 float vx;
takapiasano 22:e86d63dfbbe1 44 float vy;
takapiasano 22:e86d63dfbbe1 45 int radious;
hiromasaoku 20:8475768fc2f7 46
hiromasaoku 16:6dd2e60bc5bc 47 };