A numeric animation. More...
#include <Animation.hh>
Public Member Functions | |
NumericAnimation (const std::string &_name, double _length, bool _loop) | |
Constructor. | |
virtual | ~NumericAnimation () |
Destructor. | |
NumericKeyFrame * | CreateKeyFrame (double _time) |
Create a numeric keyframe at the given time. | |
void | GetInterpolatedKeyFrame (NumericKeyFrame &_kf) const |
Get a keyframe using the animation's current time. | |
Public Member Functions inherited from gazebo::common::Animation | |
Animation (const std::string &_name, double _length, bool _loop) | |
Constructor. | |
virtual | ~Animation () |
Destructor. | |
void | AddTime (double _time) |
Add time to the animation. | |
KeyFrame * | GetKeyFrame (unsigned int _index) const |
Get a key frame using an index value. | |
unsigned int | GetKeyFrameCount () const |
Return the number of key frames in the animation. | |
double | GetLength () const |
Return the duration of the animation. | |
double | GetTime () const |
Return the current time position. | |
void | SetLength (double _len) |
Set the duration of the animation. | |
void | SetTime (double _time) |
Set the current time position of the animation. | |
Additional Inherited Members | |
Protected Types inherited from gazebo::common::Animation | |
typedef std::vector< KeyFrame * > | KeyFrame_V |
array of keyframe type alias | |
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. | |
Protected Attributes inherited from gazebo::common::Animation | |
bool | build |
determines if the interpolation splines need building | |
KeyFrame_V | keyFrames |
array of key frames | |
double | length |
animation duration | |
bool | loop |
true if animation repeats | |
std::string | name |
animation name | |
double | timePos |
current time position | |
A numeric animation.
gazebo::common::NumericAnimation::NumericAnimation | ( | 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.
NumericKeyFrame* gazebo::common::NumericAnimation::CreateKeyFrame | ( | double | _time | ) |
Create a numeric keyframe at the given time.
[in] | _time | Time at which to create the keyframe |
void gazebo::common::NumericAnimation::GetInterpolatedKeyFrame | ( | NumericKeyFrame & | _kf | ) | const |
Get a keyframe using the animation's current time.
[out] | _kf | NumericKeyFrame reference to hold the interpolated result |