Ignition Common

API Reference

4.4.0
NumericAnimation Class Reference

A numeric animation. More...

#include <Animation.hh>

Public Member Functions

 NumericAnimation (const std::string &_name, const double _length, const bool _loop)
 Constructor. More...
 
NumericKeyFrameCreateKeyFrame (const double _time)
 Create a numeric keyframe at the given time. More...
 
void InterpolatedKeyFrame (NumericKeyFrame &_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...
 
void AddTime (const double _time)
 Add time to the animation. More...
 
bool InterpolateX () const
 Return the interpolateX value. More...
 
common::KeyFrameKeyFrame (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...
 
void Time (const double _time)
 Set the current time position of the animation. More...
 
double Time () const
 Return the current time position. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Animation
template<typename KeyFrameType >
KeyFrameType * CreateKeyFrame (const double _time)
 Create a keyframe at the given time. More...
 
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...
 

Detailed Description

A numeric animation.

Constructor & Destructor Documentation

◆ NumericAnimation()

NumericAnimation ( const std::string _name,
const double  _length,
const 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

Member Function Documentation

◆ CreateKeyFrame()

NumericKeyFrame* CreateKeyFrame ( const 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

◆ InterpolatedKeyFrame()

void InterpolatedKeyFrame ( 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: