public class AnimationScheduler
extends java.lang.Object
Constructor and Description |
---|
AnimationScheduler(View view,
CameraController camctrl,
AnimationScan ascan,
JAPlayerEventHandler peh,
SpeedProvider sp,
float tBegin,
float tEnd,
float syncRate,
int initla,
int fdlimit,
int droplimit,
boolean streamed,
boolean showat,
boolean logas,
boolean logdfs,
boolean logdf)
Constructs a new animation scheduler.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public AnimationScheduler(View view, CameraController camctrl, AnimationScan ascan, JAPlayerEventHandler peh, SpeedProvider sp, float tBegin, float tEnd, float syncRate, int initla, int fdlimit, int droplimit, boolean streamed, boolean showat, boolean logas, boolean logdfs, boolean logdf)
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 animationstBegin
- The time within the animation at which playing
should starttEnd
- The time within the animation at which playing
should end. A zero value implies no end time.initla
- The initial lookahead period, in milliseconds: until
the available initial frames cover at least this
period the animation should not start (unless the
animation is complete, whatever its total duration).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.droplimit
- The drop period limit, in milliseconds: as soon as
there is a contiguous range of dropped frames whose
total duration is at least this value the following
should be reprieved even if it is due to be dropped;
(but a negative value is interpreted as "no limit").showat
- Flag indicating if detailed animation time data
is to be displayed for every frame animated.logdf
- Flag indicating if information about the dropping
of untimely frames during animation is to be logged.public void requestStopPlayer()
public void playAnimation() throws JAException, java.lang.InterruptedException
JAException
java.lang.InterruptedException
public void delay(float ms) throws java.lang.InterruptedException
java.lang.InterruptedException