Alvaro Cassinelli
/
skinGames_forktest
just a test
Fork of scoreLight_Advanced by
classRigidScafold.h@0:345b3bc7a0ea, 2012-03-28 (annotated)
- Committer:
- mbedalvaro
- Date:
- Wed Mar 28 14:40:01 2012 +0000
- Revision:
- 0:345b3bc7a0ea
- Child:
- 4:f9d364f10335
This version (using rigid frame, base and child classes, etc) works, but the blob is strangely smaller. Need to check this.
Who changed what in which revision?
User | Revision | Line number | New 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 | 0:345b3bc7a0ea | 16 | void buildCircularScafold(float _radius, vector2D _pos,vector2D _vel, int _numScafoldPoints); |
mbedalvaro | 0:345b3bc7a0ea | 17 | // Other functions to create letters, text, etc. |
mbedalvaro | 0:345b3bc7a0ea | 18 | // ... |
mbedalvaro | 0:345b3bc7a0ea | 19 | |
mbedalvaro | 0:345b3bc7a0ea | 20 | // DATA structures: |
mbedalvaro | 0:345b3bc7a0ea | 21 | // note: the number of points in the scafold does not need to equate the number of points in the blob |
mbedalvaro | 0:345b3bc7a0ea | 22 | vector<vector2D> scafold; // scafold trajectory (centered around the centerScafold point). Can be used to initialize elastic loop. |
mbedalvaro | 0:345b3bc7a0ea | 23 | vector2D center; // the center of the scafold can be used to set the INITIAL position of the loop |
mbedalvaro | 0:345b3bc7a0ea | 24 | vector2D speed; // again, this may be used to set the initial speed of the loop |
mbedalvaro | 0:345b3bc7a0ea | 25 | float radius; |
mbedalvaro | 0:345b3bc7a0ea | 26 | }; |
mbedalvaro | 0:345b3bc7a0ea | 27 | |
mbedalvaro | 0:345b3bc7a0ea | 28 | #endif |