17 #ifndef _GAZEBO_SKELETONANIMATION_HH_
18 #define _GAZEBO_SKELETONANIMATION_HH_
24 #include <ignition/math/Matrix4.hh>
25 #include <ignition/math/Pose3.hh>
52 public:
void SetName(
const std::string &_name);
56 public: std::string GetName()
const;
63 public:
void AddKeyFrame(
const double _time,
69 public:
void AddKeyFrame(
const double _time,
70 const ignition::math::Matrix4d &_trans);
77 public:
void AddKeyFrame(
const double _time,
83 public:
void AddKeyFrame(
const double _time,
84 const ignition::math::Pose3d &_pose);
88 public:
unsigned int GetFrameCount()
const;
98 public:
void GetKeyFrame(
const unsigned int _i,
double &_time,
107 public:
void GetKeyFrame(
const unsigned int _i,
double &_time,
108 ignition::math::Matrix4d &_trans)
const;
117 public: std::pair<double, math::Matrix4> GetKeyFrame(
125 public: std::pair<double, ignition::math::Matrix4d>
KeyFrame(
126 const unsigned int _i)
const;
130 public:
double GetLength()
const;
140 public:
math::Matrix4 GetFrameAt(
double _time,
bool _loop =
true)
const
149 public: ignition::math::Matrix4d FrameAt(
150 double _time,
bool _loop =
true)
const;
155 public:
void Scale(
const double _scale);
163 public:
double GetTimeAtX(
const double _x)
const;
169 protected: std::map<double, ignition::math::Matrix4d>
keyFrames;
188 public:
void SetName(
const std::string &_name);
192 public: std::string GetName()
const;
196 public:
unsigned int GetNodeCount()
const;
201 public:
bool HasNode(
const std::string &_node)
const;
209 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
216 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
217 const ignition::math::Matrix4d &_mat);
225 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
233 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
234 const ignition::math::Pose3d &_pose);
247 public:
math::Matrix4 GetNodePoseAt(
const std::string &_node,
248 const double _time,
const bool _loop =
true)
260 public: ignition::math::Matrix4d NodePoseAt(
const std::string &_node,
261 const double _time,
const bool _loop =
true);
273 public: std::map<std::string, math::Matrix4> GetPoseAt(
274 const double _time,
const bool _loop =
true)
const
285 public: std::map<std::string, ignition::math::Matrix4d> PoseAt(
286 const double _time,
const bool _loop =
true)
const;
298 public: std::map<std::string, math::Matrix4> GetPoseAtX(
const double _x,
299 const std::string &_node,
const bool _loop =
true)
const
310 public: std::map<std::string, ignition::math::Matrix4d> PoseAtX(
311 const double _x,
const std::string &_node,
312 const bool _loop =
true)
const;
317 public:
void Scale(
const double _scale);
321 public:
double GetLength()
const;
std::map< double, ignition::math::Matrix4d > keyFrames
the dictionary of key frames, indexed by time
Definition: SkeletonAnimation.hh:169
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
Skeleton animation.
Definition: SkeletonAnimation.hh:176
double length
the duration of the animations (time of last key frame)
Definition: SkeletonAnimation.hh:172
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
A 3x3 matrix class.
Definition: Matrix4.hh:40
std::map< std::string, NodeAnimation * > animations
a dictionary of node animations
Definition: SkeletonAnimation.hh:330
#define GZ_COMMON_VISIBLE
Definition: system.hh:91
std::string name
the name of the animation
Definition: SkeletonAnimation.hh:166
A key frame in an animation.
Definition: KeyFrame.hh:37
std::string name
the node name
Definition: SkeletonAnimation.hh:324
Node animation.
Definition: SkeletonAnimation.hh:41
double length
the duration of the longest animation
Definition: SkeletonAnimation.hh:327