BonePose class

The applied local pose and world transform for a bone. This is the bone's unconstrained pose with constraints applied and the world transform computed by Skeleton::updateWorldTransform(Physics) and updateWorldTransform(Skeleton).

If the world transform is changed, call updateLocalTransform(Skeleton) before using the local transform. The local transform may be needed by other code (eg to apply another constraint).

After changing the world transform, call updateWorldTransform(Skeleton) on every descendant bone. It may be more convenient to modify the local transform instead, then call Skeleton::updateWorldTransform(Physics) to update the world transforms for all bones and apply constraints.

Inheritance
Implemented types
Available extensions

Constructors

BonePose()
factory
BonePose.fromPointer(Pointer<spine_bone_pose_wrapper> _ptr)

Properties

a double
The world transform c d x-axis x component.
getter/setter pair
b double
The world transform c d y-axis x component.
getter/setter pair
c double
The world transform c d x-axis y component.
getter/setter pair
d double
The world transform c d y-axis y component.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
inherit Inherit
Determines how parent world transforms affect this bone.
getter/setter pairinherited
nativePtr → Pointer<NativeType>
Get the native pointer for FFI calls
no setteroverride
rotation double
The local rotation in degrees, counter clockwise.
getter/setter pairinherited
rtti Rtti
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale2 double
Sets local scaleX and scaleY to the same value.
no getterinherited
scaleX double
The local scaleX.
getter/setter pairinherited
scaleY double
The local scaleY.
getter/setter pairinherited
shearX double
The local shearX.
getter/setter pairinherited
shearY double
The local shearY.
getter/setter pairinherited
worldRotationX double
The world rotation for the X axis, calculated using a and c. This is the direction the bone is pointing.
no setter
worldRotationY double
The world rotation for the Y axis, calculated using b and d.
no setter
worldScaleX double
The magnitude (always positive) of the world scale X, calculated using a and c.
no setter
worldScaleY double
The magnitude (always positive) of the world scale Y, calculated using b and d.
no setter
worldX double
The world X position.
getter/setter pair
worldY double
The world Y position.
getter/setter pair
x double
The local x translation.
getter/setter pairinherited
y double
The local y translation.
getter/setter pairinherited

Methods

dispose() → void
override
localToWorld(double localX, double localY) Vector

Available on BonePose, provided by the BonePoseExtensions extension

localToWorldRotation(double localRotation) double
Transforms a local rotation to a world rotation.
modifyLocal(Skeleton skeleton) → void
modifyWorld(int update) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentToWorld(double parentX, double parentY) Vector

Available on BonePose, provided by the BonePoseExtensions extension

rotateWorld(double degrees) → void
Rotates the world transform the specified amount.
set(BoneLocal pose) → void
inherited
setPosition(double x, double y) → void
Sets local x and y translation.
inherited
setScale(double scaleX, double scaleY) → void
Sets local scaleX and scaleY.
inherited
toString() String
A string representation of this object.
inherited
update(Skeleton skeleton, Physics physics) → void
Called by Skeleton::updateCache() to compute the world transform, if needed.
override
updateLocalTransform(Skeleton skeleton) → void
Computes the local transform values from the world transform.
updateWorldTransform(Skeleton skeleton) → void
Computes the world transform using the parent bone's world transform and this applied local pose. Child bones are not updated.
validateLocalTransform(Skeleton skeleton) → void
If the world transform has been modified by constraints and the local transform no longer matches, updateLocalTransform() is called. Call this after Skeleton::updateWorldTransform(Physics) before using the applied local transform.
worldToLocal(double worldX, double worldY) Vector

Available on BonePose, provided by the BonePoseExtensions extension

worldToLocalRotation(double worldRotation) double
Transforms a world rotation to a local rotation.
worldToParent(double worldX, double worldY) Vector

Available on BonePose, provided by the BonePoseExtensions extension

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

rttiStatic() Rtti
override