50 #define FRAMEANIMATIONT_C
67 template<
class Po
intT>
69 skeleton_(_pose.skeleton_)
80 template<
class Po
intT>
97 template<
class Po
intT>
101 for(
unsigned int i = 0; i < _iNumFrames; ++i)
115 template<
class Po
intT>
118 skeleton_(_other.skeleton_)
120 for(
typename std::vector<Pose*>::const_iterator it = _other.
poses_.begin(); it != _other.
poses_.end(); ++it)
129 template<
class Po
intT>
132 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
142 template<
class Po
intT>
150 template<
class Po
intT>
153 assert(_iFrame < poses_.size());
155 return poses_[_iFrame];
160 template<
class Po
intT>
163 return poses_.size();
168 template<
class Po
intT>
172 while ( _frames < poses_.size() ){
179 while ( _frames > poses_.size() )
180 poses_.push_back(
new Pose(skeleton_));
186 template<
class Po
intT>
189 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
190 (*it)->insertJointAt(_index);
196 template<
class Po
intT>
199 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
200 (*it)->removeJointAt(_index);
212 template<
class Po
intT>
215 for(
typename std::vector<Pose*>::iterator it = poses_.begin(); it != poses_.end(); ++it)
216 (*it)->updateFromGlobal(_index);
virtual void updateFromGlobal(unsigned int _index)
Updates the local matrix using the global matrix.
void insertJointAt(unsigned int _index)
Called by the skeleton as a new joint is inserted.
virtual AnimationT< PointT > * copy()
Copy Function.
Pose * pose(const AnimationHandle &_hAni)
Returns a pointer to the pose with the given animation handle.
A general pose, used to store the frames of the animation.
FrameAnimationT(const PoseT< PointT > &_pose)
Constructor - Creates a new animation consisting of a single pose.
Pose * pose(unsigned int _iFrame)
Returns a pointer to the pose stored in the given frame.
std::vector< Pose * > poses_
Every entry in this vector is a frame of the animation.
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.
Stores a single animation.
virtual ~FrameAnimationT()
Destructor.
unsigned int frameCount()
Returns the number of frames stored in this pose.