Go to the documentation of this file.
17 #ifndef IGNITION_COMMON_ANIMATION_HH_
18 #define IGNITION_COMMON_ANIMATION_HH_
24 #include <gz/math/Pose3.hh>
25 #include <gz/math/Spline.hh>
26 #include <gz/math/RotationSpline.hh>
28 #include <ignition/utils/ImplPtr.hh>
30 #include <gz/common/config.hh>
31 #include <gz/common/graphics/Export.hh>
39 class NumericKeyFrame;
51 const double _length,
const bool _loop);
55 public:
double Length()
const;
59 public:
void Length(
const double _len);
63 public:
void Time(
const double _time);
67 public:
void AddTime(
const double _time);
71 public:
double Time()
const;
75 public:
bool InterpolateX()
const;
79 public:
void SetInterpolateX(
const bool _interpolateX);
83 public:
unsigned int KeyFrameCount()
const;
93 protected:
template<
typename KeyFrameType>
94 KeyFrameType *CreateKeyFrame(
const double _time);
102 protected:
double KeyFramesAtTime(
105 unsigned int &_firstKeyIndex)
const;
108 IGN_UTILS_IMPL_PTR(dataPtr)
119 const double _length,
const bool _loop);
133 const double _length,
const bool _loop,
139 public:
PoseKeyFrame *CreateKeyFrame(
const double _time);
148 protected:
void InterpolatedKeyFrame(
const double _time,
152 protected:
void BuildInterpolationSplines();
155 IGN_UTILS_IMPL_PTR(dataPtr)
166 const double _length,
const bool _loop);
179 IGN_UTILS_IMPL_PTR(dataPtr)
191 public:
unsigned int Id()
const;
195 public:
void SetId(
unsigned int _id);
199 public:
unsigned int AnimIndex()
const;
204 public:
void SetAnimIndex(
unsigned int _index);
208 public: std::chrono::steady_clock::duration Duration()
const;
213 public:
double DistanceSoFar(
214 const std::chrono::steady_clock::duration &_time)
const;
218 public: std::chrono::steady_clock::time_point StartTime()
const;
222 public:
void SetStartTime(
223 const std::chrono::steady_clock::time_point &_startTime);
227 public: std::chrono::steady_clock::time_point EndTime()
const;
231 public:
void SetEndTime(
232 const std::chrono::steady_clock::time_point &_endTime);
236 public:
bool Translated()
const;
240 public:
void SetTranslated(
bool _translated);
249 public:
void SetWaypoints(
261 public:
void SetWaypoints(
263 _waypoints,
double _tension);
266 IGN_UTILS_IMPL_PTR(dataPtr)
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:34
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: gz/common/Animation.hh:44
A keyframe for a NumericAnimation.
Definition: gz/common/KeyFrame.hh:83
A pose animation.
Definition: gz/common/Animation.hh:112
Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information.
Definition: gz/common/Animation.hh:184
A keyframe for a PoseAnimation.
Definition: gz/common/KeyFrame.hh:53
A key frame in an animation.
Definition: gz/common/KeyFrame.hh:35
A numeric animation.
Definition: gz/common/Animation.hh:159