#include <SkeletonAnimation.hh>
Public Member Functions | |
SkeletonAnimation (const std::string &_name) | |
The Constructor. More... | |
~SkeletonAnimation () | |
The destructor. More... | |
void | AddKeyFrame (const std::string &_node, const double _time, const math::Matrix4 &_mat) GAZEBO_DEPRECATED(6.0) |
Adds or replaces a named key frame at a specific time. More... | |
void | AddKeyFrame (const std::string &_node, const double _time, const ignition::math::Matrix4d &_mat) |
Adds or replaces a named key frame at a specific time. More... | |
void | AddKeyFrame (const std::string &_node, const double _time, const math::Pose &_pose) GAZEBO_DEPRECATED(6.0) |
Adds or replaces a named key frame at a specific time. More... | |
void | AddKeyFrame (const std::string &_node, const double _time, const ignition::math::Pose3d &_pose) |
Adds or replaces a named key frame at a specific time. More... | |
double | GetLength () const |
Returns the duration of the animations. More... | |
std::string | GetName () const |
Returns the name. More... | |
unsigned int | GetNodeCount () const |
Returns the number of animation nodes. More... | |
math::Matrix4 | GetNodePoseAt (const std::string &_node, const double _time, const bool _loop=true) GAZEBO_DEPRECATED(6.0) |
Returns the key frame transformation for a named animation at a specific time if a node does not exist at that time (with tolerance of 1e-6 sec), the transformation is interpolated. More... | |
std::map< std::string, math::Matrix4 > | GetPoseAt (const double _time, const bool _loop=true) const GAZEBO_DEPRECATED(6.0) |
Returns a dictionary of transformations indexed by name at a specific time if a node does not exist at that specific time (with tolerance of 1e-6 sec), the transformation is interpolated. More... | |
std::map< std::string, math::Matrix4 > | GetPoseAtX (const double _x, const std::string &_node, const bool _loop=true) const GAZEBO_DEPRECATED(6.0) |
Returns a dictionary of transformations indexed by name where a named node transformation's translational value along the X axis is equal to _x. More... | |
bool | HasNode (const std::string &_node) const |
Looks for a node with a specific name in the animations. More... | |
ignition::math::Matrix4d | NodePoseAt (const std::string &_node, const double _time, const bool _loop=true) |
Returns the key frame transformation for a named animation at a specific time if a node does not exist at that time (with tolerance of 1e-6 sec), the transformation is interpolated. More... | |
std::map< std::string, ignition::math::Matrix4d > | PoseAt (const double _time, const bool _loop=true) const |
Returns a dictionary of transformations indexed by name at a specific time if a node does not exist at that specific time (with tolerance of 1e-6 sec), the transformation is interpolated. More... | |
std::map< std::string, ignition::math::Matrix4d > | PoseAtX (const double _x, const std::string &_node, const bool _loop=true) const |
Returns a dictionary of transformations indexed by name where a named node transformation's translational value along the X axis is equal to _x. More... | |
void | Scale (const double _scale) |
Scales every animation in the animations list. More... | |
void | SetName (const std::string &_name) |
Changes the name. More... | |
Protected Attributes | |
std::map< std::string, NodeAnimation * > | animations |
a dictionary of node animations More... | |
double | length |
the duration of the longest animation More... | |
std::string | name |
the node name More... | |
Skeleton animation.
gazebo::common::SkeletonAnimation::SkeletonAnimation | ( | const std::string & | _name | ) |
The Constructor.
[in] | _name | the name of the animation |
gazebo::common::SkeletonAnimation::~SkeletonAnimation | ( | ) |
The destructor.
Clears the list without destroying the animations
void gazebo::common::SkeletonAnimation::AddKeyFrame | ( | const std::string & | _node, |
const double | _time, | ||
const math::Matrix4 & | _mat | ||
) |
Adds or replaces a named key frame at a specific time.
[in] | _node | the name of the new or existing node |
[in] | _time | the time |
[in] | _mat | the key frame transformation |
void gazebo::common::SkeletonAnimation::AddKeyFrame | ( | const std::string & | _node, |
const double | _time, | ||
const ignition::math::Matrix4d & | _mat | ||
) |
Adds or replaces a named key frame at a specific time.
[in] | _node | the name of the new or existing node |
[in] | _time | the time |
[in] | _mat | the key frame transformation |
void gazebo::common::SkeletonAnimation::AddKeyFrame | ( | const std::string & | _node, |
const double | _time, | ||
const math::Pose & | _pose | ||
) |
Adds or replaces a named key frame at a specific time.
[in] | _node | the name of the new or existing node |
[in] | _time | the time |
[in] | _pose | the key frame transformation as a math::Pose |
void gazebo::common::SkeletonAnimation::AddKeyFrame | ( | const std::string & | _node, |
const double | _time, | ||
const ignition::math::Pose3d & | _pose | ||
) |
Adds or replaces a named key frame at a specific time.
[in] | _node | the name of the new or existing node |
[in] | _time | the time |
[in] | _pose | the key frame transformation as a ignition::math::Pose3d |
double gazebo::common::SkeletonAnimation::GetLength | ( | ) | const |
Returns the duration of the animations.
std::string gazebo::common::SkeletonAnimation::GetName | ( | ) | const |
Returns the name.
unsigned int gazebo::common::SkeletonAnimation::GetNodeCount | ( | ) | const |
Returns the number of animation nodes.
math::Matrix4 gazebo::common::SkeletonAnimation::GetNodePoseAt | ( | const std::string & | _node, |
const double | _time, | ||
const bool | _loop = true |
||
) |
Returns the key frame transformation for a named animation at a specific time if a node does not exist at that time (with tolerance of 1e-6 sec), the transformation is interpolated.
[in] | _node | the name of the animation node |
[in] | _time | the time |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
std::map<std::string, math::Matrix4> gazebo::common::SkeletonAnimation::GetPoseAt | ( | const double | _time, |
const bool | _loop = true |
||
) | const |
Returns a dictionary of transformations indexed by name at a specific time if a node does not exist at that specific time (with tolerance of 1e-6 sec), the transformation is interpolated.
[in] | _time | the time |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
std::map<std::string, math::Matrix4> gazebo::common::SkeletonAnimation::GetPoseAtX | ( | const double | _x, |
const std::string & | _node, | ||
const bool | _loop = true |
||
) | const |
Returns a dictionary of transformations indexed by name where a named node transformation's translational value along the X axis is equal to _x.
[in] | _x | the value along x. You must ensure that _x is within a valid range. |
[in] | _node | the name of the animation node |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
bool gazebo::common::SkeletonAnimation::HasNode | ( | const std::string & | _node | ) | const |
Looks for a node with a specific name in the animations.
[in] | _node | the name of the node |
ignition::math::Matrix4d gazebo::common::SkeletonAnimation::NodePoseAt | ( | const std::string & | _node, |
const double | _time, | ||
const bool | _loop = true |
||
) |
Returns the key frame transformation for a named animation at a specific time if a node does not exist at that time (with tolerance of 1e-6 sec), the transformation is interpolated.
[in] | _node | the name of the animation node |
[in] | _time | the time |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
std::map<std::string, ignition::math::Matrix4d> gazebo::common::SkeletonAnimation::PoseAt | ( | const double | _time, |
const bool | _loop = true |
||
) | const |
Returns a dictionary of transformations indexed by name at a specific time if a node does not exist at that specific time (with tolerance of 1e-6 sec), the transformation is interpolated.
[in] | _time | the time |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
std::map<std::string, ignition::math::Matrix4d> gazebo::common::SkeletonAnimation::PoseAtX | ( | const double | _x, |
const std::string & | _node, | ||
const bool | _loop = true |
||
) | const |
Returns a dictionary of transformations indexed by name where a named node transformation's translational value along the X axis is equal to _x.
[in] | _x | the value along x. You must ensure that _x is within a valid range. |
[in] | _node | the name of the animation node |
[in] | _loop | when true, the time is divided by the duration (see GetLength) |
void gazebo::common::SkeletonAnimation::Scale | ( | const double | _scale | ) |
Scales every animation in the animations list.
[in] | _scale | the scaling factor |
void gazebo::common::SkeletonAnimation::SetName | ( | const std::string & | _name | ) |
Changes the name.
[in] | _name | the new name |
|
protected |
a dictionary of node animations
|
protected |
the duration of the longest animation
|
protected |
the node name