17 #ifndef _GAZEBO_SKELETONANIMATION_HH_ 18 #define _GAZEBO_SKELETONANIMATION_HH_ 24 #include <ignition/math/Matrix4.hh> 25 #include <ignition/math/Pose3.hh> 50 public:
void SetName(
const std::string &_name);
54 public: std::string GetName()
const;
59 public:
void AddKeyFrame(
const double _time,
60 const ignition::math::Matrix4d &_trans);
65 public:
void AddKeyFrame(
const double _time,
66 const ignition::math::Pose3d &_pose);
70 public:
unsigned int GetFrameCount()
const;
78 public:
void GetKeyFrame(
const unsigned int _i,
double &_time,
79 ignition::math::Matrix4d &_trans)
const;
86 public: std::pair<double, ignition::math::Matrix4d>
KeyFrame(
87 const unsigned int _i)
const;
91 public:
double GetLength()
const;
99 public: ignition::math::Matrix4d FrameAt(
100 double _time,
bool _loop =
true)
const;
105 public:
void Scale(
const double _scale);
113 public:
double GetTimeAtX(
const double _x)
const;
119 protected: std::map<double, ignition::math::Matrix4d>
keyFrames;
138 public:
void SetName(
const std::string &_name);
142 public: std::string GetName()
const;
146 public:
unsigned int GetNodeCount()
const;
151 public:
bool HasNode(
const std::string &_node)
const;
157 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
158 const ignition::math::Matrix4d &_mat);
165 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
166 const ignition::math::Pose3d &_pose);
177 public: ignition::math::Matrix4d NodePoseAt(
const std::string &_node,
178 const double _time,
const bool _loop =
true);
188 public: std::map<std::string, ignition::math::Matrix4d> PoseAt(
189 const double _time,
const bool _loop =
true)
const;
199 public: std::map<std::string, ignition::math::Matrix4d> PoseAtX(
200 const double _x,
const std::string &_node,
201 const bool _loop =
true)
const;
206 public:
void Scale(
const double _scale);
210 public:
double GetLength()
const;
Forward declarations for the common classes.
Definition: Animation.hh:26
double length
the duration of the longest animation
Definition: SkeletonAnimation.hh:216
Skeleton animation.
Definition: SkeletonAnimation.hh:126
std::map< double, ignition::math::Matrix4d > keyFrames
the dictionary of key frames, indexed by time
Definition: SkeletonAnimation.hh:119
std::string name
the node name
Definition: SkeletonAnimation.hh:213
std::map< std::string, NodeAnimation * > animations
a dictionary of node animations
Definition: SkeletonAnimation.hh:219
A key frame in an animation.
Definition: KeyFrame.hh:35
std::string name
the name of the animation
Definition: SkeletonAnimation.hh:116
double length
the duration of the animations (time of last key frame)
Definition: SkeletonAnimation.hh:122
Node animation.
Definition: SkeletonAnimation.hh:39