Alvaro Cassinelli / Mbed 2 deprecated skinGames_forktest

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

Committer:
mbedalvaro
Date:
Thu Apr 12 08:38:44 2012 +0000
Revision:
12:0de9cd2bced5
Parent:
7:0df17f3078bc
Child:
22:d87317d7ca91
1) template class vector works fine. This way, I have more memory (by defining a rigid scafold using unsigned shorts). I can now make an elastic blob of at least 50 points. ; ; To do: double buffering (this will again take memory, but it may be ok becaus...

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedalvaro 0:345b3bc7a0ea 1 #ifndef RIGIDSCAFOLD_H
mbedalvaro 0:345b3bc7a0ea 2 #define RIGIDSCAFOLD_H
mbedalvaro 0:345b3bc7a0ea 3
mbedalvaro 0:345b3bc7a0ea 4 #include "myVectorClass.h"
mbedalvaro 0:345b3bc7a0ea 5
mbedalvaro 0:345b3bc7a0ea 6 #include <vector>
mbedalvaro 0:345b3bc7a0ea 7 using namespace std;
mbedalvaro 0:345b3bc7a0ea 8
mbedalvaro 0:345b3bc7a0ea 9 class RigidScafold {
mbedalvaro 0:345b3bc7a0ea 10 public:
mbedalvaro 0:345b3bc7a0ea 11 RigidScafold();
mbedalvaro 0:345b3bc7a0ea 12 ~RigidScafold();
mbedalvaro 0:345b3bc7a0ea 13
mbedalvaro 0:345b3bc7a0ea 14 // (1) METHODS for creating different SCAFOLD structures
mbedalvaro 0:345b3bc7a0ea 15 // Note: these scafolds may or may not be used to initialize the light loop (in case of elasticLoop).
mbedalvaro 12:0de9cd2bced5 16 void buildCircularScafold(float _radius, vector2Dd _pos, int _numScafoldPoints);
mbedalvaro 12:0de9cd2bced5 17 void buildLine(float _length, float _angleDeg, vector2Dd _pos, int _numScafoldPoints);
mbedalvaro 7:0df17f3078bc 18
mbedalvaro 0:345b3bc7a0ea 19 // Other functions to create letters, text, etc.
mbedalvaro 0:345b3bc7a0ea 20 // ...
mbedalvaro 0:345b3bc7a0ea 21
mbedalvaro 0:345b3bc7a0ea 22 // DATA structures:
mbedalvaro 0:345b3bc7a0ea 23 // note: the number of points in the scafold does not need to equate the number of points in the blob
mbedalvaro 12:0de9cd2bced5 24 vector<vector2Dd> scafold; // scafold trajectory (either float or unsigned short).
mbedalvaro 12:0de9cd2bced5 25 // Notes: - Centered around the centerScafold point.
mbedalvaro 12:0de9cd2bced5 26 // - Can be used to initialize elastic loop.
mbedalvaro 0:345b3bc7a0ea 27 };
mbedalvaro 0:345b3bc7a0ea 28
mbedalvaro 0:345b3bc7a0ea 29 #endif