Xj3D VRML/X3D Code API

org.web3d.ogl.loaders
Class Xj3DClockRuntime

java.lang.Object
  extended byorg.web3d.vrml.renderer.ogl.browser.PerFrameManager
      extended byorg.web3d.ogl.loaders.Xj3DClockRuntime

public class Xj3DClockRuntime
extends PerFrameManager

Implementation of the org.j3d.renderer.aviatrix3d.loaders.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 intial 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
Xj3DClockRuntime(EventModelEvaluator eme, BrowserCore core)
          Create a new instance of the clock runtime component.
 
Method Summary
 void executeModelBehavior()
          Execute the behaviour of the runtime component now.
 float getClockScaleFactor()
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xj3DClockRuntime

public Xj3DClockRuntime(EventModelEvaluator eme,
                        BrowserCore core)
Create a new instance of the clock runtime component.

Parameters:
core - The browser representation to send events to
eme - The evaluator to use
Method Detail

executeModelBehavior

public void executeModelBehavior()
Execute the behaviour of the runtime component now.


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

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium