Alvaro Cassinelli
/
skinGames_II
save loops
classRigidScafold.h@0:df6fdd9b99f0, 2014-12-02 (annotated)
- Committer:
- mbedalvaro
- Date:
- Tue Dec 02 04:39:15 2014 +0000
- Revision:
- 0:df6fdd9b99f0
this new version of skinGames will have a function that stops scanning as the laser reaches the same position (i.e., loops) with a certain precision. It is for extracting contours for Takashita project. It can then save on a file or send on osc
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedalvaro | 0:df6fdd9b99f0 | 1 | #ifndef RIGIDSCAFOLD_H |
mbedalvaro | 0:df6fdd9b99f0 | 2 | #define RIGIDSCAFOLD_H |
mbedalvaro | 0:df6fdd9b99f0 | 3 | |
mbedalvaro | 0:df6fdd9b99f0 | 4 | #include "myVectorClass.h" |
mbedalvaro | 0:df6fdd9b99f0 | 5 | |
mbedalvaro | 0:df6fdd9b99f0 | 6 | #include <vector> |
mbedalvaro | 0:df6fdd9b99f0 | 7 | using namespace std; |
mbedalvaro | 0:df6fdd9b99f0 | 8 | |
mbedalvaro | 0:df6fdd9b99f0 | 9 | class RigidScafold { |
mbedalvaro | 0:df6fdd9b99f0 | 10 | public: |
mbedalvaro | 0:df6fdd9b99f0 | 11 | RigidScafold(); |
mbedalvaro | 0:df6fdd9b99f0 | 12 | ~RigidScafold(); |
mbedalvaro | 0:df6fdd9b99f0 | 13 | |
mbedalvaro | 0:df6fdd9b99f0 | 14 | // (1) METHODS for creating different SCAFOLD structures |
mbedalvaro | 0:df6fdd9b99f0 | 15 | // Note: these scafolds may or may not be used to initialize the light loop (in case of elasticLoop). |
mbedalvaro | 0:df6fdd9b99f0 | 16 | void buildCircularScafold(float _radius, vector2Dd _pos, int _numScafoldPoints); |
mbedalvaro | 0:df6fdd9b99f0 | 17 | void buildLine(float _length, float _angleDeg, vector2Dd _pos, int _numScafoldPoints); |
mbedalvaro | 0:df6fdd9b99f0 | 18 | // void buildStarScafold.... |
mbedalvaro | 0:df6fdd9b99f0 | 19 | |
mbedalvaro | 0:df6fdd9b99f0 | 20 | // Other functions to create letters, text, etc. |
mbedalvaro | 0:df6fdd9b99f0 | 21 | // ... |
mbedalvaro | 0:df6fdd9b99f0 | 22 | |
mbedalvaro | 0:df6fdd9b99f0 | 23 | // Transformations of the scafold (resize, shear, rotation...): |
mbedalvaro | 0:df6fdd9b99f0 | 24 | void resizeDimensionScafold(float _newSize); |
mbedalvaro | 0:df6fdd9b99f0 | 25 | void resizeFactorDimensionScafold(float _factor); |
mbedalvaro | 0:df6fdd9b99f0 | 26 | void rotateScafold(float alphadeg); |
mbedalvaro | 0:df6fdd9b99f0 | 27 | |
mbedalvaro | 0:df6fdd9b99f0 | 28 | |
mbedalvaro | 0:df6fdd9b99f0 | 29 | // DATA structures: |
mbedalvaro | 0:df6fdd9b99f0 | 30 | // note: the number of points in the scafold does not need to equate the number of points in the blob |
mbedalvaro | 0:df6fdd9b99f0 | 31 | vector<vector2Dd> scafold; // scafold trajectory (either float or unsigned short). |
mbedalvaro | 0:df6fdd9b99f0 | 32 | vector2Dd centerScafold; |
mbedalvaro | 0:df6fdd9b99f0 | 33 | float sizeScafold; |
mbedalvaro | 0:df6fdd9b99f0 | 34 | // Notes: - Centered around the centerScafold point. |
mbedalvaro | 0:df6fdd9b99f0 | 35 | // - Can be used to initialize elastic loop. |
mbedalvaro | 0:df6fdd9b99f0 | 36 | }; |
mbedalvaro | 0:df6fdd9b99f0 | 37 | |
mbedalvaro | 0:df6fdd9b99f0 | 38 | #endif |