|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.loop.LimitedUpdater
public class LimitedUpdater
This Updater implementation manages cares about the frameTime
posted to the Updatables not being greater than a specific value.
If a frame took more than this value, the Updatables are invoked
in several small steps of (up to) maxFrameTime each.
| Constructor Summary | |
|---|---|
LimitedUpdater(long maxFrameTime)
|
|
LimitedUpdater(long maxFrameTime,
boolean gameTimeStepped)
|
|
| Method Summary | |
|---|---|
void |
addUpdatable(Updatable updatable)
Adds a new Updatable instance to the list, that is worked each frame. |
long |
getMaxFrameTime()
|
boolean |
isGameTimeStepped()
|
void |
removeUpdatable(Updatable updatable)
Removes an Updatable instance from the list, that is worked each frame. |
void |
setGameTimeStepped(boolean stepped)
Sets, if the game-time is stepped with the maximum frame-time. |
void |
setMaxFrameTime(long maxFrameTime)
Sets the time-interval, one frame is allowed to take at maximum. |
void |
update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updates this Updatable object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LimitedUpdater(long maxFrameTime,
boolean gameTimeStepped)
public LimitedUpdater(long maxFrameTime)
| Method Detail |
|---|
public void addUpdatable(Updatable updatable)
addUpdatable in interface Updaterpublic void removeUpdatable(Updatable updatable)
removeUpdatable in interface Updaterpublic void setMaxFrameTime(long maxFrameTime)
Updatables are invoked
in several small steps of (up to) maxFrameTime each.
maxFrameTime - public final long getMaxFrameTime()
Updatables are invoked
in several small steps of (up to) maxFrameTime each.public void setGameTimeStepped(boolean stepped)
stepped - public final boolean isGameTimeStepped()
public void update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
update in interface UpdatablegameTime - the gameTime in MillisecondsframeTime - the frameTime in Milliseconds (needed time for the last frame)timingMode - the TimingMode to use for frameTime.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||