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;
61 public:
void AddKeyFrame(
const double _time,
62 const ignition::math::Matrix4d &_trans);
67 public:
void AddKeyFrame(
const double _time,
68 const ignition::math::Pose3d &_pose);
72 public:
unsigned int GetFrameCount()
const;
80 public:
void GetKeyFrame(
const unsigned int _i,
double &_time,
81 ignition::math::Matrix4d &_trans)
const;
88 public: std::pair<double, ignition::math::Matrix4d>
KeyFrame(
89 const unsigned int _i)
const;
93 public:
double GetLength()
const;
101 public: ignition::math::Matrix4d FrameAt(
102 double _time,
bool _loop =
true)
const;
107 public:
void Scale(
const double _scale);
115 public:
double GetTimeAtX(
const double _x)
const;
121 protected: std::map<double, ignition::math::Matrix4d>
keyFrames;
140 public:
void SetName(
const std::string &_name);
144 public: std::string GetName()
const;
148 public:
unsigned int GetNodeCount()
const;
153 public:
bool HasNode(
const std::string &_node)
const;
159 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
160 const ignition::math::Matrix4d &_mat);
167 public:
void AddKeyFrame(
const std::string &_node,
const double _time,
168 const ignition::math::Pose3d &_pose);
179 public: ignition::math::Matrix4d NodePoseAt(
const std::string &_node,
180 const double _time,
const bool _loop =
true);
190 public: std::map<std::string, ignition::math::Matrix4d> PoseAt(
191 const double _time,
const bool _loop =
true)
const;
201 public: std::map<std::string, ignition::math::Matrix4d> PoseAtX(
202 const double _x,
const std::string &_node,
203 const bool _loop =
true)
const;
208 public:
void Scale(
const double _scale);
212 public:
double GetLength()
const;
std::map< double, ignition::math::Matrix4d > keyFrames
the dictionary of key frames, indexed by time
Definition: SkeletonAnimation.hh:121
Skeleton animation.
Definition: SkeletonAnimation.hh:128
double length
the duration of the animations (time of last key frame)
Definition: SkeletonAnimation.hh:124
std::map< std::string, NodeAnimation * > animations
a dictionary of node animations
Definition: SkeletonAnimation.hh:221
#define GZ_COMMON_VISIBLE
Definition: system.hh:84
std::string name
the name of the animation
Definition: SkeletonAnimation.hh:118
A key frame in an animation.
Definition: KeyFrame.hh:37
std::string name
the node name
Definition: SkeletonAnimation.hh:215
Node animation.
Definition: SkeletonAnimation.hh:41
double length
the duration of the longest animation
Definition: SkeletonAnimation.hh:218