|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.loop.UpdatingThread
org.xith3d.loop.opscheduler.impl.OperationSchedulerImpl
public class OperationSchedulerImpl
If you're not using RenderLoop, but want to benefit from the
OperationScheduler functionality, just use this one.
This class also implements the Updater interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.xith3d.loop.UpdatingThread |
|---|
UpdatingThread.TimingMode |
| Field Summary |
|---|
| Fields inherited from class org.xith3d.loop.UpdatingThread |
|---|
PAUSE_NONE, PAUSE_TOTAL |
| Constructor Summary | |
|---|---|
OperationSchedulerImpl()
|
|
OperationSchedulerImpl(GameTimeHost gameTimeHost)
|
|
OperationSchedulerImpl(long minItTime)
|
|
OperationSchedulerImpl(long minItTime,
GameTimeHost gameTimeHost)
|
|
| Method Summary | |
|---|---|
void |
addAnimatableObject(Animatable anumObj)
Adds an animatable object to the set. |
void |
addAnimatableObject(Animatable animObj,
boolean startAnimation)
Adds an animatable object to the set. |
void |
addAnimatableObject(Animatable animObj,
long gameTime,
UpdatingThread.TimingMode timingMode)
|
void |
addInterval(Interval interval)
Adds a new Interval to the scheduler, which will be checked each iteration. |
void |
addIntervalListener(IntervalListener il)
Registers a new IntervalListner to this OperationScheduler. |
void |
addUpdatable(Updatable updatable)
Adds a new Updatable instance to the list, that is worked each frame. |
protected void |
callIntervalListeners(Interval interval,
long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
This method is executed each time an interval is hit. |
int |
getNumberOfIntevals()
|
int |
getNumberOfSchedOps()
|
void |
removeAllIntervals()
Removes all Intervals from the scheduler. |
void |
removeAnimatableObject(Animatable animObj)
Removes an animatable object from the set. |
IntervalListener |
removeIntervalListener(IntervalListener il)
Unregisters an IntervalListner from this OperationScheduler. |
void |
removeUpdatable(Updatable updatable)
Removes an Updatable instance from the list, that is worked each frame. |
void |
scheduleOperation(ScheduledOperation schedOp)
Adds a ScheduledOperation to the queue. |
void |
unscheduleOperation(ScheduledOperation schedOp)
Removes a ScheduledOperation from the queue. |
void |
update()
Checks the list of operations and intervals and calls necessary methods if the time is right. |
void |
update(long gameTime)
Checks the list of operations and intervals and calls necessary methods if the time is right. |
void |
update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updates this Updatable object. |
| Methods inherited from class org.xith3d.loop.UpdatingThread |
|---|
begin, end, getFPSLimiter, getGameMicroTime, getGameMilliTime, getGameNanoTime, getGameTime, getIterationsCount, getLastFrameTime, getLastNanoFrameTime, getMinIterationTime, getPauseMode, getThread, getTimer, getTimingMode, isRunning, isStopping, loop, nextIteration, run, setFPSLimiter, setMinIterationTime, setPauseMode, setTimer, setTimingMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationSchedulerImpl(long minItTime,
GameTimeHost gameTimeHost)
public OperationSchedulerImpl(long minItTime)
public OperationSchedulerImpl(GameTimeHost gameTimeHost)
public OperationSchedulerImpl()
| Method Detail |
|---|
public final int getNumberOfSchedOps()
ScheduledOperations.public final int getNumberOfIntevals()
Intervals.public void scheduleOperation(ScheduledOperation schedOp)
scheduleOperation in interface OperationSchedulerschedOp - the Operation to schedulepublic void unscheduleOperation(ScheduledOperation schedOp)
unscheduleOperation in interface OperationSchedulerschedOp - the Operation to unschedulepublic void addInterval(Interval interval)
addInterval in interface OperationSchedulerinterval - the new Intervalpublic void removeAllIntervals()
removeAllIntervals in interface OperationSchedulerpublic void addIntervalListener(IntervalListener il)
addIntervalListener in interface OperationScheduleril - the new IntervalListenerpublic IntervalListener removeIntervalListener(IntervalListener il)
removeIntervalListener in interface OperationScheduleril - the IntervalListener to remove
public void addAnimatableObject(Animatable animObj,
long gameTime,
UpdatingThread.TimingMode timingMode)
public void addAnimatableObject(Animatable animObj,
boolean startAnimation)
addAnimatableObject in interface AnimatoranimObj - the object to animatestartAnimation - if true the startAnimation() method is executed immediatelypublic void addAnimatableObject(Animatable anumObj)
addAnimatableObject in interface AnimatoranumObj - the object to animatepublic void removeAnimatableObject(Animatable animObj)
removeAnimatableObject in interface AnimatoranimObj - the object to remove
protected void callIntervalListeners(Interval interval,
long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
interval - the hit IntervalgameTime - the current gameTimeframeTime - the time needed to render the last frametimingMode - public void addUpdatable(Updatable updatable)
addUpdatable in interface Updaterpublic void removeUpdatable(Updatable updatable)
removeUpdatable in interface Updater
public void update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
update in interface Animatorupdate in interface OperationSchedulerupdate in interface Updatableupdate in class UpdatingThreadgameTime - the gameTime in MillisecondsframeTime - the frameTime in Milliseconds (needed time for the last frame)timingMode - the TimingMode to use for frameTime.public void update(long gameTime)
gameTime - the current game timepublic void update()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||