|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threed.jpct.skeleton.SimpleBone
public class SimpleBone
Provides a simple implementation of a bone. A bone has two unique identifiers - id and name. The local rotations and translations are stored, along with the bones keyframes, and parent/child references.
| Field Summary | |
|---|---|
Matrix |
matrixAbsolute
|
Matrix |
matrixFinal
|
Matrix |
matrixRelative
|
Matrix |
rotationAbsolute
|
Matrix |
rotationFinal
|
| Constructor Summary | |
|---|---|
SimpleBone(int id,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
addChild(SimpleBone child)
Adds a child reference to the bone. |
java.util.Hashtable<java.lang.Integer,SimpleBone> |
getChildren()
Returns a hashtable containing all of the bone's children. |
SimpleBone |
getParent()
Returns the parent bone. |
void |
setKeyframes(int i,
RotationKeyframe[] rotationKeyframes,
TranslationKeyframe[] translationKeyframes)
Sets the translation, and rotation keyframes for this bone. |
void |
setLocalRotation(float x,
float y,
float z,
float angle)
Sets the local rotation axis of the bone. |
void |
setLocalTranslation(float x,
float y,
float z)
Sets the local translation vector for this bone. |
void |
setMaxAnimations(int max)
Initializes the keyframe arrays, to support the maximum animation size. |
void |
setParent(SimpleBone parent)
Sets the parent bone of this bone. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Matrix matrixAbsolute
public Matrix matrixRelative
public Matrix matrixFinal
public Matrix rotationAbsolute
public Matrix rotationFinal
| Constructor Detail |
|---|
public SimpleBone(int id,
java.lang.String name)
| Method Detail |
|---|
public void setLocalTranslation(float x,
float y,
float z)
x - the x translationy - the y translationz - the z translation
public void setLocalRotation(float x,
float y,
float z,
float angle)
x - the x axis rotationy - the y axis rotationz - the z axis rotation
public void setKeyframes(int i,
RotationKeyframe[] rotationKeyframes,
TranslationKeyframe[] translationKeyframes)
i - the animation index to add keyframes torotationKeyframes - the rotation keyframestranslationKeyframes - the translation keyframespublic void setMaxAnimations(int max)
max - the number of animations to cater for.public void setParent(SimpleBone parent)
parent - The parent bonepublic void addChild(SimpleBone child)
child - The child bone to add a reference topublic SimpleBone getParent()
public java.util.Hashtable<java.lang.Integer,SimpleBone> getChildren()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||