Developer Documentation

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
InterpolationAnimationT< PointT > Class Template Reference
Inheritance diagram for InterpolationAnimationT< PointT >:

## Public Types
typedef PointT | Point
typedef Point::value_type | Scalar
typedef PoseT< PointT > | Pose
typedef InterpolationMatrixManipulatorT< Scalar > | MatrixManipulator
typedef InterpolationT< Scalar > | Interpolator
typedef std::vector< Scalar > | TargetType
Public Types inherited from AnimationT< PointT >
typedef PointT | Point
typedef Point::value_type | Scalar
typedef PoseT< PointT > | Pose

## Public Member Functions
| InterpolationAnimationT (const InterpolationAnimationT< PointT > &_other)
| Copy constructor. More...
| InterpolationAnimationT (Skeleton *_skeleton, MatrixManipulator *_matrixManipulator)
| Creates a new empty animation. More...
virtual AnimationT< PointT > * | copy ()
virtual void | updateFromGlobal (unsigned int _index)
| Updates the local matrix using the global matrix. More...
virtual bool | getMinInput (Scalar &_result)
virtual bool | getMaxInput (Scalar &_result)
Pose * | getReference ()
virtual void | clearPoseCache ()
Frame access
There is one pose per frame.
virtual Pose * | pose (unsigned int _iFrame)
| Returns a pointer to the pose calculated for the given frame. More...
virtual Pose * | pose (unsigned int _iFrame, Pose *_reference)
| Returns a pointer to the pose calculated for the given frame. More...
unsigned int | frameCount ()
| Returns the 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.
virtual void | insertJointAt (unsigned int _index)
| Called by the skeleton as a new joint is inserted. More...
virtual void | removeJointAt (unsigned int _index)
| Called by the skeleton as a joint is deleted. More...
Interpolators access
We use only interpolators with time as input.
void | addInterpolator (InterpolationT< double > *_interpolator)
| Add an interpolator. More...
Interpolator * | interpolator (unsigned int _index)
| Get the i-th interpolator. More...
unsigned int | interpolatorCount ()
| Get the number of interpolators. More...
InfluencedJoints access
void | addInfluencedJoint (int _joint)
bool | isInfluenced (int _joint)
std::vector< int > & | influencedJoints ()
MatrixManipulator access
MatrixManipulator * | matrixManipulator ()
| Get the matrix manipulator. More...
Public Member Functions inherited from AnimationT< PointT >
| AnimationT (std::string _name="")
std::string | name ()
void | setName (std::string _name)
int | fps ()
void | setFps (int _fps)

## Static Public Attributes
static const int | FPS = 60

## Protected Member Functions
unsigned int | calcAbsoluteMaxForInterpolator (uint _index)
| Calculates the last frame that interpolator _index is responsible for.

## Protected Attributes
Skeleton * | skeleton_
std::vector< int > | influencedJoints_
std::vector< Interpolator *> | interpolators_
std::map< Interpolator *, std::vector< TargetType > > | precalculations_
MatrixManipulator * | matrixManipulator_
unsigned int | frames_
std::map< unsigned int, Pose *> | interpolatedPoses_
Protected Attributes inherited from AnimationT< PointT >
std::string | name_
int | fps_

## Friends
template<typename >
class | SkeletonT

## Detailed Description

### template<class PointT>
class InterpolationAnimationT< PointT >

Definition at line 52 of file InterpolationAnimationT.hh.

## Constructor & Destructor Documentation

## ◆ InterpolationAnimationT() [1/2]

template<class PointT>

InterpolationAnimationT< PointT >::InterpolationAnimationT | ( | const InterpolationAnimationT< PointT > & | _other | ) |

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 62 of file InterpolationAnimationT_impl.hh.

## ◆ InterpolationAnimationT() [2/2]

template<class PointT>

InterpolationAnimationT< PointT >::InterpolationAnimationT | ( | Skeleton * | _skeleton,
|  | MatrixManipulator * | _matrixManipulator
| ) |  |

Creates a new empty animation.

Parameters

  _skeleton | The skeleton that will hold this animation
  _matrixManipulator | Interpolator that translates the interpolation into matrix values

Definition at line 80 of file InterpolationAnimationT_impl.hh.

## Member Function Documentation

## ◆ addInterpolator()

template<class PointT >

void InterpolationAnimationT< PointT >::addInterpolator | ( | InterpolationT< double > * | _interpolator | ) |

Add an interpolator.

Parameters

  _interpolator | New interpolator

Definition at line 216 of file InterpolationAnimationT_impl.hh.

## ◆ insertJointAt()

template<class PointT >

void InterpolationAnimationT< 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 the animation. See BaseNode::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 >.

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 183 of file InterpolationAnimationT_impl.hh.

## ◆ interpolator()

template<class PointT >

InterpolationT< typename PointT::value_type > * InterpolationAnimationT< PointT >::interpolator | ( | unsigned int | _index | ) |

Get the i-th interpolator.

Parameters

  _index | Number of the interpolator

Returns
  Interpolator

Definition at line 247 of file InterpolationAnimationT_impl.hh.

## ◆ interpolatorCount()

template<class PointT >

unsigned int InterpolationAnimationT< PointT >::interpolatorCount | ( |  | ) |

Get the number of interpolators.

Returns
  Number of interpolators

Definition at line 258 of file InterpolationAnimationT_impl.hh.

## ◆ matrixManipulator()

template<class PointT>

MatrixManipulator* InterpolationAnimationT< PointT >::matrixManipulator | ( |  | ) |
| inline

Get the matrix manipulator.

Returns
  MatrixManipulator

Definition at line 209 of file InterpolationAnimationT.hh.

## ◆ pose() [1/2]

template<class PointT >

PoseT< PointT > * InterpolationAnimationT< PointT >::pose | ( | unsigned int | _iFrame | ) |
| virtual

Returns a pointer to the pose calculated for the given frame.

Parameters

  _iFrame | The frame number for which the pose should be calculated. This is always from 0..frames even if the animation starts with an input value other than 0.

Implements AnimationT< PointT >.

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 106 of file InterpolationAnimationT_impl.hh.

## ◆ pose() [2/2]

template<class PointT >

PoseT< PointT > * InterpolationAnimationT< PointT >::pose | ( | unsigned int | _iFrame,
|  | Pose * | _reference
| ) |  |
| virtual

Returns a pointer to the pose calculated for the given frame.

Parameters

  _iFrame | The frame number for which the pose should be calculated. This is always from 0..frames even if the animation starts with an input value other than 0.
  _reference | Reference pose

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 114 of file InterpolationAnimationT_impl.hh.

## ◆ removeJointAt()

template<class PointT >

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

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 192 of file InterpolationAnimationT_impl.hh.

## ◆ updateFromGlobal()

template<class PointT >

void InterpolationAnimationT< PointT >::updateFromGlobal | ( | unsigned int | _index | ) |
| virtual

Updates the local matrix using the global matrix.

Called when a joints parent is changed. Note: Does nothing at the moment

Parameters

  _index | The joints index

Implements AnimationT< PointT >.

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 208 of file InterpolationAnimationT_impl.hh.

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

- Type-Skeleton/ObjectTypes/Skeleton/Animation/InterpolationAnimationT.hh
- Type-Skeleton/ObjectTypes/Skeleton/Animation/InterpolationAnimationT_impl.hh