Go to the documentation of this file.
17 #ifndef GZ_COMMON_ANIMATION_HH_
18 #define GZ_COMMON_ANIMATION_HH_
24 #include <gz/math/Pose3.hh>
25 #include <gz/math/Spline.hh>
26 #include <gz/math/RotationSpline.hh>
28 #include <gz/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};
Forward declarations for the common classes.
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: gz/common/Time.hh:33
KeyFrame_V keyFrames
array of key frames
Definition: gz/common/Animation.hh:128
std::string name
animation name
Definition: gz/common/Animation.hh:110
double timePos
current time position
Definition: gz/common/Animation.hh:116
bool loop
true if animation repeats
Definition: gz/common/Animation.hh:122
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: gz/common/Animation.hh:42
std::vector< common::KeyFrame * > KeyFrame_V
array of keyframe type alias
Definition: gz/common/Animation.hh:125
A keyframe for a NumericAnimation.
Definition: gz/common/KeyFrame.hh:90
double length
animation duration
Definition: gz/common/Animation.hh:113
A pose animation.
Definition: gz/common/Animation.hh:135
Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information.
Definition: gz/common/Animation.hh:198
A keyframe for a PoseAnimation.
Definition: gz/common/KeyFrame.hh:48
bool build
determines if the interpolation splines need building
Definition: gz/common/Animation.hh:119
A key frame in an animation.
Definition: gz/common/KeyFrame.hh:30
A numeric animation.
Definition: gz/common/Animation.hh:173