17 #ifndef IGNITION_COMMON_ANIMATION_HH_ 18 #define IGNITION_COMMON_ANIMATION_HH_ 28 #include <ignition/common/graphics/Export.hh> 36 class NumericKeyFrame;
37 class TrajectoryInfoPrivate;
49 const double _length,
const bool _loop);
56 public:
double Length()
const;
60 public:
void Length(
const double _len);
64 public:
void Time(
const double _time);
68 public:
void AddTime(
const double _time);
72 public:
double Time()
const;
76 public:
bool InterpolateX()
const;
80 public:
void SetInterpolateX(
const bool _interpolateX);
84 public:
unsigned int KeyFrameCount()
const;
97 protected:
double KeyFramesAtTime(
100 unsigned int &_firstKeyIndex)
const;
105 #pragma warning(push) 106 #pragma warning(disable: 4251) 142 const double _length,
const bool _loop);
150 public:
PoseKeyFrame *CreateKeyFrame(
const double _time);
154 public:
void InterpolatedKeyFrame(
PoseKeyFrame &_kf)
const;
159 protected:
void InterpolatedKeyFrame(
const double _time,
163 protected:
void BuildInterpolationSplines()
const;
180 const double _length,
const bool _loop);
225 public:
unsigned int Id()
const;
229 public:
void SetId(
unsigned int _id);
233 public:
unsigned int AnimIndex()
const;
238 public:
void SetAnimIndex(
unsigned int _index);
242 public: std::chrono::steady_clock::duration Duration()
const;
247 public:
double DistanceSoFar(
248 const std::chrono::steady_clock::duration &_time)
const;
252 public: std::chrono::steady_clock::time_point StartTime()
const;
256 public:
void SetStartTime(
257 const std::chrono::steady_clock::time_point &_startTime);
261 public: std::chrono::steady_clock::time_point EndTime()
const;
265 public:
void SetEndTime(
266 const std::chrono::steady_clock::time_point &_endTime);
270 public:
bool Translated()
const;
274 public:
void SetTranslated(
bool _translated);
283 public:
void SetWaypoints(
288 private: TrajectoryInfoPrivate *dataPtr{
nullptr};
double length
animation duration
Definition: Animation.hh:113
bool build
determines if the interpolation splines need building
Definition: Animation.hh:119
Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information...
Definition: Animation.hh:198
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: Animation.hh:42
A numeric animation.
Definition: Animation.hh:173
std::string name
animation name
Definition: Animation.hh:110
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:122
A pose animation.
Definition: Animation.hh:135
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:128
std::vector< common::KeyFrame * > KeyFrame_V
array of keyframe type alias
Definition: Animation.hh:125
Forward declarations for the common classes.
double timePos
current time position
Definition: Animation.hh:116
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:48