Developer Documentation

Public Types | Public Member Functions | Private Attributes | Friends | List of all members
FrameAnimationT< PointT > Class Template Reference
Inheritance diagram for FrameAnimationT< 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.
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_

## Detailed Description

### template<class PointT>
class FrameAnimationT< PointT >

Definition at line 47 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

  _pose | This 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

  _skeleton | The 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

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

## ◆ 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

  _other | The animation to copy from

Definition at line 110 of file FrameAnimationT_impl.hh.

## Member Function Documentation

## ◆ 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

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

## ◆ pose()

template<class PointT >

FrameAnimationT< PointT >::Pose * FrameAnimationT< PointT >::pose | ( | unsigned int | _iFrame | ) |
| inline virtual

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

Parameters

  _iFrame | The 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

  _index | The index of the joint that is being deleted.

Implements AnimationT< PointT >.

Definition at line 191 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

  _index | The joints index

Implements AnimationT< PointT >.

Definition at line 207 of file FrameAnimationT_impl.hh.

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

- Type-Skeleton/ObjectTypes/Skeleton/Animation/FrameAnimationT.hh
- Type-Skeleton/ObjectTypes/Skeleton/Animation/FrameAnimationT_impl.hh