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

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

# FCDControllerInstance Class Reference

A COLLADA controller instance. More...

`#include <FCDControllerInstance.h>`

Inheritance diagram for FCDControllerInstance:

List of all members.

## Public Member Functions
virtual | ~FCDControllerInstance ()
| Destructor.
virtual Type | GetType () const
| Retrieves the entity instance class type.
virtual FCDEntityInstance * | Clone (FCDEntityInstance *clone=NULL) const
| Clones the controller instance.
const FUUriList & | GetSkeletonRoots () const
| Retrieves a list of all the root joint ids for the controller.
FUUriList & | GetSkeletonRoots ()
void | FindSkeletonNodes (FCDSceneNodeList &skeletonNodes) const
| Retrieves a list of all the root scene nodes for the controller.
void | CalculateRootIds ()
| Calculate our skeleton roots, based on the node list we have.
size_t | GetJointCount () const
| Retrieves the number of joints used by this controller.
void | ResetJoints ()
| Reset the joint lists.
FCDSceneNode * | GetJoint (size_t index)
| Retrieves a specific joint.
const FCDSceneNode * | GetJoint (size_t index) const
| See above.
bool | AddJoint (FCDSceneNode *j)
| Adds an existing joint to the list of controller joints.
bool | FindJoint (const FCDSceneNode *joint) const
| Find a given joint in this skin instance. See above.
size_t | FindJointIndex (const FCDSceneNode *joint) const
| Find the index of the given joint in this skin instance.
void | RemoveJoint (size_t index)
| Removes a joint from the skin instance.
void | RemoveJoint (FCDSceneNode *joint)
| Removes a joint from the skin instance.
## Protected Member Functions
| FCDControllerInstance (FCDocument *document, FCDSceneNode *parent, FCDEntity::Type entityType=FCDEntity::CONTROLLER)
| Constructor: do not use directly.
## Friends
class | FCDEntityInstanceFactory

## Detailed Description

A COLLADA controller instance.

When a COLLADA controller is instantiated, all its target(s) are instantiated in order to use them for the rendering or the logic. As such, all the information necessary to instantiate a geometry is also necessary to instantiate a controller.

Each COLLADA skin controller should instantiate its own skeleton, for this reason, the skeleton root(s) are defined at instantiation.

A controller instance should define the skeleton root joint. Previously a FCDSkinController directly linked to its joints. We now read the skeletonRoot here, and call which means that the FCDSkinController should never try and know about its own nodes. It should all be linked through here.

## Constructor & Destructor Documentation

FCDControllerInstance::FCDControllerInstance | ( | FCDocument * | document,
|  | FCDSceneNode * | parent,
|  | FCDEntity::Type | entityType = `FCDEntity::CONTROLLER`
| ) | `[protected]`

  | Constructor: do not use directly. Instead, use the FCDSceneNode::AddInstance function. Parameters:
  | document | The COLLADA document that owns the controller instance.
  | parent | The parent visual scene node.
  | entityType | The type of the entity instantiate. Unless the class is overwritten, FCDEntity::CONTROLLER should be given.

## Member Function Documentation

bool FCDControllerInstance::AddJoint | ( | FCDSceneNode * | j | ) |

  | Adds an existing joint to the list of controller joints. Parameters:
  | j | A joint-typed scene node.

virtual FCDEntityInstance* FCDControllerInstance::Clone | ( | FCDEntityInstance * | clone = `NULL` | ) | const`[virtual]`

  | Clones the controller instance. Parameters:
  | clone | The controller instance to become the clone. If this pointer is NULL, a new controller instance will be created and you will need to release the returned pointer.
Returns: The clone. Reimplemented from FCDGeometryInstance.

bool FCDControllerInstance::FindJoint | ( | const FCDSceneNode * | joint | ) | const

  | Find a given joint in this skin instance. See above. Parameters:
  | joint | The joint.
Returns: true if the node is present, false if not.

size_t FCDControllerInstance::FindJointIndex | ( | const FCDSceneNode * | joint | ) | const

  | Find the index of the given joint in this skin instance. Parameters:
  | joint | The joint.
Returns: The joints index, else "(size_t) ~0" if not present.

void FCDControllerInstance::FindSkeletonNodes | ( | FCDSceneNodeList & | skeletonNodes | ) | const

  | Retrieves a list of all the root scene nodes for the controller. This list is generated with a call to this method. Parameters:
  | skeletonNodes | The list of parent Ids to fill in. This list is not cleared first.

FCDSceneNode* FCDControllerInstance::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 FCDControllerInstance::GetJointCount | ( |  | ) | const`[inline]`

| Retrieves the number of joints used by this controller. Joints only make sense when used with skin controllers. Defining the skeleton root affects the actual joints, but not the joint sids. Returns: The number of joints used by this controller.

const FUUriList& FCDControllerInstance::GetSkeletonRoots | ( |  | ) | const`[inline]`

| Retrieves a list of all the root joint ids for the controller. Returns: List of parent Ids

virtual Type FCDControllerInstance::GetType | ( |  | ) | const`[inline, virtual]`

| Retrieves the entity instance class type. This is used to determine the up-class for the entity instance object. Deprecated: Instead use: FCDEntityInstance::HasType(FCDController::GetClassType()) Returns: The class type: CONTROLLER. Reimplemented from FCDGeometryInstance.

void FCDControllerInstance::RemoveJoint | ( | FCDSceneNode * | joint | ) | `[inline]`

  | Removes a joint from the skin instance. Parameters:
  | joint | The joint to remove.

void FCDControllerInstance::RemoveJoint | ( | size_t | index | ) | `[inline]`

  | Removes a joint from the skin instance. Parameters:
  | index | The index of the joint to remove.

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

- FCDocument/FCDControllerInstance.h