Developer Documentation
FrameAnimationT< PointT > Class Template Reference
Inheritance diagram for FrameAnimationT< PointT >:
AnimationT< PointT >

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. 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.

Posepose (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...
 
- Public Member Functions inherited from AnimationT< PointT >
 AnimationT (std::string _name="")
 
virtual AnimationTcopy ()=0
 
virtual void clearPoseCache ()
 
std::string name ()
 
void setName (std::string _name)
 
int fps ()
 
void setFps (int _fps)
 

Private Attributes

Skeletonskeleton_
 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

- Protected Attributes inherited from AnimationT< PointT >
std::string name_
 
int fps_
 

Detailed Description

template<class PointT>
class FrameAnimationT< PointT >

Definition at line 47 of file FrameAnimationT.hh.

Member Typedef Documentation

◆ Point

template<class PointT >
typedef PointT FrameAnimationT< PointT >::Point

Definition at line 53 of file FrameAnimationT.hh.

◆ Pose

template<class PointT >
typedef PoseT<PointT> FrameAnimationT< PointT >::Pose

Definition at line 56 of file FrameAnimationT.hh.

◆ Scalar

template<class PointT >
typedef Point::value_type FrameAnimationT< PointT >::Scalar

Definition at line 54 of file FrameAnimationT.hh.

◆ Skeleton

template<class PointT >
typedef SkeletonT<PointT> FrameAnimationT< PointT >::Skeleton

Definition at line 55 of file FrameAnimationT.hh.

Constructor & Destructor Documentation

◆ FrameAnimationT() [1/4]

template<class PointT >
FrameAnimationT< PointT >::FrameAnimationT ( const PoseT< PointT > &  _pose)
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.

Parameters
_poseThis pose will make up the only frame in this new animation

Definition at line 62 of file FrameAnimationT_impl.hh.

◆ FrameAnimationT() [2/4]

template<class PointT >
FrameAnimationT< PointT >::FrameAnimationT ( Skeleton _skeleton)
explicit

Constructor - Creates a new empty animation.

Parameters
_skeletonThe skeleton that will hold this animation

Definition at line 75 of file FrameAnimationT_impl.hh.

◆ FrameAnimationT() [3/4]

template<class PointT >
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.

Parameters
_skeletonThe skeleton that will hold this animation
_iNumFramesThe number of frames for this animation

Definition at line 92 of file FrameAnimationT_impl.hh.

◆ FrameAnimationT() [4/4]

template<class PointT >
FrameAnimationT< PointT >::FrameAnimationT ( const FrameAnimationT< PointT > &  _other)
explicit

Copy constructor.

This animation will copy all frames from the given animation. After the call returns they are completely independent.

Parameters
_otherThe animation to copy from

Definition at line 110 of file FrameAnimationT_impl.hh.

◆ ~FrameAnimationT()

template<class PointT >
FrameAnimationT< PointT >::~FrameAnimationT
virtual

Destructor.

Definition at line 124 of file FrameAnimationT_impl.hh.

Member Function Documentation

◆ copy()

template<class PointT >
AnimationT< PointT > * FrameAnimationT< PointT >::copy
virtual

Copy Function.

Implements AnimationT< PointT >.

Definition at line 137 of file FrameAnimationT_impl.hh.

◆ frameCount()

template<class PointT >
unsigned int FrameAnimationT< PointT >::frameCount
inlinevirtual

Returns the number of frames stored in this pose.

Implements AnimationT< PointT >.

Definition at line 155 of file FrameAnimationT_impl.hh.

◆ insertJointAt()

template<class PointT >
void FrameAnimationT< PointT >::insertJointAt ( unsigned int  _index)
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.

Parameters
_indexThe 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.

◆ pose()

template<class PointT >
FrameAnimationT< PointT >::Pose * FrameAnimationT< PointT >::pose ( unsigned int  _iFrame)
inlinevirtual

Returns a pointer to the pose stored in the given frame.

Parameters
_iFrameThe poses frame number

Implements AnimationT< PointT >.

Definition at line 145 of file FrameAnimationT_impl.hh.

◆ removeJointAt()

template<class PointT >
void FrameAnimationT< PointT >::removeJointAt ( unsigned int  _index)
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.

Parameters
_indexThe index of the joint that is being deleted.

Implements AnimationT< PointT >.

Definition at line 191 of file FrameAnimationT_impl.hh.

◆ setFrameCount()

template<class PointT >
void FrameAnimationT< PointT >::setFrameCount ( unsigned int  _frames)

Set number of frames stored in this pose.

Definition at line 163 of file FrameAnimationT_impl.hh.

◆ updateFromGlobal()

template<class PointT >
void FrameAnimationT< PointT >::updateFromGlobal ( unsigned int  _index)
virtual

Updates the local matrix using the global matrix.

Called when a joints parent is changed.

Parameters
_indexThe joints index

Implements AnimationT< PointT >.

Definition at line 207 of file FrameAnimationT_impl.hh.

Friends And Related Function Documentation

◆ SkeletonT

template<class PointT >
template<typename >
friend class SkeletonT
friend

Definition at line 50 of file FrameAnimationT.hh.

Member Data Documentation

◆ poses_

template<class PointT >
std::vector<Pose*> FrameAnimationT< PointT >::poses_
private

Every entry in this vector is a frame of the animation.

Definition at line 124 of file FrameAnimationT.hh.

◆ skeleton_

template<class PointT >
Skeleton* FrameAnimationT< PointT >::skeleton_
private

Pointer to associated skeleton.

Definition at line 122 of file FrameAnimationT.hh.


The documentation for this class was generated from the following files: