# [name]

A solver for IK with CCD Algorithm.
[name] solves Inverse Kinematics Problem with CCD Algorithm. [name] is designed to work with [page:SkinnedMesh] loaded by [page:MMDLoader] but also can be used for generic [page:SkinnedMesh].

## Example

`var ikSolver; // Load MMD resources and instantiate CCDIKSolver new THREE.MMDLoader().load( 'models/mmd/miku.pmd', function ( mesh ) { ikSolver = new CCDIKSolver( mesh, mesh.geometry.iks ); scene.add( mesh ); } ); function render() { animate(); // update bones if ( ikSolver !== undefined ) ikSolver.update(); renderer.render( scene, camera ); }` [example:webgl_loader_mmd]
[example:webgl_loader_mmd_pose]
[example:webgl_loader_mmd_audio]

## Constructor

### [name]( [param:SkinnedMesh mesh], [param:Array iks] )

[page:SkinnedMesh mesh] — [page:SkinnedMesh] for which [name] solves IK problem.
[page:Array iks] — An array of [page:Object] specifying IK parameter. target, effector, and link-index are index integers in .skeleton.bones. The bones relation should be "links[ n ], links[ n - 1 ], ..., links[ 0 ], effector" in order from parent to child.

- [page:Integer target] — Target bone.
- [page:Integer effector] — Effector bone.
- [page:Array links] — An array of [page: Object] specifying link bones.
  - [page:Integer index] — Link bone.
  - [page:Vector3 limitation] — (optional) Rotation axis. Default is undefined.
  - [page:Vector3 rotationMin] — (optional) Rotation minimum limit. Default is undefined.
  - [page:Vector3 rotationMax] — (optional) Rotation maximum limit. Default is undefined.
  - [page:Boolean enabled] — (optional) Default is true.
- [page:Integer iteration] — (optional) Iteration number of calculation. Smaller is faster but less precise. Default is 1.
- [page:Number minAngle] — (optional) Minimum rotation angle in a step. Default is undefined.
- [page:Number maxAngle] — (optional) Maximum rotation angle in a step. Default is undefined.

Creates a new [name].

## Properties

### [property:Array iks]

An array of IK parameter passed to the constructor.

### [property:SkinnedMesh mesh]

[page:SkinnedMesh] passed to the constructor.

## Methods

### [method:CCDIKHelper createHelper]()

Return [page:CCDIKHelper]. You can visualize IK bones by adding the helper to scene.

### [method:CCDIKSolver update]()

Update bones quaternion by solving CCD algorithm.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/CCDIKSolver.js examples/js/animation/CCDIKSolver.js]