Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.ogl.browser
Class PerFrameManager

java.lang.Object
  extended by org.web3d.vrml.renderer.ogl.browser.PerFrameManager
Direct Known Subclasses:
ApplicationFrameManager, Xj3DClockRuntime

public abstract class PerFrameManager
extends java.lang.Object

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.24 $
Author:
Justin Couch

Field Summary
protected  BrowserCore browser
          The BrowserCore holding this manager.
protected  long currentWallTime
          The current wall clock time that we are sending to people
protected  ErrorReporter errorReporter
          Reporter instance for handing out errors
protected  EventModelEvaluator eventModel
          The event model handler
protected  long lastWallTime
          The last clock tick.
 
Constructor Summary
PerFrameManager(EventModelEvaluator eme, BrowserCore core, long timeZero)
          Construct a new manager for the given scene.
 
Method Summary
 void clockTick(long time)
          Notification that now is the time to evaluate the next time stamp.
 void setErrorReporter(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 setEventModelStatusListener(EventModelStatusListener l)
          Set the eventModelStatus listener.
 void shutdown()
          Shut down the frame thread so that the code may exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorReporter

protected ErrorReporter errorReporter
Reporter instance for handing out errors


eventModel

protected EventModelEvaluator eventModel
The event model handler


currentWallTime

protected long currentWallTime
The current wall clock time that we are sending to people


lastWallTime

protected long lastWallTime
The last clock tick. We don't bother sending if the diff is zero


browser

protected BrowserCore browser
The BrowserCore holding this manager.

Constructor Detail

PerFrameManager

public PerFrameManager(EventModelEvaluator eme,
                       BrowserCore core,
                       long timeZero)
                throws java.lang.IllegalArgumentException
Construct a new manager for the given scene. The manager starts with everything disabled.

Parameters:
core - The browser representation to send events to
eme - The evaluator to use
timeZero - The time to set as the initial zero time
Throws:
java.lang.IllegalArgumentException
Method Detail

setEventModelStatusListener

public void setEventModelStatusListener(EventModelStatusListener l)
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(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.


Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium