- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDSkinController Class Reference
[COLLADA Document Geometry Entity]

A COLLADA skin controller. More...

`#include <FCDSkinController.h>`

Inheritance diagram for FCDSkinController:

List of all members.

## Public Member Functions
| FCDSkinController (FCDocument *document, FCDController *parent)
| Constructor: do not use directly.
virtual | ~FCDSkinController ()
| Destructor.
FCDController * | GetParent ()
| Retrieves the parent entity for the morpher.
const FCDController * | GetParent () const
| See above.
FCDEntity * | GetTarget ()
| Retrieves the target entity.
const FCDEntity * | GetTarget () const
FUUri | GetTargetUri () const
| Retrieves the Uri to the skin target.
void | SetTargetUri (const FUUri &uri)
| Sets the URI of the target mesh.
void | SetTarget (FCDEntity *_target)
| Sets the target entity.
const FMMatrix44 & | GetBindShapeTransform () const
| Retrieves the bind-pose transform of the target entity.
void | SetBindShapeTransform (const FMMatrix44 &bindPose)
| Sets the bind-pose transform of the target entity.
size_t | GetJointCount () const
| Retrieves the number of joints that influence the skin.
void | SetJointCount (size_t count)
| Sets the number of joints that influence the skin.
FCDSkinControllerJoint * | GetJoints ()
| Retrieves the list of joints that influence the skin.
const FCDSkinControllerJoint * | GetJoints () const
| See above.
FCDSkinControllerJoint * | GetJoint (size_t index)
| Retrieves an indexed joint from the list of joints that influence this skin.
const FCDSkinControllerJoint * | GetJoint (size_t index) const
| See above.
FCDSkinControllerJoint * | AddJoint (const fm::string jSubId="", const FMMatrix44 &inverseBindPose=FMMatrix44::Identity)
| Adds a joint to influence the skin.
size_t | GetInfluenceCount () const
| Retrieves the number of vertices with influences defined in the skin controller.
void | SetInfluenceCount (size_t count)
| Sets the number of vertices with influences defined in the skin controller.
FCDSkinControllerVertex * | GetVertexInfluences ()
| Retrieves a list of the per-vertex influences for the skin.
const FCDSkinControllerVertex * | GetVertexInfluences () const
| See above.
FCDSkinControllerVertex * | GetVertexInfluence (size_t index)
| Retrieves the per-vertex influences for a given vertex.
const FCDSkinControllerVertex * | GetVertexInfluence (size_t index) const
| See above.
void | ReduceInfluences (uint32 maxInfluenceCount, float minimumWeight=0.0f)
| Reduces the number of joints influencing each vertex.

## 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.

## Member Function Documentation

FCDSkinControllerJoint* FCDSkinController::AddJoint | ( | const fm::string | jSubId = `""`,
|  | const FMMatrix44 & | inverseBindPose = `FMMatrix44::Identity`
| ) |

  | Adds a joint to influence the skin. Parameters:
  | jSubId | The sub-id of the scene node(s) that represent the joint.
  | inverseBindPose | The inverse bind-pose of the joint.

const FMMatrix44& FCDSkinController::GetBindShapeTransform | ( |  | ) | const`[inline]`

| Retrieves the bind-pose transform of the target entity. Returns: The bind-pose transform.

size_t FCDSkinController::GetInfluenceCount | ( |  | ) | const`[inline]`

| Retrieves the number of vertices with influences defined in the skin controller. Returns: The number of influenced vertices.

FCDSkinControllerJoint* FCDSkinController::GetJoint | ( | size_t | index | ) | `[inline]`

  | Retrieves an indexed joint from the list of joints that influence this skin. Parameters:
  | index | The index of the joint.
Returns: The joint at the given index.

size_t FCDSkinController::GetJointCount | ( |  | ) | const`[inline]`

| Retrieves the number of joints that influence the skin. Returns: The number of joints.

FCDSkinControllerJoint* FCDSkinController::GetJoints | ( |  | ) | `[inline]`

| Retrieves the list of joints that influence the skin. Returns: The list of joints that influence the skin.

FCDController* FCDSkinController::GetParent | ( |  | ) | `[inline]`

| Retrieves the parent entity for the morpher. Returns: The parent controller entity.

FCDEntity* FCDSkinController::GetTarget | ( |  | ) |

| Retrieves the target entity. This entity may be a geometric entity or another controller. Returns: The target entity.

FUUri FCDSkinController::GetTargetUri | ( |  | ) | const

| Retrieves the Uri to the skin target. This can be an internal or external link Returns: The uri to the target

FCDSkinControllerVertex* FCDSkinController::GetVertexInfluence | ( | size_t | index | ) | `[inline]`

  | Retrieves the per-vertex influences for a given vertex. Parameters:
  | index | The vertex index.
Returns: The per-vertex influences.

FCDSkinControllerVertex* FCDSkinController::GetVertexInfluences | ( |  | ) | `[inline]`

| Retrieves a list of the per-vertex influences for the skin. Returns: The list of per-vertex influences.

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::SetBindShapeTransform | ( | const FMMatrix44 & | bindPose | ) | `[inline]`

  | Sets the bind-pose transform of the target entity. Parameters:
  | bindPose | The bind-pose transform.

void FCDSkinController::SetInfluenceCount | ( | size_t | count | ) |

  | Sets the number of vertices with influences defined in the skin controller. Parameters:
  | count | The number of influences vertices.

void FCDSkinController::SetJointCount | ( | size_t | count | ) |

  | Sets the number of joints that influence the skin. Parameters:
  | count | The number of joints that influence the skin.

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.

void FCDSkinController::SetTargetUri | ( | const FUUri & | uri | ) |

  | Sets the URI of the target mesh. Parameters:
  | uri | The Uri to a local or external controller or geometry

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

- FCDocument/FCDSkinController.h