File tree Expand file tree Collapse file tree 2 files changed +84
-0
lines changed Expand file tree Collapse file tree 2 files changed +84
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * =====================================================================================
3
+ *
4
+ * Filename: stickman.cc
5
+ *
6
+ * Description: a stickman class
7
+ *
8
+ * Version: 1.0
9
+ * Created: 04.04.2017 14:21:19
10
+ * Revision: none
11
+ * Compiler: gcc
12
+ *
13
+ * Author: Arvid Krein (mn), [email protected]
14
+ * Company: -
15
+ *
16
+ * =====================================================================================
17
+ */
18
+
19
+ #include " stickman.h"
20
+
21
+ // Bodypart class functions
22
+ Bodypart::Bodypart ()
23
+ {
24
+ kraftpartikel tempPart;
25
+ for (std::vector<Beznode>::iterator i = mPath .mNodes .begin (); i < mPath .mNodes .end (); ++i)
26
+ {
27
+ tempPart.setX (i->getX ());
28
+ tempPart.setY (i->getY ());
29
+ vJoints.push_back (tempPart);
30
+ }
31
+ }
32
+
33
+ Bodypart::Bodypart (Bezpath bodyPath)
34
+ {
35
+ mPath = bodyPath;
36
+ kraftpartikel tempPart;
37
+ for (std::vector<Beznode>::iterator i = mPath .mNodes .begin (); i < mPath .mNodes .end (); ++i)
38
+ {
39
+ tempPart.setX (i->getX ());
40
+ tempPart.setY (i->getY ());
41
+ vJoints.push_back (tempPart);
42
+ }
43
+
44
+ }
45
+
46
+ void Bodypart::iterate (float t)
47
+ {
48
+
49
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * =====================================================================================
3
+ *
4
+ * Filename: stickman.h
5
+ *
6
+ * Description: stickman class
7
+ *
8
+ * Version: 1.0
9
+ * Created: 04.04.2017 14:21:37
10
+ * Revision: none
11
+ * Compiler: gcc
12
+ *
13
+ * Author: Arvid Krein (mn), [email protected]
14
+ * Company: -
15
+ *
16
+ * =====================================================================================
17
+ */
18
+ #ifndef STICKMAN
19
+ #define STICKMAN
20
+ #include < vector>
21
+ #include < cmath>
22
+ #include " bezier.h"
23
+ #include " physobj.h"
24
+
25
+ class Bodypart
26
+ {
27
+ public:
28
+ Bodypart ();
29
+ Bodypart (Bezpath bodyPath);
30
+ Bezpath mPath ;
31
+ std::vector<kraftpartikel> vJoints;
32
+ void iterate(float t);
33
+ };
34
+
35
+ #endif
You can’t perform that action at this time.
0 commit comments