CS::Animation::iSkeletonIKCCDNodeFactory Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::Animation::iSkeletonIKCCDNodeFactory Struct Reference

An implementation of the CS::Animation::iSkeletonIKNodeFactory based on a quaternion version of the Cyclic Coordinate Descent algorithm. More...

`#include <imesh/animnode/ik.h>`

Inheritance diagram for CS::Animation::iSkeletonIKCCDNodeFactory:

List of all members.

## Public Member Functions
virtual bool | GetJointInitialization ()=0
| Get whether the rotation of each joint must be initialized with the value from the child node.
virtual size_t | GetMaximumIterations ()=0
| Get the maximum number of iterations that can be done before the algorithm stops.
virtual float | GetMotionRatio ()=0
| Get the portion of the rotation that has to be applied at each joint at each iteration of the algorithm.
virtual float | GetTargetDistance ()=0
| Get the minimum distance between the target and the effector that has to be reached before the algorithm stops.
virtual bool | GetUpwardIterations ()=0
| Get whether or not the joints should be iterated upward, from the leaf node to the parent node.
virtual void | SetJointInitialization (bool initialized)=0
| Set whether the rotation of each joint must be initialized with the value from the child node.
virtual void | SetMaximumIterations (size_t max)=0
| Set the maximum number of iterations that can be done before the algorithm stops.
virtual void | SetMotionRatio (float ratio)=0
| Set the portion of the rotation that has to be applied at each joint at each iteration of the algorithm.
virtual void | SetTargetDistance (float distance)=0
| Set the minimum distance between the target and the effector that has to be reached before the algorithm stops.
virtual void | SetUpwardIterations (bool upward)=0
| Set whether or not the joints should be iterated upward, from the leaf node to the parent node.

## Detailed Description

An implementation of the CS::Animation::iSkeletonIKNodeFactory based on a quaternion version of the Cyclic Coordinate Descent algorithm.

The general behavior of the CCD algorithm is to iterate over each bone of the chain, and apply a portion of the rotation needed to get the effector closer to the target.

The CCD algorithm is the most common algorithm for Inverse Kinematics because it is simple and rather efficient. One of the main disadvantage is that it is not stable in the sense that a small change to the configuration of the IK target can lead to a big change in the result of the algorithm.

Warning:
  The current implementation does not care about the rotational component of the constraints.
  The current implementation can only manage one constraint per chain.

See also:
  iSkeletonIKNodeFactory

Definition at line 268 of file ik.h.

## Member Function Documentation

virtual bool CS::Animation::iSkeletonIKCCDNodeFactory::GetJointInitialization | ( |  | ) | `[pure virtual]`

Get whether the rotation of each joint must be initialized with the value from the child node.

This can be used to achieve more realistic results by directing the motion, but it can also generate less stable results.

virtual size_t CS::Animation::iSkeletonIKCCDNodeFactory::GetMaximumIterations | ( |  | ) | `[pure virtual]`

Get the maximum number of iterations that can be done before the algorithm stops.

virtual float CS::Animation::iSkeletonIKCCDNodeFactory::GetMotionRatio | ( |  | ) | `[pure virtual]`

Get the portion of the rotation that has to be applied at each joint at each iteration of the algorithm.

virtual float CS::Animation::iSkeletonIKCCDNodeFactory::GetTargetDistance | ( |  | ) | `[pure virtual]`

Get the minimum distance between the target and the effector that has to be reached before the algorithm stops.

virtual bool CS::Animation::iSkeletonIKCCDNodeFactory::GetUpwardIterations | ( |  | ) | `[pure virtual]`

Get whether or not the joints should be iterated upward, from the leaf node to the parent node.

Iterating upward favours the motion for the end nodes to the detriment of the root nodes.

virtual void CS::Animation::iSkeletonIKCCDNodeFactory::SetJointInitialization | ( | bool | initialized | ) | `[pure virtual]`

Set whether the rotation of each joint must be initialized with the value from the child node.

This can be used to achieve more realistic results by directing the motion, but it can also generate less stable results. The default value is true.

virtual void CS::Animation::iSkeletonIKCCDNodeFactory::SetMaximumIterations | ( | size_t | max | ) | `[pure virtual]`

Set the maximum number of iterations that can be done before the algorithm stops.

The default value is 50.

virtual void CS::Animation::iSkeletonIKCCDNodeFactory::SetMotionRatio | ( | float | ratio | ) | `[pure virtual]`

Set the portion of the rotation that has to be applied at each joint at each iteration of the algorithm.

The value should be kept bigger than 0.0, and smaller or equal to 1.0. The default value is 0.1.

virtual void CS::Animation::iSkeletonIKCCDNodeFactory::SetTargetDistance | ( | float | distance | ) | `[pure virtual]`

Set the minimum distance between the target and the effector that has to be reached before the algorithm stops.

The default value is 0.001.

virtual void CS::Animation::iSkeletonIKCCDNodeFactory::SetUpwardIterations | ( | bool | upward | ) | `[pure virtual]`

Set whether or not the joints should be iterated upward, from the leaf node to the parent node.

Iterating upward favours the motion for the end nodes to the detriment of the root nodes. The default value is true.

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

- imesh/animnode/ik.h