A pose animation. More...
#include <Animation.hh>
Public Member Functions | |
PoseAnimation (const std::string &_name, double _length, bool _loop) | |
Constructor. More... | |
virtual | ~PoseAnimation () |
Destructor. More... | |
PoseKeyFrame * | CreateKeyFrame (double _time) |
Create a pose keyframe at the given time. More... | |
void | GetInterpolatedKeyFrame (PoseKeyFrame &_kf) const |
Get a keyframe using the animation's current time. More... | |
Public Member Functions inherited from gazebo::common::Animation | |
Animation (const std::string &_name, double _length, bool _loop) | |
Constructor. More... | |
virtual | ~Animation () |
Destructor. More... | |
void | AddTime (double _time) |
Add time to the animation. More... | |
KeyFrame * | GetKeyFrame (unsigned int _index) const |
Get a key frame using an index value. More... | |
unsigned int | GetKeyFrameCount () const |
Return the number of key frames in the animation. More... | |
double | GetLength () const |
Return the duration of the animation. More... | |
double | GetTime () const |
Return the current time position. More... | |
void | SetLength (double _len) |
Set the duration of the animation. More... | |
void | SetTime (double _time) |
Set the current time position of the animation. More... | |
Protected Member Functions | |
void | BuildInterpolationSplines () const |
Update the pose splines. More... | |
void | GetInterpolatedKeyFrame (double _time, PoseKeyFrame &_kf) const |
Get a keyframe using a passed in time. More... | |
Protected Member Functions inherited from gazebo::common::Animation | |
double | GetKeyFramesAtTime (double _time, KeyFrame **_kf1, KeyFrame **_kf2, unsigned int &_firstKeyIndex) const |
Get the two key frames that bound a time value. More... | |
Additional Inherited Members | |
Protected Types inherited from gazebo::common::Animation | |
typedef std::vector< KeyFrame * > | KeyFrame_V |
array of keyframe type alias More... | |
Protected Attributes inherited from gazebo::common::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... | |
A pose animation.
gazebo::common::PoseAnimation::PoseAnimation | ( | const std::string & | _name, |
double | _length, | ||
bool | _loop | ||
) |
Constructor.
[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 |
|
virtual |
Destructor.
|
protected |
Update the pose splines.
PoseKeyFrame* gazebo::common::PoseAnimation::CreateKeyFrame | ( | double | _time) |
Create a pose keyframe at the given time.
[in] | _time | Time at which to create the keyframe |
void gazebo::common::PoseAnimation::GetInterpolatedKeyFrame | ( | PoseKeyFrame & | _kf) | const |
Get a keyframe using the animation's current time.
[out] | _kf | PoseKeyFrame reference to hold the interpolated result |
|
protected |
Get a keyframe using a passed in time.
[in] | _time | Time in seconds |
[out] | _kf | PoseKeyFrame reference to hold the interpolated result |