cas
Class CASFrame

java.lang.Object
  extended by cas.CASFrame

public class CASFrame
extends java.lang.Object

A CASFrame contains the bones-and-morphs data needed to render a single animation frame for an ARP avatar.


Constructor Summary
CASFrame()
          Default constructor.
CASFrame(CASFrame frame)
          Constructs a frame by copying all the data from the given one.
CASFrame(CASTRSet[] bones, CASMorph[] morphs)
          Constructs a frame using the given arrays.
CASFrame(float time, CASTRSet[] bones, CASMorph[] morphs)
          Constructs a frame using the given time-stamp and data arrays.
CASFrame(float time, float dur, CASTRSet[] bones, CASMorph[] morphs)
          Constructs a frame using the given time-stamp, duration, and data arrays.
CASFrame(JAInputStream jins, float t, float dur)
          Constructs a new frame with the given timing values and the morphs and bones data taken from the given stream.
 
Method Summary
 void adjustTime(float tadj)
          Adjusts this frame's timestamp by the given amount.
 void copy(float time, float dur, CASTRSet[] bones, CASMorph[] morphvec)
          Completely redefines this frame by creating its own copies of all the given data.
 float getDuration()
          Gets the timestamp for this frame.
 CASMorph getMorph(int morph4cc)
          Returns this frame's morph of the given name if it has one, or null otherwise.
 CASMorph[] getMorphs()
          Gets the morph array for this frame.
 float getTime()
          Gets the timestamp for this frame.
 CASTRSet getTRSet(int bone4cc)
          Returns this frame's TR-set of the given name, if it has one, or null otherwise.
 CASTRSet[] getTRSets()
          Gets the TR-Set (bones) array for this frame.
 void save(JAOutputStream jouts)
          Writes this CASFrame to the given stream.
 void saveText(java.io.PrintWriter pwrtr)
          Writes a legible version of this Frame (actually, just its time-stamp) to the given writer.
 void set(float time, float dur, CASTRSet[] bones, CASMorph[] morphs)
          Completely redefines this frame by attaching the given data to it (that is, the array references are copied, not the arrays themselves).
 void setDuration(float dur)
          Sets the duration for this frame.
 void setTime(float ts)
          Sets the timestamp for this frame.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CASFrame

public CASFrame()
Default constructor.


CASFrame

public CASFrame(CASTRSet[] bones,
                CASMorph[] morphs)
Constructs a frame using the given arrays.


CASFrame

public CASFrame(float time,
                CASTRSet[] bones,
                CASMorph[] morphs)
Constructs a frame using the given time-stamp and data arrays.


CASFrame

public CASFrame(float time,
                float dur,
                CASTRSet[] bones,
                CASMorph[] morphs)
Constructs a frame using the given time-stamp, duration, and data arrays.


CASFrame

public CASFrame(CASFrame frame)
Constructs a frame by copying all the data from the given one. [## CURRENTLY UNUSED ##]


CASFrame

public CASFrame(JAInputStream jins,
                float t,
                float dur)
         throws java.io.IOException
Constructs a new frame with the given timing values and the morphs and bones data taken from the given stream.

Throws:
java.io.IOException
Method Detail

set

public void set(float time,
                float dur,
                CASTRSet[] bones,
                CASMorph[] morphs)
Completely redefines this frame by attaching the given data to it (that is, the array references are copied, not the arrays themselves).


copy

public void copy(float time,
                 float dur,
                 CASTRSet[] bones,
                 CASMorph[] morphvec)
Completely redefines this frame by creating its own copies of all the given data. [## CURRENTLY UNUSED ##]


getTime

public float getTime()
Gets the timestamp for this frame.


getDuration

public float getDuration()
Gets the timestamp for this frame.


getTRSets

public CASTRSet[] getTRSets()
Gets the TR-Set (bones) array for this frame.


getMorphs

public CASMorph[] getMorphs()
Gets the morph array for this frame.


getTRSet

public CASTRSet getTRSet(int bone4cc)
Returns this frame's TR-set of the given name, if it has one, or null otherwise.


getMorph

public CASMorph getMorph(int morph4cc)
Returns this frame's morph of the given name if it has one, or null otherwise.


setTime

public void setTime(float ts)
Sets the timestamp for this frame.


adjustTime

public void adjustTime(float tadj)
Adjusts this frame's timestamp by the given amount.


setDuration

public void setDuration(float dur)
Sets the duration for this frame.


save

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

Throws:
java.io.IOException

saveText

public void saveText(java.io.PrintWriter pwrtr)
Writes a legible version of this Frame (actually, just its time-stamp) to the given writer.