Developer Documentation
|
Public Types | |
typedef PointT | Point |
typedef Point::value_type | Scalar |
typedef SkeletonT< PointT > | Skeleton |
typedef PoseT< PointT > | Pose |
![]() | |
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. More... | |
virtual AnimationT< PointT > * | copy () |
Copy Function. More... | |
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. More... | |
void | setFrameCount (unsigned int _frames) |
Set number of frames stored in this pose. More... | |
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... | |
![]() | |
AnimationT (std::string _name="") | |
virtual AnimationT * | copy ()=0 |
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. More... | |
std::vector< Pose * > | poses_ |
Every entry in this vector is a frame of the animation. More... | |
Friends | |
template<typename > | |
class | SkeletonT |
Additional Inherited Members | |
![]() | |
std::string | name_ |
int | fps_ |
Definition at line 47 of file FrameAnimationT.hh.
typedef PointT FrameAnimationT< PointT >::Point |
Definition at line 53 of file FrameAnimationT.hh.
typedef PoseT<PointT> FrameAnimationT< PointT >::Pose |
Definition at line 56 of file FrameAnimationT.hh.
typedef Point::value_type FrameAnimationT< PointT >::Scalar |
Definition at line 54 of file FrameAnimationT.hh.
typedef SkeletonT<PointT> FrameAnimationT< PointT >::Skeleton |
Definition at line 55 of file FrameAnimationT.hh.
|
explicit |
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 62 of file FrameAnimationT_impl.hh.
|
explicit |
Constructor - Creates a new empty animation.
_skeleton | The skeleton that will hold this animation |
Definition at line 75 of file FrameAnimationT_impl.hh.
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 92 of file FrameAnimationT_impl.hh.
|
explicit |
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 110 of file FrameAnimationT_impl.hh.
|
virtual |
Destructor.
Definition at line 124 of file FrameAnimationT_impl.hh.
|
virtual |
Copy Function.
Implements AnimationT< PointT >.
Definition at line 137 of file FrameAnimationT_impl.hh.
|
inlinevirtual |
Returns the number of frames stored in this pose.
Implements AnimationT< PointT >.
Definition at line 155 of file FrameAnimationT_impl.hh.
|
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 181 of file FrameAnimationT_impl.hh.
|
inlinevirtual |
Returns a pointer to the pose stored in the given frame.
_iFrame | The poses frame number |
Implements AnimationT< PointT >.
Definition at line 145 of file FrameAnimationT_impl.hh.
|
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 191 of file FrameAnimationT_impl.hh.
void FrameAnimationT< PointT >::setFrameCount | ( | unsigned int | _frames | ) |
Set number of frames stored in this pose.
Definition at line 163 of file FrameAnimationT_impl.hh.
|
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 207 of file FrameAnimationT_impl.hh.
Definition at line 50 of file FrameAnimationT.hh.
|
private |
Every entry in this vector is a frame of the animation.
Definition at line 124 of file FrameAnimationT.hh.
|
private |
Pointer to associated skeleton.
Definition at line 122 of file FrameAnimationT.hh.