jarp
Class Skeleton

java.lang.Object
  extended by jarp.Skeleton

public class Skeleton
extends java.lang.Object

The bones hierarchy for a Java ARP avatar.


Field Summary
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 Summary
Skeleton()
          Default constructor: no root, #bones==0, and an empty bones table.
Skeleton(JAInputStream jins)
          Reads this Skeleton from the given stream.
 
Method Summary
 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 setBones(CASTRSet[] prsets)
          Sets the bones' TR-set data from the given TR-sets.
 void setBones(CASTRSet[] prsets, float scale)
          Sets the bones' TR-sets from those given, with the given scaling.
 void setSkeletonYOffset(float offset)
          Sets this skeleton's global Y-offset value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_4CC

public static int ROOT_4CC
4-cc value for ROOT bone.


HEAD_4CC

public static int HEAD_4CC
4-cc value for HEAD bone.


NEC1_4CC

public static int NEC1_4CC
4-cc value for NEC1 bone.

Constructor Detail

Skeleton

public Skeleton()
Default constructor: no root, #bones==0, and an empty bones table.


Skeleton

public Skeleton(JAInputStream jins)
         throws java.io.IOException
Reads this Skeleton from the given stream.

Throws:
java.io.IOException
Method Detail

getBone

public Bone getBone(int fourcc)
Returns the bone with the given Four-CC name.


getSkeletonYOffest

public float getSkeletonYOffest()
Returns this skeleton's global Y-offset value.


setSkeletonYOffset

public void setSkeletonYOffset(float offset)
Sets this skeleton's global Y-offset value.


save

public void save(JAOutputStream jouts)
          throws java.io.IOException
Writes this Skeleton to the given stream.

Throws:
java.io.IOException

setBones

public void setBones(CASTRSet[] prsets)
Sets the bones' TR-set data from the given TR-sets.


setBones

public void setBones(CASTRSet[] prsets,
                     float scale)
Sets the bones' TR-sets from those given, with the given scaling.


computeGlobalBoneTransforms

public void computeGlobalBoneTransforms()
                                 throws JAException
Recursively sets the (global) transformation matrix for each bone in the hierarchy, using its relative TR-set, and the matrix of its parent.

Throws:
JAException