sigmlanim
Class AnimatedSign

java.lang.Object
  extended by sigmlgen.GSiGMLSign
      extended by sigmlanim.AnimatedSign

public class AnimatedSign
extends sigmlgen.GSiGMLSign

This class extends a GSiGMLSign by attaching the corresponding seqence of animation frames to it.


Constructor Summary
AnimatedSign(sigmlgen.GSiGMLSign sign)
          Constructs a new sign object for the given GSiGMLSign, initially with no associated animation frames.
AnimatedSign(java.lang.String gloss, int base, CASFrame[] frms)
          Constructs a new sign object with the given frames at the given frame base; the inherited GSiGMLSign will have no data apart from the given gloss name.
AnimatedSign(java.lang.String gsigml, java.lang.String gloss, sigmlgen.playerctrl.PlayerSettings ps)
          Constructs a new sign object with the given gestural SiGML, gloss and player settings, and with no associated animation frames.
 
Method Summary
 int compareFrames(int f)
          Returns an index comparison value for the frames of this sign with the given frame: the result is: negative if this sign is before the given frame; zero if it contains the frame; positive if it is after the frame.
 void ensureBaseIndex(int lo)
          Ensures that this sign's base frame index has the given value, achieved by adjusting its base and limit values if necessary.
 void ensureStartTime(float t)
          Ensures that this sign's start time has the given value, achieved in the case where the given start time differs significantly from the current start time by adjusting each frame's timestamp by the amount of that difference.
 CASFrame getFrame(int f)
          Returns frame f, assuming this.hasFrame(f).
 CASFrame[] getFrames()
          Returns the animation frames for this sign.
 int getFramesBase()
          Returns the lower limit for this sign's frame range.
 int getFramesLimit()
          Returns the upper limit for this sign's frame range.
 float getLimitTime(float ltdefault)
          Returns this sign's limit time, that is, the natural timestamp for the next frame following this sign's final frame, or the given default value in the case where this sign's frame list is empty.
 float getStartTime(float stdefault)
          Returns the timestamp of this sign's initial frame, or the given default value in the case where this sign's frame list is empty.
 boolean hasFrame(int f)
          Tests whether this frame index is in the range associated with this sign.
 void setFrames(CASFrame[] frms, int base)
          Attaches the given sequence of animation frames to this sign, with the given base frame index.
 
Methods inherited from class sigmlgen.GSiGMLSign
getAmbientMotionFlags, getAvatarSettings, getCameraSettings, getGloss, getSiGMLForSign, hasPlayerSettings, setAvatarSettings, setCameraSettings, setPlayerSettings, supplementPlayerSettings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimatedSign

public AnimatedSign(sigmlgen.GSiGMLSign sign)
Constructs a new sign object for the given GSiGMLSign, initially with no associated animation frames.


AnimatedSign

public AnimatedSign(java.lang.String gsigml,
                    java.lang.String gloss,
                    sigmlgen.playerctrl.PlayerSettings ps)
Constructs a new sign object with the given gestural SiGML, gloss and player settings, and with no associated animation frames.


AnimatedSign

public AnimatedSign(java.lang.String gloss,
                    int base,
                    CASFrame[] frms)
Constructs a new sign object with the given frames at the given frame base; the inherited GSiGMLSign will have no data apart from the given gloss name.

Method Detail

getFrames

public CASFrame[] getFrames()
Returns the animation frames for this sign.


getFrame

public CASFrame getFrame(int f)
Returns frame f, assuming this.hasFrame(f).


getFramesBase

public int getFramesBase()
Returns the lower limit for this sign's frame range.


getFramesLimit

public int getFramesLimit()
Returns the upper limit for this sign's frame range.


hasFrame

public boolean hasFrame(int f)
Tests whether this frame index is in the range associated with this sign.


compareFrames

public int compareFrames(int f)
Returns an index comparison value for the frames of this sign with the given frame: the result is:

getStartTime

public float getStartTime(float stdefault)
Returns the timestamp of this sign's initial frame, or the given default value in the case where this sign's frame list is empty.


getLimitTime

public float getLimitTime(float ltdefault)
Returns this sign's limit time, that is, the natural timestamp for the next frame following this sign's final frame, or the given default value in the case where this sign's frame list is empty.


setFrames

public void setFrames(CASFrame[] frms,
                      int base)
Attaches the given sequence of animation frames to this sign, with the given base frame index.


ensureBaseIndex

public void ensureBaseIndex(int lo)
Ensures that this sign's base frame index has the given value, achieved by adjusting its base and limit values if necessary.


ensureStartTime

public void ensureStartTime(float t)
Ensures that this sign's start time has the given value, achieved in the case where the given start time differs significantly from the current start time by adjusting each frame's timestamp by the amount of that difference.