-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* ===================================================================================== | ||
* | ||
* Filename: stickman.cc | ||
* | ||
* Description: a stickman class | ||
* | ||
* Version: 1.0 | ||
* Created: 04.04.2017 14:21:19 | ||
* Revision: none | ||
* Compiler: gcc | ||
* | ||
* Author: Arvid Krein (mn), [email protected] | ||
* Company: - | ||
* | ||
* ===================================================================================== | ||
*/ | ||
|
||
#include "stickman.h" | ||
|
||
//Bodypart class functions | ||
Bodypart::Bodypart() | ||
{ | ||
kraftpartikel tempPart; | ||
for(std::vector<Beznode>::iterator i = mPath.mNodes.begin(); i < mPath.mNodes.end(); ++i) | ||
{ | ||
tempPart.setX(i->getX()); | ||
tempPart.setY(i->getY()); | ||
vJoints.push_back(tempPart); | ||
} | ||
} | ||
|
||
Bodypart::Bodypart(Bezpath bodyPath) | ||
{ | ||
mPath = bodyPath; | ||
kraftpartikel tempPart; | ||
for(std::vector<Beznode>::iterator i = mPath.mNodes.begin(); i < mPath.mNodes.end(); ++i) | ||
{ | ||
tempPart.setX(i->getX()); | ||
tempPart.setY(i->getY()); | ||
vJoints.push_back(tempPart); | ||
} | ||
|
||
} | ||
|
||
void Bodypart::iterate(float t) | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* ===================================================================================== | ||
* | ||
* Filename: stickman.h | ||
* | ||
* Description: stickman class | ||
* | ||
* Version: 1.0 | ||
* Created: 04.04.2017 14:21:37 | ||
* Revision: none | ||
* Compiler: gcc | ||
* | ||
* Author: Arvid Krein (mn), [email protected] | ||
* Company: - | ||
* | ||
* ===================================================================================== | ||
*/ | ||
#ifndef STICKMAN | ||
#define STICKMAN | ||
#include <vector> | ||
#include <cmath> | ||
#include "bezier.h" | ||
#include "physobj.h" | ||
|
||
class Bodypart | ||
{ | ||
public: | ||
Bodypart(); | ||
Bodypart(Bezpath bodyPath); | ||
Bezpath mPath; | ||
std::vector<kraftpartikel> vJoints; | ||
void iterate(float t); | ||
}; | ||
|
||
#endif |