Skeleton.hh
Go to the documentation of this file.
A skeleton, usually used for animation purposes.
Definition: Skeleton.hh:40
void AddVertNodeWeight(const unsigned int _vertex, const std::string &_node, const double _weight)
Add a new weight to a node (bone)
void SetNumVertAttached(const unsigned int _vertices)
Resizes the raw node weight array.
std::string NodeNameAnimToSkin(unsigned int _index, const std::string &_animNodeName)
Finding the skin node name that corresponds to the given animation node name.
bool AddBvhAnimation(const std::string &_bvhFile, double _scale)
Add an animation from BVH file.
void AddAnimation(SkeletonAnimation *_anim)
Add an animation. The skeleton does not take ownership of the animation.
math::Matrix4d AlignTranslation(unsigned int _index, const std::string &_animNodeName)
Get the transformation to align translation from the animation skeleton to skin skeleton.
SkeletonNode * NodeByHandle(const unsigned int _handle) const
Find or create node with handle.
void PrintTransforms() const
Outputs the transforms to standard out.
math::Matrix4d AlignRotation(unsigned int _index, const std::string &_animNodeName)
Get the transformation to align rotation from the animation skeleton to skin skeleton.
unsigned int VertNodeWeightCount(const unsigned int _vertex) const
Returns the number of bone weights for a vertex.
void Scale(const double _scale)
Scale all nodes, transforms and animation data.
unsigned int AnimationCount() const
Returns the number of animations.
const SkeletonNodeMap & Nodes() const
Get a copy or the node dictionary.
SkeletonAnimation * Animation(const unsigned int _i) const
Find animation.
void SetBindShapeTransform(const math::Matrix4d &_trans)
Set the bind pose skeletal transform.
SkeletonNode * NodeById(const std::string &_id) const
Find node by index.
math::Matrix4d BindShapeTransform() const
Return bind pose skeletal transform.
std::pair< std::string, double > VertNodeWeight(const unsigned int _v, const unsigned int _i) const
Weight of a bone for a vertex.
SkeletonNode * NodeByName(const std::string &_name) const
Find a node.
Forward declarations for the common classes.