GPU-Accelerated Coverage  0.1.0
Compute coverage tours for known environment with articulated objects on GPU
Public Member Functions | Protected Attributes | List of all members
gpu_coverage::Bone Class Reference

Represents a bone of an animation skeleton. More...

#include <Bone.h>

Public Member Functions

 Bone (const aiBone *const bone, const size_t meshId, const size_t id)
 Constructor. More...
 
virtual ~Bone ()
 Destructor.
 
void toDot (FILE *dot)
 Write Graphviz Dot node representing this bone to file for debugging. More...
 
const size_t & getId () const
 
const size_t & getMeshId () const
 
const std::string & getName () const
 
const glm::mat4 & getOffsetMatrix ()
 
void setNode (Node *node)
 
NodegetNode () const
 

Protected Attributes

const size_t id
 Unique ID of the bone, see getId().
 
const size_t meshId
 ID of the mesh that this bone is attached to, see getMeshId().
 
const std::string name
 Name of the bone for logging, see getName().
 
const glm::mat4 offsetMatrix
 Offset matrix, see getOffsetMatrix().
 
Nodenode
 Scene graph node assigned to this bone, see getNode() and setNode().
 

Detailed Description

Represents a bone of an animation skeleton.

This class is our equivalent of Assimp's aiBone class.

Constructor & Destructor Documentation

gpu_coverage::Bone::Bone ( const aiBone *const  bone,
const size_t  meshId,
const size_t  id 
)

Constructor.

Parameters
[in]boneThe Assimp aiBone for creating this bone.
[in]meshIdThe ID of the mesh that this bone is attached to.
[in]idThe unique ID of this bone.

Member Function Documentation

const size_t& gpu_coverage::Bone::getId ( ) const
inline

Returns the unique ID of this bone.

Returns
ID.
const size_t& gpu_coverage::Bone::getMeshId ( ) const
inline

Returns the ID of the mesh that this bone is attached to.

Returns
Mesh ID.
const std::string& gpu_coverage::Bone::getName ( ) const
inline

Returns the name of this bone for logging.

Returns
Name of this bone.

If available, the name included in the input file read by Assimp is used, otherwise a generic string is constructed.

Node* gpu_coverage::Bone::getNode ( ) const
inline

Returns the scene graph node that this bone is attached to.

Returns
The scene graph node.

Initially the node is set to NULL, can be set with setNode(Node *node).

const glm::mat4& gpu_coverage::Bone::getOffsetMatrix ( )
inline

Returns the offset matrix.

Returns
Offset matrix.

The offset matrix transforms from mesh space to bone space in bind pose (see Assimp aiBone documentation).

void gpu_coverage::Bone::setNode ( Node node)
inline

Assigns this bone to a scene graph node.

Parameters
[in]nodeScene graph node.
void gpu_coverage::Bone::toDot ( FILE *  dot)

Write Graphviz Dot node representing this bone to file for debugging.

Parameters
[in]dotOutput Dot file.

The documentation for this class was generated from the following file: