gz/common/Animation.hh
Go to the documentation of this file.
Manages an animation, which is a collection of keyframes and the ability to interpolate between the k...
Definition: gz/common/Animation.hh:45
common::KeyFrame * KeyFrame(const unsigned int _index) const
Get a key frame using an index value.
unsigned int KeyFrameCount() const
Return the number of key frames in the animation.
void SetInterpolateX(const bool _interpolateX)
Set the interpolateX value.
KeyFrameType * CreateKeyFrame(const double _time)
Create a keyframe at the given time.
double KeyFramesAtTime(double _time, common::KeyFrame **_kf1, common::KeyFrame **_kf2, unsigned int &_firstKeyIndex) const
Get the two key frames that bound a time value.
Animation(const std::string &_name, const double _length, const bool _loop)
Constructor.
void Time(const double _time)
Set the current time position of the animation.
NumericAnimation(const std::string &_name, const double _length, const bool _loop)
Constructor.
void InterpolatedKeyFrame(NumericKeyFrame &_kf) const
Get a keyframe using the animation's current time.
NumericKeyFrame * CreateKeyFrame(const double _time)
Create a numeric keyframe at the given time.
A keyframe for a NumericAnimation.
Definition: gz/common/KeyFrame.hh:84
void BuildInterpolationSplines()
Update the pose splines.
PoseAnimation(const std::string &_name, const double _length, const bool _loop, double _tension)
Constructor.
PoseKeyFrame * CreateKeyFrame(const double _time)
Create a pose keyframe at the given time.
void InterpolatedKeyFrame(PoseKeyFrame &_kf)
Get a keyframe using the animation's current time.
void InterpolatedKeyFrame(const double _time, PoseKeyFrame &_kf)
Get a keyframe using a passed in time.
PoseAnimation(const std::string &_name, const double _length, const bool _loop)
Constructor.
Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information.
Definition: gz/common/Animation.hh:185
void SetWaypoints(std::map< std::chrono::steady_clock::time_point, math::Pose3d > _waypoints, double _tension)
Load all waypoints in the trajectory.
bool Translated() const
Return whether the trajectory is translated.
void SetTranslated(bool _translated)
Set whether the trajectory is translated.
void SetWaypoints(std::map< std::chrono::steady_clock::time_point, math::Pose3d > _waypoints)
Load all waypoints in the trajectory.
common::PoseAnimation * Waypoints() const
Return the waypoints in the trajectory.
unsigned int AnimIndex() const
Return the animation index.
std::chrono::steady_clock::time_point EndTime() const
Return the end time of the trajectory.
void SetEndTime(const std::chrono::steady_clock::time_point &_endTime)
Set the end time of the trajectory.
void SetStartTime(const std::chrono::steady_clock::time_point &_startTime)
Set the start time of the trajectory.
double DistanceSoFar(const std::chrono::steady_clock::duration &_time) const
Get the distance covered by the trajectory by a given time.
void SetAnimIndex(unsigned int _index)
Set the animation index.
std::chrono::steady_clock::duration Duration() const
Return the duration of the trajectory.
std::chrono::steady_clock::time_point StartTime() const
Return the start time of the trajectory.
Forward declarations for the common classes.