All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::common::NumericAnimation Class Reference

A numeric animation. More...

#include <Animation.hh>

Inheritance diagram for gazebo::common::NumericAnimation:
Inheritance graph
[legend]
Collaboration diagram for gazebo::common::NumericAnimation:
Collaboration graph
[legend]

Public Member Functions

 NumericAnimation (const std::string &_name, double _length, bool _loop)
 Constructor. More...
 
virtual ~NumericAnimation ()
 Destructor. More...
 
NumericKeyFrameCreateKeyFrame (double _time)
 Create a numeric keyframe at the given time. More...
 
void GetInterpolatedKeyFrame (NumericKeyFrame &_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...
 
KeyFrameGetKeyFrame (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...
 

Additional Inherited Members

- Protected Types inherited from gazebo::common::Animation
typedef std::vector< KeyFrame * > KeyFrame_V
 array of keyframe type alias 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...
 
- 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...
 

Detailed Description

A numeric animation.

Constructor & Destructor Documentation

gazebo::common::NumericAnimation::NumericAnimation ( const std::string &  _name,
double  _length,
bool  _loop 
)

Constructor.

Parameters
[in]_nameString name of the animation. This should be unique.
[in]_lengthLength of the animation in seconds
[in]_loopTrue == loop the animation
virtual gazebo::common::NumericAnimation::~NumericAnimation ( )
virtual

Destructor.

Member Function Documentation

NumericKeyFrame* gazebo::common::NumericAnimation::CreateKeyFrame ( double  _time)

Create a numeric keyframe at the given time.

Parameters
[in]_timeTime at which to create the keyframe
Returns
Pointer to the new keyframe
void gazebo::common::NumericAnimation::GetInterpolatedKeyFrame ( NumericKeyFrame _kf) const

Get a keyframe using the animation's current time.

Parameters
[out]_kfNumericKeyFrame reference to hold the interpolated result

The documentation for this class was generated from the following file: