PoseAnimation Class Reference
A pose animation. More...
#include <Animation.hh>
Public Member Functions | |
PoseAnimation (const std::string &_name, const double _length, const bool _loop) | |
Constructor. More... | |
virtual | ~PoseAnimation () |
Destructor. More... | |
PoseKeyFrame * | CreateKeyFrame (const double _time) |
Create a pose keyframe at the given time. More... | |
void | InterpolatedKeyFrame (PoseKeyFrame &_kf) const |
Get a keyframe using the animation's current time. More... | |
Public Member Functions inherited from Animation | |
Animation (const std::string &_name, const double _length, const bool _loop) | |
Constructor. More... | |
virtual | ~Animation () |
Destructor. More... | |
void | AddTime (const double _time) |
Add time to the animation. More... | |
bool | InterpolateX () const |
Return the interpolateX value. More... | |
common::KeyFrame * | KeyFrame (const unsigned int _index) const |
Get a key frame using an index value. More... | |
unsigned int | KeyFrameCount () const |
Return the number of key frames in the animation. More... | |
double | Length () const |
Return the duration of the animation. More... | |
void | Length (const double _len) |
Set the duration of the animation. More... | |
void | SetInterpolateX (const bool _interpolateX) |
Set the interpolateX value. More... | |
double | Time () const |
Return the current time position. More... | |
void | Time (const double _time) |
Set the current time position of the animation. More... | |
Protected Member Functions | |
void | BuildInterpolationSplines () const |
Update the pose splines. More... | |
void | InterpolatedKeyFrame (const double _time, PoseKeyFrame &_kf) const |
Get a keyframe using a passed in time. More... | |
Protected Member Functions inherited from Animation | |
double | KeyFramesAtTime (double _time, common::KeyFrame **_kf1, common::KeyFrame **_kf2, unsigned int &_firstKeyIndex) const |
Get the two key frames that bound a time value. More... | |
Additional Inherited Members | |
Protected Types inherited from Animation | |
typedef std::vector< common::KeyFrame * > | KeyFrame_V |
array of keyframe type alias More... | |
Protected Attributes inherited from Animation | |
bool | build |
determines if the interpolation splines need building More... | |
KeyFrame_V | keyFrames |
array of key frames More... | |
double | length |
animation duration More... | |
bool | loop |
true if animation repeats More... | |
std::string | name |
animation name More... | |
double | timePos |
current time position More... | |
Detailed Description
A pose animation.
Constructor & Destructor Documentation
◆ PoseAnimation()
PoseAnimation | ( | const std::string & | _name, |
const double | _length, | ||
const bool | _loop | ||
) |
Constructor.
- Parameters
-
[in] _name String name of the animation. This should be unique. [in] _length Length of the animation in seconds [in] _loop True == loop the animation
◆ ~PoseAnimation()
|
virtual |
Destructor.
Member Function Documentation
◆ BuildInterpolationSplines()
|
protected |
Update the pose splines.
◆ CreateKeyFrame()
PoseKeyFrame* CreateKeyFrame | ( | const double | _time | ) |
Create a pose keyframe at the given time.
- Parameters
-
[in] _time Time at which to create the keyframe
- Returns
- Pointer to the new keyframe
◆ InterpolatedKeyFrame() [1/2]
|
protected |
Get a keyframe using a passed in time.
- Parameters
-
[in] _time Time in seconds [out] _kf PoseKeyFrame reference to hold the interpolated result
◆ InterpolatedKeyFrame() [2/2]
void InterpolatedKeyFrame | ( | PoseKeyFrame & | _kf | ) | const |
Get a keyframe using the animation's current time.
- Parameters
-
[out] _kf PoseKeyFrame reference to hold the interpolated result
The documentation for this class was generated from the following file: