17 #ifndef _ANIMATION_HH_
18 #define _ANIMATION_HH_
22 #include <ignition/math/Spline.hh>
23 #include <ignition/math/RotationSpline.hh>
49 public:
Animation(
const std::string &_name,
double _length,
bool _loop);
56 public:
double GetLength()
const;
60 public:
void SetLength(
double _len);
64 public:
void SetTime(
double _time);
68 public:
void AddTime(
double _time);
72 public:
double GetTime()
const;
76 public:
unsigned int GetKeyFrameCount()
const;
81 public:
KeyFrame* GetKeyFrame(
unsigned int _index)
const;
89 protected:
double GetKeyFramesAtTime(
double _time,
KeyFrame **_kf1,
91 unsigned int &_firstKeyIndex)
const;
95 protected: std::string
name;
128 double _length,
bool _loop);
140 public:
void GetInterpolatedKeyFrame(
PoseKeyFrame &_kf)
const;
145 protected:
void GetInterpolatedKeyFrame(
double _time,
149 protected:
void BuildInterpolationSplines()
const;
152 private:
mutable ignition::math::Spline *positionSpline;
155 private:
mutable ignition::math::RotationSpline *rotationSpline;
170 double _length,
bool _loop);
bool build
determines if the interpolation splines need building
Definition: Animation.hh:104
bool loop
true if animation repeats
Definition: Animation.hh:107
KeyFrame_V keyFrames
array of key frames
Definition: Animation.hh:113
double timePos
current time position
Definition: Animation.hh:101
A numeric animation.
Definition: Animation.hh:163
std::string name
animation name
Definition: Animation.hh:95
A keyframe for a NumericAnimation.
Definition: KeyFrame.hh:86
double length
animation duration
Definition: Animation.hh:98
std::vector< KeyFrame * > KeyFrame_V
array of keyframe type alias
Definition: Animation.hh:110
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: Animation.hh:43
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:53
A key frame in an animation.
Definition: KeyFrame.hh:35
A pose animation.
Definition: Animation.hh:121