17 #ifndef IGNITION_COMMON_ANIMATION_HH_ 18 #define IGNITION_COMMON_ANIMATION_HH_ 28 #include <ignition/common/graphics/Export.hh> 36 class NumericKeyFrame;
37 class AnimationPrivate;
38 class TrajectoryInfoPrivate;
50 const double _length,
const bool _loop);
57 public:
double Length()
const;
61 public:
void Length(
const double _len);
65 public:
void Time(
const double _time);
69 public:
void AddTime(
const double _time);
73 public:
double Time()
const;
77 public:
bool InterpolateX()
const;
81 public:
void SetInterpolateX(
const bool _interpolateX);
85 public:
unsigned int KeyFrameCount()
const;
98 protected:
double KeyFramesAtTime(
101 unsigned int &_firstKeyIndex)
const;
106 #pragma warning(push) 107 #pragma warning(disable: 4251) 143 const double _length,
const bool _loop);
151 public:
PoseKeyFrame *CreateKeyFrame(
const double _time);
155 public:
void InterpolatedKeyFrame(
PoseKeyFrame &_kf)
const;
160 protected:
void InterpolatedKeyFrame(
const double _time,
164 protected:
void BuildInterpolationSplines()
const;
181 const double _length,
const bool _loop);
226 public:
unsigned int Id()
const;
230 public:
void SetId(
unsigned int _id);
234 public:
unsigned int AnimIndex()
const;
239 public:
void SetAnimIndex(
unsigned int _index);
243 public: std::chrono::steady_clock::duration Duration()
const;
248 public:
double DistanceSoFar(
249 const std::chrono::steady_clock::duration &_time)
const;
253 public: std::chrono::steady_clock::time_point StartTime()
const;
257 public:
void SetStartTime(
258 const std::chrono::steady_clock::time_point &_startTime);
262 public: std::chrono::steady_clock::time_point EndTime()
const;
266 public:
void SetEndTime(
267 const std::chrono::steady_clock::time_point &_endTime);
271 public:
bool Translated()
const;
275 public:
void SetTranslated(
bool _translated);
284 public:
void SetWaypoints(
289 private: TrajectoryInfoPrivate *dataPtr{
nullptr};
double length
animation duration
Definition: Animation.hh:114
bool build
determines if the interpolation splines need building
Definition: Animation.hh:120
Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information...
Definition: Animation.hh:199
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: Animation.hh:43
A numeric animation.
Definition: Animation.hh:174
std::string name
animation name
Definition: Animation.hh:111
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: Time.hh:33
bool loop
true if animation repeats
Definition: Animation.hh:123
A pose animation.
Definition: Animation.hh:136
A key frame in an animation.
Definition: KeyFrame.hh:30
A keyframe for a NumericAnimation.
Definition: KeyFrame.hh:90
KeyFrame_V keyFrames
array of key frames
Definition: Animation.hh:129
std::vector< common::KeyFrame * > KeyFrame_V
array of keyframe type alias
Definition: Animation.hh:126
Forward declarations for the common classes.
double timePos
current time position
Definition: Animation.hh:117
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:48