A skeleton.
More...
#include <common/common.hh>
|
void | BuildNodeMap () |
| Initializes the hande numbers for each node in the map using breadth first traversal.
|
|
gazebo::common::Skeleton::Skeleton |
( |
| ) |
|
virtual gazebo::common::Skeleton::~Skeleton |
( |
| ) |
|
|
virtual |
Add an animation.
The skeleton does not take ownership of the animation
- Parameters
-
[in] | _anim | the animation to add |
void gazebo::common::Skeleton::AddVertNodeWeight |
( |
unsigned int |
_vertex, |
|
|
std::string |
_node, |
|
|
double |
_weight |
|
) |
| |
Add a new weight to a node (bone)
- Parameters
-
[in] | _vertex | index of the vertex |
[in] | _node | name of the bone |
[in] | _weight | the new weight (range 0 to 1) |
void gazebo::common::Skeleton::BuildNodeMap |
( |
| ) |
|
|
protected |
Initializes the hande numbers for each node in the map using breadth first traversal.
Find animation.
- Parameters
-
[in] | _i | the animation index |
- Returns
- the animation, or NULL if _i is out of bounds
math::Matrix4 gazebo::common::Skeleton::GetBindShapeTransform |
( |
| ) |
|
Return bind pose skeletal transform.
- Returns
- a matrix
SkeletonNode* gazebo::common::Skeleton::GetNodeByHandle |
( |
unsigned int |
_handle | ) |
|
Find or create node with handle.
- Parameters
-
- Returns
- the node. A new node is created if it didn't exist
SkeletonNode* gazebo::common::Skeleton::GetNodeById |
( |
std::string |
_id | ) |
|
Find node by index.
- Parameters
-
- Returns
- the node, or NULL if not found
SkeletonNode* gazebo::common::Skeleton::GetNodeByName |
( |
std::string |
_name | ) |
|
Find a node.
- Parameters
-
[in] | _name | the name of the node to look for |
- Returns
- the node, or NULL if not found
NodeMap gazebo::common::Skeleton::GetNodes |
( |
| ) |
|
Get a copy or the node dictionary.
unsigned int gazebo::common::Skeleton::GetNumAnimations |
( |
| ) |
|
Returns the number of animations.
- Returns
- the count
unsigned int gazebo::common::Skeleton::GetNumJoints |
( |
| ) |
|
Returns the number of joints.
- Returns
- the count
unsigned int gazebo::common::Skeleton::GetNumNodes |
( |
| ) |
|
Returns the node count.
- Returns
- the count
unsigned int gazebo::common::Skeleton::GetNumVertNodeWeights |
( |
unsigned int |
_vertex | ) |
|
Returns the number of bone weights for a vertex.
- Parameters
-
[in] | _vertex | the index of the vertex |
- Returns
- the count
Return the root.
- Returns
- the root
std::pair<std::string, double> gazebo::common::Skeleton::GetVertNodeWeight |
( |
unsigned int |
_v, |
|
|
unsigned int |
_i |
|
) |
| |
Weight of a bone for a vertex.
- Parameters
-
[in] | _v | the index of the vertex |
[in] | _i | the index of the weight for that vertex |
- Returns
- a pair containing the name of the node and the weight
void gazebo::common::Skeleton::PrintTransforms |
( |
| ) |
|
Outputs the transforms to std::err stream.
void gazebo::common::Skeleton::Scale |
( |
double |
_scale | ) |
|
Scale all nodes, transforms and animation data.
- Parameters
-
void gazebo::common::Skeleton::SetBindShapeTransform |
( |
math::Matrix4 |
_trans | ) |
|
Set the bind pose skeletal transform.
- Parameters
-
void gazebo::common::Skeleton::SetNumVertAttached |
( |
unsigned int |
_vertices | ) |
|
Resizes the raw node weight array.
- Parameters
-
[in] | _vertices | the new size |
void gazebo::common::Skeleton::SetRootNode |
( |
SkeletonNode * |
_node | ) |
|
Change the root node.
- Parameters
-
the bind pose skeletal transform
NodeMap gazebo::common::Skeleton::nodes |
|
protected |
The dictionary of nodes, indexed by name.
The documentation for this class was generated from the following file: