|
Developer Documentation
|
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 |
Definition at line 61 of file InterpolationAnimationT.hh.
| 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.
| _other | The animation to copy from |
Definition at line 68 of file InterpolationAnimationT.cc.
| InterpolationAnimationT< PointT >::InterpolationAnimationT | ( | Skeleton * | _skeleton, |
| MatrixManipulator * | _matrixManipulator | ||
| ) |
Creates a new empty animation.
| _skeleton | The skeleton that will hold this animation |
| _matrixManipulator | Interpolator that translates the interpolation into matrix values |
Definition at line 86 of file InterpolationAnimationT.cc.
| void InterpolationAnimationT< PointT >::addInterpolator | ( | InterpolationT< double > * | _interpolator | ) |
Add an interpolator.
| _interpolator | New interpolator |
Definition at line 222 of file InterpolationAnimationT.cc.
|
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.
| _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 189 of file InterpolationAnimationT.cc.
| InterpolationT< typename PointT::value_type > * InterpolationAnimationT< PointT >::interpolator | ( | unsigned int | _index | ) |
Get the i-th interpolator.
| _index | Number of the interpolator |
Definition at line 253 of file InterpolationAnimationT.cc.
| unsigned int InterpolationAnimationT< PointT >::interpolatorCount | ( | ) |
Get the number of interpolators.
Definition at line 264 of file InterpolationAnimationT.cc.
|
inline |
Get the matrix manipulator.
Definition at line 218 of file InterpolationAnimationT.hh.
|
virtual |
Returns a pointer to the pose calculated for the given frame.
| _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 112 of file InterpolationAnimationT.cc.
|
virtual |
Returns a pointer to the pose calculated for the given frame.
| _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 120 of file InterpolationAnimationT.cc.
|
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 >.
Reimplemented in MultiInterpolationAnimationT< PointT >.
Definition at line 198 of file InterpolationAnimationT.cc.
|
virtual |
Updates the local matrix using the global matrix.
Called when a joints parent is changed. Note: Does nothing at the moment
| _index | The joints index |
Implements AnimationT< PointT >.
Reimplemented in MultiInterpolationAnimationT< PointT >.
Definition at line 214 of file InterpolationAnimationT.cc.