Skip to content

Commit

Permalink
added stickman class source files
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsetg committed Apr 5, 2017
1 parent 7e504f3 commit 047fec4
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
49 changes: 49 additions & 0 deletions stickman.cc
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)
{

}
35 changes: 35 additions & 0 deletions stickman.h
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

0 comments on commit 047fec4

Please sign in to comment.