FXUtil

Profile: desktop, common

Overview

The class Bone is the basic building block for inverse kinematics.

Bone objects can be assembled in a tree-structure using the instance variables parent and children.

A Bone has a head, which is a point in space around which it can be rotated, and a length. Both can be initilized and read using the members currentHead and currentLength. Head, rotation, and length define a second point in space, which can be requested from currentTail.

The rotation can be limited using the members minAngle and maxAngle. The angle is measured in reagard to the parent-bone. The current value can be initalized and read from currentAngle.

The Node objects which need to be translated and rotated according to the Bone can be set using content. All Bone objects need to be assigned to a Skeleton, the Node which needs to be added to the scenegraph. All coordinates of a Bone are based on the local coordinate-system of its Skeleton.

Profile: desktop

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicchildrenBone[][]

The children of this Bone.

publiccontentNode[][]

The Node objects which are controlled by this Bone.

The Node objects which are controlled by this Bone.

If this Bone is translated or rotated, the Node objects in content are updated accordingly.

[]

Profile: desktop

 
public-initcurrentAngleNumber0.0

The current angle of this Bone.

The current angle of this Bone.

The angle is measured in degrees between this Bone and the extension of its parent, an angle of null degrees results in a straight line. An angle has a value in the range [-180..180].

The angle can be bounded using minAngle and maxAngle.

0.0

Profile: desktop

 
public-initcurrentHeadPoint2D Geometry.ZERO_POINT

The current position of the head of this Bone.

The current position of the head of this Bone.

The head is calculated in local coordinates of the skeleton.

If parent is set during initialization, the value of currentHead is ignored.

The head's position can be altered using toHead .

Geometry.ZERO_POINT

Profile: desktop

 
public-initcurrentLengthNumber0.0

The current length of this Bone.

public-readcurrentTailPoint2D

The current position of the tail of this Bone.

The current position of the tail of this Bone.

The tail is calculated in local coordinates of the skeleton.

The tail's position can be altered using toTail.

Profile: desktop

 
packagegroupGroup
public-initmaxAngleNumber180.0

The upper bound of the angle of this Bone.

public-initminAngleNumber-180.0

The lower bound of the angle of this Bone.

publicparentBonenull

The parent-Bone of this Bone.

public-readrotateNumber

The current rotation of this Bone in relation to the Skeleton.

public-initskeletonSkeletonnull

The skeleton is the Node in the scenegraph, that determines how Bone objects are rendered.

The skeleton is the Node in the scenegraph, that determines how Bone objects are rendered.

All connected Bone objects in a tree belong to one Skeleton. (This is taken care of automatically. If the skeleton of one Bone is changed, the skeleton-values for all connected Bone objects are updated.

All coordinates of this Bone are based on the local coordinate-system of this Skeleton.

null

Profile: desktop

 
publictoHeadTargetShape

The TargetShape where the head of this Bone should be pulled.

The TargetShape where the head of this Bone should be pulled.

Local coordinates of the skeleton are used for toHead.

Currently only points can be used for TargetShape.

Profile: desktop

 
publictoTailTargetShape

The TargetShape where the tail of this Bone should be pulled.

The TargetShape where the tail of this Bone should be pulled.

Local coordinates of the skeleton are used for toTail.

Currently only points can be used for TargetShape.

Profile: desktop

 

Inherited Variables

Inherited Functions