Package org.xj3d.loaders.ogl
Class Xj3DClockRuntime
java.lang.Object
org.web3d.vrml.renderer.ogl.browser.PerFrameManager
org.xj3d.loaders.ogl.Xj3DClockRuntime
- All Implemented Interfaces:
org.j3d.renderer.aviatrix3d.loader.AVRuntimeComponent
public class Xj3DClockRuntime
extends PerFrameManager
implements org.j3d.renderer.aviatrix3d.loader.AVRuntimeComponent
Implementation of the
AVRuntimeComponent
that
can be used to drive the X3D/VRML scene graph clock.
This clock allows the end user to play with the definition of "time" in the scene graph by speeding up or slowing down the standard system clock. The initial time is set to the time that this class instance is created.
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.ogl.browser.PerFrameManager
browser, currentWallTime, errorReporter, eventModel, lastWallTime
-
Constructor Summary
ConstructorsConstructorDescriptionXj3DClockRuntime
(EventModelEvaluator eme, BrowserCore core) Create a new instance of the clock runtime component. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Execute the behaviour of the runtime component now.float
Get the currently set clock scale factor.void
setClockScaleFactor
(float scale) Set the clock's scale factor to a new value.Methods inherited from class org.web3d.vrml.renderer.ogl.browser.PerFrameManager
clockTick, setErrorReporter, setEventModelStatusListener, shutdown
-
Constructor Details
-
Xj3DClockRuntime
Create a new instance of the clock runtime component.- Parameters:
eme
- The evaluator to usecore
- The browser representation to send events to
-
-
Method Details
-
executeModelBehavior
public void executeModelBehavior()Execute the behaviour of the runtime component now.- Specified by:
executeModelBehavior
in interfaceorg.j3d.renderer.aviatrix3d.loader.AVRuntimeComponent
-
setClockScaleFactor
public void setClockScaleFactor(float scale) Set the clock's scale factor to a new value. By default, the value is 1.0. There's no limits on the scale, meaning zero and negative values can be used.- Parameters:
scale
- The new scale factor to use
-
getClockScaleFactor
public float getClockScaleFactor()Get the currently set clock scale factor.- Returns:
- The current scale value
-