44#define FRAMEANIMATIONT_C
63 skeleton_(_pose.skeleton_)
95 for(
unsigned int i = 0; i < _iNumFrames; ++i)
109template<
class Po
intT>
112 skeleton_(_other.skeleton_)
114 for(
typename std::vector<Pose*>::const_iterator it = _other.
poses_.begin(); it != _other.
poses_.end(); ++it)
123template<
class Po
intT>
126 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
136template<
class Po
intT>
144template<
class Po
intT>
147 assert(_iFrame < poses_.size());
149 return poses_[_iFrame];
154template<
class Po
intT>
157 return poses_.size();
162template<
class Po
intT>
166 while ( _frames < poses_.size() ){
167 Pose* pose = poses_.back();
173 while ( _frames > poses_.size() )
174 poses_.push_back(
new Pose(skeleton_));
180template<
class Po
intT>
183 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
184 (*it)->insertJointAt(_index);
190template<
class Po
intT>
193 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
194 (*it)->removeJointAt(_index);
206template<
class Po
intT>
209 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
210 (*it)->updateFromGlobal(_index);
Stores a single animation.
virtual ~FrameAnimationT()
Destructor.
std::vector< Pose * > poses_
Every entry in this vector is a frame of the animation.
virtual void updateFromGlobal(unsigned int _index)
Updates the local matrix using the global matrix.
void removeJointAt(unsigned int _index)
Called by the skeleton as a joint is deleted.
void setFrameCount(unsigned int _frames)
Set number of frames stored in this pose.
unsigned int frameCount()
Returns the number of frames stored in this pose.
FrameAnimationT(const PoseT< PointT > &_pose)
Constructor - Creates a new animation consisting of a single pose.
void insertJointAt(unsigned int _index)
Called by the skeleton as a new joint is inserted.
virtual AnimationT< PointT > * copy()
Copy Function.
Pose * pose(unsigned int _iFrame)
Returns a pointer to the pose stored in the given frame.
A general pose, used to store the frames of the animation.