Developer Documentation
InterpolationAnimationT< PointT > Class Template Reference
Inheritance diagram for InterpolationAnimationT< PointT >:
AnimationT< PointT > MultiInterpolationAnimationT< 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)
 
PosegetReference ()
 
virtual void clearPoseCache ()
 
Frame access

There is one pose per frame.

virtual Posepose (unsigned int _iFrame)
 Returns a pointer to the pose calculated for the given frame. More...
 
virtual Posepose (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...
 
Interpolatorinterpolator (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
MatrixManipulatormatrixManipulator ()
 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

Skeletonskeleton_
 
std::vector< int > influencedJoints_
 
std::vector< Interpolator * > interpolators_
 
std::map< Interpolator *, std::vector< TargetType > > precalculations_
 
MatrixManipulatormatrixManipulator_
 
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 61 of file InterpolationAnimationT.hh.

Constructor & Destructor Documentation

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
_otherThe animation to copy from

Definition at line 68 of file InterpolationAnimationT.cc.

template<class PointT>
InterpolationAnimationT< PointT >::InterpolationAnimationT ( Skeleton _skeleton,
MatrixManipulator _matrixManipulator 
)

Creates a new empty animation.

Parameters
_skeletonThe skeleton that will hold this animation
_matrixManipulatorInterpolator that translates the interpolation into matrix values

Definition at line 86 of file InterpolationAnimationT.cc.

Member Function Documentation

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

Add an interpolator.

Parameters
_interpolatorNew interpolator

Definition at line 222 of file InterpolationAnimationT.cc.

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
_indexThe 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 189 of file InterpolationAnimationT.cc.

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

Get the i-th interpolator.

Parameters
_indexNumber of the interpolator
Returns
Interpolator

Definition at line 253 of file InterpolationAnimationT.cc.

template<class PointT >
unsigned int InterpolationAnimationT< PointT >::interpolatorCount ( )

Get the number of interpolators.

Returns
Number of interpolators

Definition at line 264 of file InterpolationAnimationT.cc.

template<class PointT>
MatrixManipulator* InterpolationAnimationT< PointT >::matrixManipulator ( )
inline

Get the matrix manipulator.

Returns
MatrixManipulator

Definition at line 218 of file InterpolationAnimationT.hh.

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

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

Parameters
_iFrameThe 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 112 of file InterpolationAnimationT.cc.

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
_iFrameThe 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.
_referenceReference pose

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 120 of file InterpolationAnimationT.cc.

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
_indexThe index of the joint that is being deleted.

Implements AnimationT< PointT >.

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 198 of file InterpolationAnimationT.cc.

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
_indexThe joints index

Implements AnimationT< PointT >.

Reimplemented in MultiInterpolationAnimationT< PointT >.

Definition at line 214 of file InterpolationAnimationT.cc.


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