public class Skeleton
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Skeleton.BoneHandler
Bone visitor interface.
|
Modifier and Type | Field and Description |
---|---|
static int |
HEAD_4CC
4-cc value for HEAD bone.
|
static int |
NEC1_4CC
4-cc value for NEC1 bone.
|
static int |
ROOT_4CC
4-cc value for ROOT bone.
|
Constructor and Description |
---|
Skeleton()
Default constructor: no root, #bones==0, and an empty bones table.
|
Skeleton(JAInputStream jins)
Reads this Skeleton from the given stream.
|
Skeleton(JAInputStream jins,
boolean useint4cc)
Reads this Skeleton from the given stream.
|
Modifier and Type | Method and Description |
---|---|
void |
computeGlobalBoneTransforms()
Recursively sets the (global) transformation matrix for
each bone in the hierarchy, using its relative TR-set, and
the matrix of its parent.
|
Bone |
getBone(int fourcc)
Returns the bone with the given Four-CC name.
|
float |
getSkeletonYOffest()
Returns this skeleton's global Y-offset value.
|
void |
save(JAOutputStream jouts)
Writes this Skeleton to the given stream.
|
void |
save(JAOutputStream jouts,
boolean useint4cc) |
void |
scanBones(Bone bone,
Skeleton.BoneHandler bhdlr)
Scans the bones hierarchy rooted at the given bone in depth-first
order, using the given handler's bone visitor method.
|
void |
scanBones(Skeleton.BoneHandler bhdlr)
Skeleton bones traversal: performs a depth-first traversal of the
skeleton hierarchy calling the given
Skeleton.BoneHandler 's visitor method for each bone. |
void |
setBones(CASTRSet[] trsets)
Sets the bones' TR-set data from the given TR-sets.
|
void |
setBones(CASTRSet[] trsets,
float scale)
Sets the bones' TR-sets from those given, with the given scaling
(applied to the root translation only).
|
void |
setSkeletonYOffset(float offset)
Sets this skeleton's global Y-offset value.
|
public static int ROOT_4CC
public static int HEAD_4CC
public static int NEC1_4CC
public Skeleton()
public Skeleton(JAInputStream jins) throws java.io.IOException
java.io.IOException
public Skeleton(JAInputStream jins, boolean useint4cc) throws java.io.IOException
java.io.IOException
public void scanBones(Skeleton.BoneHandler bhdlr)
Skeleton.BoneHandler
's visitor method for each bone.public void scanBones(Bone bone, Skeleton.BoneHandler bhdlr)
public Bone getBone(int fourcc)
public float getSkeletonYOffest()
public void setSkeletonYOffset(float offset)
public void save(JAOutputStream jouts) throws java.io.IOException
java.io.IOException
public void save(JAOutputStream jouts, boolean useint4cc) throws java.io.IOException
java.io.IOException
public void setBones(CASTRSet[] trsets)
public void setBones(CASTRSet[] trsets, float scale)
public void computeGlobalBoneTransforms() throws JAException
JAException