CCDIKSolver

A solver for IK with CCD Algorithm.

CCDIKSolver solves Inverse Kinematics Problem with CCD Algorithm. CCDIKSolver is designed to work with SkinnedMesh loaded by MMDLoader but also can be used for generic SkinnedMesh.

Example

var ikSolver; // Load MMD resources and instantiate CCDIKSolver new v3d.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); } webgl_loader_mmd
webgl_loader_mmd_pose
webgl_loader_mmd_audio


Constructor

CCDIKSolver(mesh : SkinnedMesh, iks : Array)

meshSkinnedMesh for which CCDIKSolver solves IK problem.
iks — An array of 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.

Creates a new CCDIKSolver.

Properties

.iks : Array

An array of IK parameter passed to the constructor.

.mesh : SkinnedMesh

SkinnedMesh passed to the constructor.

Methods

.createHelper () : CCDIKHelper

Return CCDIKHelper. You can visualize IK bones by adding the helper to scene.

.update () : CCDIKSolver

Update bones quaternion by solving CCD algorithm.

Source

For more info on how to obtain the source code of this module see this page.