Stores the setup pose for an {@link IkConstraint}.

See IK constraints in the Spine User Guide.

Constructor

new(name:String)

Variables

@:value(new Array())bones:Array<BoneData> = new Array()

@:value(1)bendDirection:Int = 1

@:value(false)compress:Bool = false

@:value(false)stretch:Bool = false

@:value(false)uniform:Bool = false

@:value(1)mix:Float = 1

@:value(0)softness:Float = 0

Methods

getBones():Array<BoneData>

The bones that are constrained by this IK constraint.

getTarget():BoneData

The bone that is the IK target.

getMix():Float

A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.

For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0.

getSoftness():Float

For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones will not straighten completely until the target is this far out of range.

getBendDirection():Int

For two bone IK, controls the bend direction of the IK bones, either 1 or -1.

setBendDirection(bendDirection:Int):Void

getCompress():Bool

For one bone IK, when true and the target is too close, the bone is scaled to reach it.

getStretch():Bool

When true and the target is out of range, the parent bone is scaled to reach it.

For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link #getSoftness()} is

0, and 3) if the parent bone has local nonuniform scale, stretch is not applied.

getUniform():Bool

When true and {@link #getCompress()} or {@link #getStretch()} is used, the bone is scaled on both the X and Y axes.

Inherited Variables

Defined by ConstraintData

@:value(0)order:Int = 0

@:value(false)skinRequired:Bool = false

Inherited Methods

Defined by ConstraintData

getName():String

The constraint's name, which is unique across all constraints in the skeleton of the same type.

getOrder():Int

The ordinal of this constraint for the order a skeleton's constraints will be applied by {@link Skeleton#updateWorldTransform()}.

getSkinRequired():Bool

When true, {@link Skeleton#updateWorldTransform()} only updates this constraint if the {@link Skeleton#getSkin()} contains this constraint.

See {@link Skin#getConstraints()}.

setSkinRequired(skinRequired:Bool):Void