player
Class AnimationScheduler

java.lang.Object
  extended by player.AnimationScheduler

public class AnimationScheduler
extends java.lang.Object

Schedules the rendering of a sequence of animation frames by a JA avatar.


Constructor Summary
AnimationScheduler(View view, CameraController camctrl, AnimationScan ascan, JAPlayerEventHandler peh, SpeedProvider sp, int fdlimit, boolean showat)
          Constructs a new animation scheduler.
 
Method Summary
 void delay(float ms)
          Delays the calling thread for the specified time (ms).
 void playAnimation()
          Plays the animation sequence defined by the current settings of this scheduler's scanner, halting prematurely if requested.
 void requestStopPlayer()
          Synchronously sets the STOP request flag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationScheduler

public AnimationScheduler(View view,
                          CameraController camctrl,
                          AnimationScan ascan,
                          JAPlayerEventHandler peh,
                          SpeedProvider sp,
                          int fdlimit,
                          boolean showat)
Constructs a new animation scheduler.

Parameters:
view - the avatar view to be animated.
camctrl - the camera controller for the avatar view.
ascan - the animation scanner defining the frame sequence to be played.
peh - the player event handler for animations managed by this scheduler.
sp - the speed provider that is to control the speed of this scheduler's animations.
fdlimit - the time drift limit, in milliseconds, allowed for any frame played by this controller, that is, the largest amount of time by which the playing of the frame can be late without that frame being dropped.
showat - flag indicating if detailed animation time data is to be displayed for every frame animated.
Method Detail

requestStopPlayer

public void requestStopPlayer()
Synchronously sets the STOP request flag.


playAnimation

public void playAnimation()
                   throws JAException,
                          java.lang.InterruptedException
Plays the animation sequence defined by the current settings of this scheduler's scanner, halting prematurely if requested.

Throws:
JAException
java.lang.InterruptedException

delay

public void delay(float ms)
           throws java.lang.InterruptedException
Delays the calling thread for the specified time (ms). If ms==0, this is a no-op. Otherwise, we delay for at least ms-0.5: the actual period of the delay may exceed ms by an arbitrary amount (and indeed it may fall short of the period requested) -- depending on the quality of Thread.sleep().

Throws:
java.lang.InterruptedException