Manages an animation, which is a collection of keyframes and the ability to interpolate between the keyframes.
More...
#include <Animation.hh>
|
| 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.
|
|
|
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
|
|
Manages an animation, which is a collection of keyframes and the ability to interpolate between the keyframes.
array of keyframe type alias
gazebo::common::Animation::Animation |
( |
const std::string & |
_name, |
|
|
double |
_length, |
|
|
bool |
_loop |
|
) |
| |
Constructor.
- Parameters
-
[in] | _name | Name of the animation, should be unique |
[in] | _length | Duration of the animation in seconds |
[in] | _loop | Set to true if the animation should repeat |
virtual gazebo::common::Animation::~Animation |
( |
| ) |
|
|
virtual |
void gazebo::common::Animation::AddTime |
( |
double |
_time | ) |
|
Add time to the animation.
- Parameters
-
[in] | _time | The amount of time to add in seconds |
KeyFrame* gazebo::common::Animation::GetKeyFrame |
( |
unsigned int |
_index | ) |
const |
Get a key frame using an index value.
- Parameters
-
[in] | _index | The index of the key frame |
- Returns
- A pointer the keyframe, NULL if the _index is invalid
unsigned int gazebo::common::Animation::GetKeyFrameCount |
( |
| ) |
const |
Return the number of key frames in the animation.
- Returns
- The number of keyframes
double gazebo::common::Animation::GetKeyFramesAtTime |
( |
double |
_time, |
|
|
KeyFrame ** |
_kf1, |
|
|
KeyFrame ** |
_kf2, |
|
|
unsigned int & |
_firstKeyIndex |
|
) |
| const |
|
protected |
Get the two key frames that bound a time value.
- Parameters
-
[in] | _time | The time in seconds |
[out] | _kf1 | Lower bound keyframe that is returned |
[out] | _kf2 | Upper bound keyframe that is returned |
[out] | _firstKeyIndex | Index of the lower bound key frame |
- Returns
- The time between the two keyframe
double gazebo::common::Animation::GetLength |
( |
| ) |
const |
Return the duration of the animation.
- Returns
- Duration of the animation in seconds
double gazebo::common::Animation::GetTime |
( |
| ) |
const |
Return the current time position.
- Returns
- The time position in seconds
void gazebo::common::Animation::SetLength |
( |
double |
_len | ) |
|
Set the duration of the animation.
- Parameters
-
[in] | _len | The length of the animation in seconds |
void gazebo::common::Animation::SetTime |
( |
double |
_time | ) |
|
Set the current time position of the animation.
- Parameters
-
[in] | _time | The time position in seconds |
bool gazebo::common::Animation::build |
|
mutableprotected |
determines if the interpolation splines need building
double gazebo::common::Animation::length |
|
protected |
bool gazebo::common::Animation::loop |
|
protected |
true if animation repeats
std::string gazebo::common::Animation::name |
|
protected |
double gazebo::common::Animation::timePos |
|
protected |
The documentation for this class was generated from the following file: