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: Animation.hh:43
common::KeyFrame * KeyFrame(const unsigned int _index) const
Get a key frame using an index value.
KeyFrame_V keyFrames
array of key frames
Definition: Animation.hh:128
unsigned int KeyFrameCount() const
Return the number of key frames in the animation.
bool build
determines if the interpolation splines need building
Definition: Animation.hh:119
void SetInterpolateX(const bool _interpolateX)
Set the interpolateX value.
std::vector< common::KeyFrame * > KeyFrame_V
array of keyframe type alias
Definition: Animation.hh:125
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.
void BuildInterpolationSplines() const
Update the pose splines.
PoseKeyFrame * CreateKeyFrame(const double _time)
Create a pose keyframe at the given time.
void InterpolatedKeyFrame(const double _time, PoseKeyFrame &_kf) const
Get a keyframe using a passed in time.
void InterpolatedKeyFrame(PoseKeyFrame &_kf) const
Get a keyframe using the animation's current 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: Animation.hh:199
void CopyFrom(const TrajectoryInfo &_trajInfo)
Copy TrajectoryInfo from a TrajectoryInfo instance.
bool Translated() const
Return whether the trajectory is translated.
void SetTranslated(bool _translated)
Set whether the trajectory is translated.
TrajectoryInfo(const TrajectoryInfo &_trajInfo)
Copy constructor.
void SetWaypoints(std::map< std::chrono::steady_clock::time_point, math::Pose3d > _waypoints)
Load all waypoints in the trajectory.
TrajectoryInfo(TrajectoryInfo &&_trajInfo) noexcept
Move constructor.
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.
TrajectoryInfo & operator=(const TrajectoryInfo &_trajInfo)
Assignment operator.
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.