Skip to content

Documentation / scene / IKConstraint

Abstract Class: IKConstraint ​

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:11

Base class for IK constraints.

Constraints are applied after each FABRIK iteration to enforce joint limitations (angle limits, pole vectors, etc.).

Extended by ​

Constructors ​

Constructor ​

new IKConstraint(jointIndex): IKConstraint

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:20

Create an IK constraint.

Parameters ​

jointIndex ​

number

Index of the joint in the chain (0 = root)

Returns ​

IKConstraint

Properties ​

_jointIndex ​

protected _jointIndex: number

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:13

The joint index this constraint applies to

Accessors ​

jointIndex ​

Get Signature ​

get jointIndex(): number

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:27

Get the joint index this constraint applies to.

Returns ​

number

Methods ​

apply() ​

abstract apply(joints): void

Defined in: libs/scene/src/animation/ik/ik_constraint.ts:38

Apply the constraint to the joint chain.

This method modifies joint positions to satisfy the constraint.

Parameters ​

joints ​

IKJoint[]

Array of all joints in the chain

Returns ​

void

Released under the MIT License.