Bone class

Stores a bone's current pose.

A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a constraint or application code modifies the world transform after it was computed from the local transform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getA() double
Part of the world transform matrix for the X axis. If changed, updateAppliedTransform should be called.
getAppliedRotation() double
The applied local rotation in degrees, counter clockwise.
getAScaleX() double
The applied local scaleX.
getAScaleY() double
The applied local scaleY.
getAShearX() double
The applied local shearX.
getAShearY() double
The applied local shearY.
getAX() double
The applied local x translation.
getAY() double
The applied local y translation.
getB() double
Part of the world transform matrix for the Y axis. If changed, updateAppliedTransform should be called.
getC() double
Part of the world transform matrix for the X axis. If changed, updateAppliedTransform should be called.
getChildren() List<Bone>
The immediate children of this bone.
getD() double
Part of the world transform matrix for the Y axis. If changed, updateAppliedTransform should be called.
getData() BoneData
The bone's setup pose data.
getParent() Bone?
The parent bone, or null if this is the root bone.
getRotation() double
The local rotation in degrees, counter clockwise.
getScaleX() double
The local scaleX.
getScaleY() double
The local scaleY.
getShearX() double
The local shearX.
getShearY() double
The local shearY.
getSkeleton() Skeleton
The skeleton this bone belongs to.
getWorldRotationX() double
The world rotation for the X axis, calculated using getA and getC.
getWorldRotationY() double
The world rotation for the Y axis, calculated using getB and getD.
getWorldScaleX() double
The magnitude (always positive) of the world scale X, calculated using getA and getC.
getWorldScaleY() double
The magnitude (always positive) of the world scale Y, calculated using getB and getD.
getWorldToLocalRotationX() double
getWorldToLocalRotationY() double
getWorldX() double
The world X position. If changed, updateAppliedTransform should be called.
getWorldY() double
The world Y position. If changed, updateAppliedTransform should be called.
getX() double
The local x translation.
getY() double
The local y translation.
isActive() bool
Returns false when the bone has not been computed because BoneData.getSkinRequired is true and the active skin (see Skeleton.getSkin) does not contain this bone (see Skin.getBones).
localToWorld(double localX, double localY) Vec2
Transforms a point from the bone's local coordinates to world coordinates.
localToWorldRotation(double localRotation) double
Transforms a local rotation to a world rotation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rotateWorld(double degrees) → void
Rotates the world transform the specified amount.
setA(double a) → void
setAppliedRotation(double rotation) → void
setAScaleX(double scaleX) → void
setAScaleY(double scaleY) → void
setAShearX(double shearX) → void
setAShearY(double shearY) → void
setAX(double x) → void
setAY(double y) → void
setB(double b) → void
setC(double c) → void
setD(double d) → void
setIsActive(bool isActive) → void
setRotation(double rotation) → void
setScaleX(double scaleX) → void
setScaleY(double scaleY) → void
setShearX(double shearX) → void
setShearY(double shearY) → void
setToSetupPose() → void
Sets this bone's local transform to the setup pose.
setWorldX(double worldX) → void
setWorldY(double worldY) → void
setX(double x) → void
setY(double y) → void
toString() String
A string representation of this object.
inherited
update() → void
Computes the world transform using the parent bone and this bone's local applied transform.
updateAppliedTransform() → void
Computes the applied transform values from the world transform.
updateWorldTransform() → void
Computes the world transform using the parent bone and this bone's local transform.
updateWorldTransformWith(double x, double y, double rotation, double scaleX, double scaleY, double shearX, double shearY) → void
Computes the world transform using the parent bone and the specified local transform. The applied transform is set to the specified local transform. Child bones are not updated.
worldToLocal(double worldX, double worldY) Vec2
Transforms a point from world coordinates to the bone's local coordinates.
worldToLocalRotation(double worldRotation) double
Transforms a world rotation to a local rotation.

Operators

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

Static Methods

getIsYDown() bool
setIsYDown(bool isYDown) → void
Assume y-axis pointing down for all calculations.