Class PerFrameManager
java.lang.Object
org.web3d.vrml.renderer.ogl.browser.PerFrameManager
- Direct Known Subclasses:
ApplicationFrameManager
,Xj3DClockRuntime
The thread that looks after the update issues of every frame.
Even as this is a thread, it is not automatically started. The user is required to start it separately.
- Version:
- $Revision: 1.25 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BrowserCore
The BrowserCore holding this manager.protected long
The current wall clock time that we are sending to peopleprotected org.j3d.util.ErrorReporter
Reporter instance for handing out errorsprotected EventModelEvaluator
The event model handlerprotected long
The last clock tick. -
Constructor Summary
ConstructorsConstructorDescriptionPerFrameManager
(EventModelEvaluator eme, BrowserCore core, long timeZero) Construct a new manager for the given scene. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clockTick
(long time) Notification that now is the time to evaluate the next time stamp.void
setErrorReporter
(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.void
Set the eventModelStatus listener.void
shutdown()
Shut down the frame thread so that the code may exit.
-
Field Details
-
errorReporter
protected org.j3d.util.ErrorReporter errorReporterReporter instance for handing out errors -
eventModel
The event model handler -
currentWallTime
protected long currentWallTimeThe current wall clock time that we are sending to people -
lastWallTime
protected long lastWallTimeThe last clock tick. We don't bother sending if the diff is zero -
browser
The BrowserCore holding this manager.
-
-
Constructor Details
-
PerFrameManager
public PerFrameManager(EventModelEvaluator eme, BrowserCore core, long timeZero) throws IllegalArgumentException Construct a new manager for the given scene. The manager starts with everything disabled.- Parameters:
eme
- The evaluator to usecore
- The browser representation to send events totimeZero
- The time to set as the initial zero time- Throws:
IllegalArgumentException
-
-
Method Details
-
setEventModelStatusListener
Set the eventModelStatus listener.- Parameters:
l
- The listener. Null will clear it.
-
clockTick
public void clockTick(long time) Notification that now is the time to evaluate the next time stamp. to be run.- Parameters:
time
- The timestamp to use in milliseconds
-
setErrorReporter
public void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.- Parameters:
reporter
- The instance to use or null
-
shutdown
public void shutdown()Shut down the frame thread so that the code may exit.
-