FCDSkinController Class Reference
[COLLADA Document Geometry Entity]

A COLLADA skin controller. More...

#include <FCDSkinController.h>

Inheritance diagram for FCDSkinController:

FCDObject FUObject List of all members.

Public Member Functions

 FCDSkinController (FCDocument *document, FCDController *parent)
 Constructor: do not use directly.
virtual ~FCDSkinController ()
 Destructor: do not use directly.
FCDEntityGetTarget ()
 Retrieves the target entity.
const FCDEntityGetTarget () const
 See above.
void SetTarget (FCDEntity *_target)
 Sets the target entity.
const FMMatrix44GetBindShapeTransform () const
 Retrieves the bind-pose transform of the target entity.
void SetBindShapeTransform (const FMMatrix44 &bindPose)
 Sets the bind-pose transform of the target entity.
FCDJointListGetJoints ()
 Retrieves a list of the joints that influence this skin.
const FCDJointListGetJoints () const
 See above.
size_t GetJointCount () const
 Retrieves the number of joints that influence the skin.
FCDJointMatrixPairGetJoint (size_t index)
 Retrieves a specific joint.
const FCDJointMatrixPairGetJoint (size_t index) const
 See above.
FCDJointMatrixPairFindJoint (FCDSceneNode *joint)
 Retrieves the information specific to a given joint.
const FCDJointMatrixPairFindJoint (const FCDSceneNode *joint) const
 See above.
void AddJoint (FCDSceneNode *joint, const FMMatrix44 &bindPose)
 Adds a joint and its bind-pose to the list of joint influencing the skin.
void RemoveJoint (FCDSceneNode *joint)
 Removes a joint from the list of joints influencing the skin.
FCDWeightedMatchesGetWeightedMatches ()
 Retrieves a list of the per-vertex influences for the skin.
const FCDWeightedMatchesGetWeightedMatches () const
 See above.
FCDWeightedMatchesGetVertexInfluences ()
 Retrieves a list of the per-vertex influences for the skin.
const FCDWeightedMatchesGetVertexInfluences () const
 See above.
size_t GetVertexInfluenceCount () const
 Retrieves the number of per-vertex influences.
FCDJointWeightPairListGetInfluences (size_t index)
 Retrieves the per-vertex influences for a given vertex.
const FCDJointWeightPairListGetInfluences (size_t index) const
 See above.
void ReduceInfluences (uint32 maxInfluenceCount, float minimumWeight=0.0f)
 Reduces the number of joints influencing each vertex.
FUStatus LoadFromXML (xmlNode *skinNode)
 [INTERNAL] Reads in the <skin> element from a given COLLADA XML tree node.
xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the <skin> element to the given COLLADA XML tree node.
FUStatus Link ()
 [INTERNAL] Links the skin with its joints.

Detailed Description

A COLLADA skin controller.

The skin controller holds the information to skin a geometric object. That information includes a target/base entity and its bind-pose matrix, a list of joints and their bind pose and the influences for the joints.

The influences are a list, for each vertex of the target entity, of which joints affect the vertex and by how much.


Constructor & Destructor Documentation

FCDSkinController::FCDSkinController FCDocument document,
FCDController parent
 

Constructor: do not use directly.

Instead, use the FCDController::CreateSkinController function.

Parameters:
document The COLLADA document that owns the skin.
parent The COLLADA controller that contains this skin.

virtual FCDSkinController::~FCDSkinController  )  [virtual]
 

Destructor: do not use directly.

Instead, release the parent controller or create a new skin/morpher.


Member Function Documentation

void FCDSkinController::AddJoint FCDSceneNode joint,
const FMMatrix44 bindPose
 

Adds a joint and its bind-pose to the list of joint influencing the skin.

Parameters:
joint The joint.
bindPose The joint's bind-pose. This matrix will be inverted by this function.

FCDJointMatrixPair* FCDSkinController::FindJoint FCDSceneNode joint  ) 
 

Retrieves the information specific to a given joint.

