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

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

# FCDMorphController Class Reference
[COLLADA Document Geometry Entity]

A COLLADA morpher. More...

`#include <FCDMorphController.h>`

Inheritance diagram for FCDMorphController:

List of all members.

## Public Member Functions
| FCDMorphController (FCDocument *document, FCDController *parent)
| Constructor: do not use directly.
virtual | ~FCDMorphController ()
| Destructor.
FCDController * | GetParent ()
| Retrieves the parent entity for the morpher.
const FCDController * | GetParent () const
| See above.
FCDEntity * | GetBaseTarget ()
| Retrieves the base entity controlled by this morpher.
const FCDEntity * | GetBaseTarget () const
| See above.
void | SetBaseTarget (FCDEntity *entity)
| Sets the base entity controlled by this morpher.
| DEPRECATED (3.05A, GetTargetCount and GetTarget(index)) void GetTargets() const
| Retrieves the list of the morph targets.
size_t | GetTargetCount () const
| Retrieves the number of morph targets.
FCDMorphTarget * | GetTarget (size_t index)
| Retrieves a specific morph target.
const FCDMorphTarget * | GetTarget (size_t index) const
| See above.
FCDMorphTarget * | AddTarget (FCDGeometry *geometry=NULL, float weight=0.0f)
| Adds a new morph target.
FUDaeMorphMethod::Method | GetMethod () const
| Retrieves the method used to interpolate between the different morph targets.
void | SetMethod (FUDaeMorphMethod::Method _method)
| Sets the method used to interpolate between the different morph targets.
bool | IsSimilar (FCDEntity *entity)
| Retrieves whether a given entity is similar to the base target.

## Detailed Description

A COLLADA morpher.

A morpher holds a base geometry and a set of morph targets that contains a geometry and a weight. The geometry must be similar to the base geometry and the weights are used to interpolate the vertex positions of the base geometry. To be similar, two meshes must have the same number of vertices and two splines must have the same number of control points. The morphing weights can be animated.

There are two interpolation functions defined in COLLADA. See the FUDaeMorphMethod::Method enumerated type for more information.

See also:
  FCDMorphTarget FUDaeMorphMethod

## Constructor & Destructor Documentation

FCDMorphController::FCDMorphController | ( | FCDocument * | document,
|  | FCDController * | parent
| ) |

  | Constructor: do not use directly. Instead, use the FCDController::CreateMorphController function. Parameters:
  | document | The COLLADA document that owns the morpher.
  | parent | The COLLADA controller that contains this morpher.

## Member Function Documentation

FCDMorphTarget* FCDMorphController::AddTarget | ( | FCDGeometry * | geometry = `NULL`,
|  | float | weight = `0.0f`
| ) |

  | Adds a new morph target. Parameters:
  | geometry | The morph target geometry.
  | weight | The morphing weight.
Returns: The new morph target.

FCDMorphController::DEPRECATED | ( | 3. | 05A,
|  | GetTargetCount and | GetTarget(index)
| ) | const`[inline]`

| Retrieves the list of the morph targets. All the morph target geometries should be similar to the base entity. Returns: The morph targets.

FCDEntity* FCDMorphController::GetBaseTarget | ( |  | ) | `[inline]`

| Retrieves the base entity controlled by this morpher. This entity may be a geometry or another controller. Returns: The base target.

FUDaeMorphMethod::Method FCDMorphController::GetMethod | ( |  | ) | const`[inline]`

| Retrieves the method used to interpolate between the different morph targets. Returns: The interpolation method.

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

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

FCDMorphTarget* FCDMorphController::GetTarget | ( | size_t | index | ) | `[inline]`

  | Retrieves a specific morph target. Parameters:
  | index | The index of the morph target.
Returns: The morph target. This pointer will be NULL if the index is out-of-bounds.

size_t FCDMorphController::GetTargetCount | ( |  | ) | const`[inline]`

| Retrieves the number of morph targets. Returns: The number of morph targets.

bool FCDMorphController::IsSimilar | ( | FCDEntity * | entity | ) |

  | Retrieves whether a given entity is similar to the base target. Entities must be similar to be able to morph between them. Parameters:
  | entity | An entity.
Returns: Whether the given entity is similar to the base target.

void FCDMorphController::SetBaseTarget | ( | FCDEntity * | entity | ) |

  | Sets the base entity controlled by this morpher. This entity may be a geometry or another controller. Since the morph targets must be similar to this entity, all the morph targets that are not similar to the new base entity will be removed. Parameters:
  | entity | The new base entity.

void FCDMorphController::SetMethod | ( | FUDaeMorphMethod::Method | _method | ) | `[inline]`

  | Sets the method used to interpolate between the different morph targets. Parameters:
  | _method | The interpolation method.

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

- FCDocument/FCDMorphController.h