cas
Class CASTRSet

java.lang.Object
  extended by cas.CASTRSet

public class CASTRSet
extends java.lang.Object

A CASTRSet contains the translation (i.e. position) and rotation data for a given bone, identified by its four-cc name.


Constructor Summary
CASTRSet(CASTRSet trs)
          Constructs a new TR-Set, copied from the given one.
CASTRSet(int name4cc, float[] rot, float[] trans)
          Constructs a new CASTRSet with the given (Four-CC) name, and using the given rotation and translation arrays (which are not copied).
CASTRSet(JAInputStream jins)
          Constructs this PR-Set from the given stream.
CASTRSet(java.lang.String name, float[] rot, float[] trans)
          Constructs a new CASTRSet with the given name, and using the given rotation and translation arrays (which are not copied).
 
Method Summary
static boolean approxEq(float x, float y)
          Tests whether the given pair of values are approximately equal.
static boolean approxEqRots(float[] ra, float[] rb)
          Tests whether the given pair of translations are approximately equal.
static boolean equalTrans(float[] ta, float[] tb)
          Tests whether the given pair of translations are (exactly) equal.
 int getFourCC()
          Returns this PR-Set's name.
 float[] getRotation()
          Returns this TR-Set's rotation array [xyzw] (length 4).
 float[] getTranslation()
          Returns this TR-Set's translation array (length 3).
 boolean has4CCName(int nm4cc)
          Indicates whether or not this TR set has the given 4-CC name.
 int hashCode()
          Returns a hash code value for this object.
 boolean matches(java.lang.Object other)
          Determines whether or not the given object is a CASTRSet whose components match this one -- in the sense that the 4cc tags are equal, the translations are exactly equal, and the rotations are approximately equal.
 void save(JAOutputStream jouts)
          Writes this PR-Set's data onto the given stream.
 void set(CASTRSet trs)
          Sets this TR-Set to be a copy the given one.
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CASTRSet

public CASTRSet(java.lang.String name,
                float[] rot,
                float[] trans)
Constructs a new CASTRSet with the given name, and using the given rotation and translation arrays (which are not copied).


CASTRSet

public CASTRSet(int name4cc,
                float[] rot,
                float[] trans)
Constructs a new CASTRSet with the given (Four-CC) name, and using the given rotation and translation arrays (which are not copied).


CASTRSet

public CASTRSet(CASTRSet trs)
Constructs a new TR-Set, copied from the given one.


CASTRSet

public CASTRSet(JAInputStream jins)
         throws java.io.IOException
Constructs this PR-Set from the given stream.

Throws:
java.io.IOException
Method Detail

has4CCName

public boolean has4CCName(int nm4cc)
Indicates whether or not this TR set has the given 4-CC name.


getFourCC

public int getFourCC()
Returns this PR-Set's name.


getTranslation

public float[] getTranslation()
Returns this TR-Set's translation array (length 3).


getRotation

public float[] getRotation()
Returns this TR-Set's rotation array [xyzw] (length 4).


set

public void set(CASTRSet trs)
Sets this TR-Set to be a copy the given one.


hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class java.lang.Object

matches

public boolean matches(java.lang.Object other)
Determines whether or not the given object is a CASTRSet whose components match this one -- in the sense that the 4cc tags are equal, the translations are exactly equal, and the rotations are approximately equal.


equalTrans

public static final boolean equalTrans(float[] ta,
                                       float[] tb)
Tests whether the given pair of translations are (exactly) equal.


approxEqRots

public static final boolean approxEqRots(float[] ra,
                                         float[] rb)
Tests whether the given pair of translations are approximately equal.


approxEq

public static boolean approxEq(float x,
                               float y)
Tests whether the given pair of values are approximately equal.


save

public void save(JAOutputStream jouts)
          throws java.io.IOException
Writes this PR-Set's data onto the given stream.

Throws:
java.io.IOException