Developer Documentation
|
Public Types | |
typedef PointT | Point |
typedef Point::value_type | Scalar |
typedef SkeletonT< PointT > | Skeleton |
typedef PoseT< PointT > | Pose |
Public Types inherited from AnimationT< PointT > | |
typedef PointT | Point |
typedef Point::value_type | Scalar |
typedef PoseT< PointT > | Pose |
Public Member Functions | |
FrameAnimationT (const PoseT< PointT > &_pose) | |
Constructor - Creates a new animation consisting of a single pose. More... | |
FrameAnimationT (Skeleton *_skeleton) | |
Constructor - Creates a new empty animation. More... | |
FrameAnimationT (Skeleton *_skeleton, unsigned int _iNumFrames) | |
Constructor - Creates a new animation with the given number of frames. More... | |
FrameAnimationT (const FrameAnimationT< PointT > &_other) | |
Copy constructor. More... | |
virtual | ~FrameAnimationT () |
Destructor. | |
virtual AnimationT< PointT > * | copy () |
Copy Function. | |
virtual void | updateFromGlobal (unsigned int _index) |
Updates the local matrix using the global matrix. More... | |
Frame access | |
There is one pose per frame. | |
Pose * | pose (unsigned int _iFrame) |
Returns a pointer to the pose stored in the given frame. More... | |
unsigned int | frameCount () |
Returns the number of frames stored in this pose. | |
void | setFrameCount (unsigned int _frames) |
Set number of frames stored in this pose. | |
Synchronization | |
Use these methods to keep the poses in sync with the number (and indices) of the joints. | |
void | insertJointAt (unsigned int _index) |
Called by the skeleton as a new joint is inserted. More... | |
void | removeJointAt (unsigned int _index) |
Called by the skeleton as a joint is deleted. More... | |
Public Member Functions inherited from AnimationT< PointT > | |
AnimationT (std::string _name="") | |
virtual void | clearPoseCache () |
std::string | name () |
void | setName (std::string _name) |
int | fps () |
void | setFps (int _fps) |
Private Attributes | |
Skeleton * | skeleton_ |
Pointer to associated skeleton. | |
std::vector< Pose * > | poses_ |
Every entry in this vector is a frame of the animation. | |
Friends | |
template<typename > | |
class | SkeletonT |
Additional Inherited Members | |
Protected Attributes inherited from AnimationT< PointT > | |
std::string | name_ |
int | fps_ |
Definition at line 56 of file FrameAnimationT.hh.
FrameAnimationT< PointT >::FrameAnimationT | ( | const PoseT< PointT > & | _pose | ) |
Constructor - Creates a new animation consisting of a single pose.
The animation will hold a single frame, made up by a copy of the given pose. After this call returns the pose given by _pose is no longer needed and independent from this instance.
You can use this operation to clone the reference pose as new instance, then modify the pose.
_pose | This pose will make up the only frame in this new animation |
Definition at line 68 of file FrameAnimationT.cc.
FrameAnimationT< PointT >::FrameAnimationT | ( | Skeleton * | _skeleton | ) |
Constructor - Creates a new empty animation.
_skeleton | The skeleton that will hold this animation |
Definition at line 81 of file FrameAnimationT.cc.
FrameAnimationT< PointT >::FrameAnimationT | ( | Skeleton * | _skeleton, |
unsigned int | _iNumFrames | ||
) |
Constructor - Creates a new animation with the given number of frames.
The poses in the given number of frames will all hold identity matrices for all joints. Make sure you write data to the poses before you use it.
_skeleton | The skeleton that will hold this animation |
_iNumFrames | The number of frames for this animation |
Definition at line 98 of file FrameAnimationT.cc.
FrameAnimationT< PointT >::FrameAnimationT | ( | const FrameAnimationT< PointT > & | _other | ) |
Copy constructor.
This animation will copy all frames from the given animation. After the call returns they are completely independent.
_other | The animation to copy from |
Definition at line 116 of file FrameAnimationT.cc.
|
virtual |
Called by the skeleton as a new joint is inserted.
The call is dispatched to all poses stored in this animation. See BasePoseT<>::insert_at for more information.
_index | The new joint is inserted at this position. Insert new joints at the end by passing SkeletonT<>::jointCount as parameter. |
Implements AnimationT< PointT >.
Definition at line 187 of file FrameAnimationT.cc.
|
inlinevirtual |
Returns a pointer to the pose stored in the given frame.
_iFrame | The poses frame number |
Implements AnimationT< PointT >.
Definition at line 151 of file FrameAnimationT.cc.
|
virtual |
Called by the skeleton as a joint is deleted.
The call is dispatched to all poses stored in this animation. See BasePoseT<>::remove_at for more information.
_index | The index of the joint that is being deleted. |
Implements AnimationT< PointT >.
Definition at line 197 of file FrameAnimationT.cc.
|
virtual |
Updates the local matrix using the global matrix.
Called when a joints parent is changed.
_index | The joints index |
Implements AnimationT< PointT >.
Definition at line 213 of file FrameAnimationT.cc.