#pragma once
#include <vector>
using namespace std;
#include "TimedRotation.h"
typedef vector<TimedRotation>::const_iterator TRIT;
class AnimationNode
{
public:
AnimationNode(tstring name);
virtual ~AnimationNode(void);
void AddTransformAt(int time, Float4 rotation,Float3 pivot);
/**
* The start of the rotations.
*/
TRIT TransformBegin(){return m_Rotations.begin();}
/**
* The end of the rotations.
*/
TRIT TransformEnd(){return m_Rotations.end();}
private:
tstring m_Name;
vector<TimedRotation> m_Rotations;
};
void AnimationNode::AddTransformAt(int time, Float4 rotation,Float3 pivot)
{
TimedRotation tr(time,rotation,pivot,Float3(1,1,1));
m_Rotations.push_back(tr); // <-- ERROR HERE
std::sort(m_Rotations.begin(),m_Rotations.end(),TimedRotationSorter());
}
|