Parameters:
joint The joint.
Returns:
The information specific to this joint. This pointer will be NULL if the given joint does not influence this skin.

const FMMatrix44& FCDSkinController::GetBindShapeTransform  )  const [inline]
 

Retrieves the bind-pose transform of the target entity.

Returns:
The bind-pose transform.

FCDJointWeightPairList* FCDSkinController::GetInfluences size_t  index  )  [inline]
 

Retrieves the per-vertex influences for a given vertex.

Parameters:
index The vertex index.
Returns:
The per-vertex influences.

FCDJointMatrixPair* FCDSkinController::GetJoint size_t  index  )  [inline]
 

Retrieves a specific joint.

Parameters:
index The index of the joint.
Returns:
The joint. This pointer will be NULL, if the index is out-of-bounds.

size_t FCDSkinController::GetJointCount  )  const [inline]
 

Retrieves the number of joints that influence the skin.

Returns:
The number of joints.

FCDJointList& FCDSkinController::GetJoints  )  [inline]
 

Retrieves a list of the joints that influence this skin.

Returns:
The list of joints.

FCDEntity* FCDSkinController::GetTarget  )  [inline]
 

Retrieves the target entity.

This entity may be a geometric entity or another controller.

Returns:
The target entity.

size_t FCDSkinController::GetVertexInfluenceCount  )  const [inline]
 

Retrieves the number of per-vertex influences.

This value should be equal to the number of vertices/control points within the target geometric entity.

Returns:
The number of per-vertex influences.

FCDWeightedMatches& FCDSkinController::GetVertexInfluences  )  [inline]
 

Retrieves a list of the per-vertex influences for the skin.

You should not modify the size of the list. Instead, use the SetTarget function.

Returns:
The list of per-vertex influences.

FCDWeightedMatches& FCDSkinController::GetWeightedMatches  )  [inline]
 

Retrieves a list of the per-vertex influences for the skin.

You should not modify the size of the list. Instead, use the SetTarget function.

Deprecated:
Will be replaces by GetVertexInfluences.
Returns:
The list of per-vertex influences.

FUStatus FCDSkinController::Link  ) 
 

[INTERNAL] Links the skin with its joints.

Since the scene graph is imported after the controllers, this function is used to link the skin with its joints.

Returns:
The status of the linkage.

FUStatus FCDSkinController::LoadFromXML xmlNode *  skinNode  ) 
 

[INTERNAL] Reads in the <skin> element from a given COLLADA XML tree node.

Parameters:
skinNode The COLLADA XML tree node.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the skin.

void FCDSkinController::ReduceInfluences uint32  maxInfluenceCount,
float  minimumWeight = 0.0f
 

Reduces the number of joints influencing each vertex.

1) All the influences with a weight less than the minimum will be removed. 2) If a vertex has more influences than the given maximum, they will be sorted and the most important influences will be kept. If some of the influences for a vertex are removed, the weight will be normalized.

Parameters:
maxInfluenceCount The maximum number of influence to keep for each vertex.
minimumWeight The smallest weight to keep.

void FCDSkinController::RemoveJoint FCDSceneNode joint  ) 
 

Removes a joint from the list of joints influencing the skin.

All the per-vertex influences that use this joint will be removed.

Parameters:
joint The joint.

void FCDSkinController::SetBindShapeTransform const FMMatrix44 bindPose  )  [inline]
 

Sets the bind-pose transform of the target entity.

Parameters:
bindPose The bind-pose transform.

void FCDSkinController::SetTarget FCDEntity _target  ) 
 

Sets the target entity.

This function has very important ramifications, as the number of vertices may change. The influences list will be modified to follow the number of vertices. This entity may be a geometric entity or another controller.

Parameters:
_target The target entity.

xmlNode* FCDSkinController::WriteToXML xmlNode *  parentNode  )  const
 

[INTERNAL] Writes out the <skin> element to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the skin information.
Returns:
The created element XML tree node.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:43 2006 for FCollada by  doxygen 1.4.6-NO