Public Member Functions | Protected Member Functions | Friends

sp::scene::AnimationJoint Class Reference
[Animation System]

#include <spAnimationJoint.hpp>

Inheritance diagram for sp::scene::AnimationJoint:
sp::BaseObject

List of all members.

Public Member Functions

 AnimationJoint (const Transformation &OriginTransform, const io::stringc Name="")
virtual ~AnimationJoint ()
virtual dim::matrix4f getGlobalTransformation () const
 Returns the global joint transformation.
virtual dim::matrix4f getVertexTransformation () const
 Returns the final vertex transformation. Use this to transform the vertices by yourself.
void setEnable (bool Enable)
bool getEnable () const
AnimationJointgetParent () const
 Returns a pointer to the AnimationJoint parent object.
void setVertexGroups (const std::vector< SVertexGroup > &VertexGroups)
 Sets the vertex groups list.
const std::vector< SVertexGroup > & getVertexGroups () const
std::vector< SVertexGroup > & getVertexGroups ()
void setOriginTransformation (const Transformation &Transform)
 Sets the new (local) origin transformation. Internally the origin transformation is stored as inverse matrix.
Transformation getOriginTransformation () const
void setTransformation (const Transformation &Transform)
 Sets the new (local) current transformation.
const TransformationgetTransformation () const
TransformationgetTransformation ()
dim::matrix4f getOriginMatrix () const
 Returns the final origin matrix which will be computed when the "AnimationSkeleton::updateSkeleton" function is called.
const std::vector
< AnimationJoint * > & 
getChildren () const
 Returns the joint children list.

Protected Member Functions

void transformVertices (scene::Mesh *MeshObj, dim::matrix4f BaseMatrix, bool useTangentSpace) const
bool checkParentIncest (AnimationJoint *Joint) const
void setParent (AnimationJoint *Parent)
void addChild (AnimationJoint *Child)
void removeChild (AnimationJoint *Child)

Friends

class AnimationSkeleton

Detailed Description

Animation joints are the foundation of animation skeletons (used for skeletal animations).

See also:
AnimationSkeleton.

Constructor & Destructor Documentation

sp::scene::AnimationJoint::AnimationJoint ( const Transformation OriginTransform,
const io::stringc  Name = "" 
)
sp::scene::AnimationJoint::~AnimationJoint (  )  [virtual]

Member Function Documentation

void sp::scene::AnimationJoint::addChild ( AnimationJoint Child  )  [inline, protected]
bool sp::scene::AnimationJoint::checkParentIncest ( AnimationJoint Joint  )  const [protected]
const std::vector<AnimationJoint*>& sp::scene::AnimationJoint::getChildren (  )  const [inline]

Returns the joint children list.

bool sp::scene::AnimationJoint::getEnable (  )  const [inline]
dim::matrix4f sp::scene::AnimationJoint::getGlobalTransformation (  )  const [virtual]

Returns the global joint transformation.

dim::matrix4f sp::scene::AnimationJoint::getOriginMatrix (  )  const [inline]

Returns the final origin matrix which will be computed when the "AnimationSkeleton::updateSkeleton" function is called.

Transformation sp::scene::AnimationJoint::getOriginTransformation (  )  const [inline]
AnimationJoint* sp::scene::AnimationJoint::getParent (  )  const [inline]

Returns a pointer to the AnimationJoint parent object.

Transformation& sp::scene::AnimationJoint::getTransformation (  )  [inline]
const Transformation& sp::scene::AnimationJoint::getTransformation (  )  const [inline]
std::vector<SVertexGroup>& sp::scene::AnimationJoint::getVertexGroups (  )  [inline]
const std::vector<SVertexGroup>& sp::scene::AnimationJoint::getVertexGroups (  )  const [inline]
dim::matrix4f sp::scene::AnimationJoint::getVertexTransformation (  )  const [virtual]

Returns the final vertex transformation. Use this to transform the vertices by yourself.

void sp::scene::AnimationJoint::removeChild ( AnimationJoint Child  )  [inline, protected]
void sp::scene::AnimationJoint::setEnable ( bool  Enable  )  [inline]

Enables or disables the bone. If disabled the bone won't be transformed automatically by the animation but you can still transform it manual. By default enabled.

Todo:
RENAME this to "setAutoTransform"
void sp::scene::AnimationJoint::setOriginTransformation ( const Transformation Transform  )  [inline]

Sets the new (local) origin transformation. Internally the origin transformation is stored as inverse matrix.

void sp::scene::AnimationJoint::setParent ( AnimationJoint Parent  )  [inline, protected]
void sp::scene::AnimationJoint::setTransformation ( const Transformation Transform  )  [inline]

Sets the new (local) current transformation.

void sp::scene::AnimationJoint::setVertexGroups ( const std::vector< SVertexGroup > &  VertexGroups  )  [inline]

Sets the vertex groups list.

void sp::scene::AnimationJoint::transformVertices ( scene::Mesh MeshObj,
dim::matrix4f  BaseMatrix,
bool  useTangentSpace 
) const [protected]

Transforms the vertices of the specified Mesh object. Which vertices will be transformed depends on the bone's vertex groups.

Parameters:
[in] MeshObj Specifies the mesh object which vertices are to be transformed. This pointer must never be null!
[in] BaseMatrix,: Specifies the base matrix transformation. If the bone has a parent this matrix should be its parent's matrix transformation.
[in] useTangentSpace,: Specifies whether tanget space is used or not.
Note:
The pointer is not checked for validity!

Friends And Related Function Documentation

friend class AnimationSkeleton [friend]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines