Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.ogl.input
Class DefaultLayerSensorManager

java.lang.Object
  extended by org.web3d.vrml.renderer.common.input.BaseLayerSensorManager
      extended by org.web3d.vrml.renderer.ogl.input.DefaultLayerSensorManager
All Implemented Interfaces:
LayerSensorManager

public class DefaultLayerSensorManager
extends BaseLayerSensorManager

Default implementation of the LayerSensorManager interface for the OpenGL renderer.

Version:
$Revision: 1.14 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.web3d.vrml.renderer.common.input.BaseLayerSensorManager
allSensorNodes, backgroundGroundChanged, backgroundListener, backgroundSkyChanged, backgroundStack, DEFAULT_EVENT_SIZE, errorReporter, fogDetailsChanged, fogListener, fogStack, fogTypeChanged, initialised, inputHandler, inputManager, invWorldScale, layerId, navigationEnabled, navInfoStack, numAreaListeners, numPointingDeviceSensors, numVisibilityListeners, pickManager, viewStack, worldScale
 
Constructor Summary
DefaultLayerSensorManager()
          Create a new default instance of the manager.
 
Method Summary
 void clear()
          Force clearing all state from this manager now.
 boolean processUserInput(long time)
          Process the user input to the scene now.
 void setGlobalEffectsHandler(OGLGlobalEffectsHandler handler)
          Set the global effects handler for this sensor manager.
 void setViewEnvironment(org.j3d.aviatrix3d.ViewEnvironment data)
          Set the container for the view environment data.
 void setWorldRoot(org.j3d.aviatrix3d.Group root)
          Set the branchgroup that acts as the world root for doing picking against.
 void setWorldScale(float scale)
          Set the world scale applied.
 void updateViewMatrix()
          Update the viewing matrix.
 
Methods inherited from class org.web3d.vrml.renderer.common.input.BaseLayerSensorManager
addSensors, addViewDependentNodes, clearChangeFlags, getIsPickable, getLayerId, getNavigationEnabled, getUserInputHandler, initialise, loadScene, removeSensors, removeViewDependentNodes, setErrorReporter, setInputManager, setIsPickable, setLayerId, setNavigationEnabled, setNavigationStacks, setPickingManager, setVRMLClock, unloadScene
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayerSensorManager

public DefaultLayerSensorManager()
Create a new default instance of the manager. It will only register a handler for TimeSensors. Anything other than that will require the end user code to register an appropriate manager.

Method Detail

setGlobalEffectsHandler

public void setGlobalEffectsHandler(OGLGlobalEffectsHandler handler)
Set the global effects handler for this sensor manager.

Parameters:
handler - The new handler instance to use

setWorldRoot

public void setWorldRoot(org.j3d.aviatrix3d.Group root)
Set the branchgroup that acts as the world root for doing picking against.

Parameters:
root - The world root to pick against

setViewEnvironment

public void setViewEnvironment(org.j3d.aviatrix3d.ViewEnvironment data)
Set the container for the view environment data. Used to process the view frustum when doing visibilty sensor handling.

Parameters:
data - The current env data to use

setWorldScale

public void setWorldScale(float scale)
Set the world scale applied. This will scale down navinfo parameters to fit into the world.

Parameters:
scale - The new world scale.

processUserInput

public boolean processUserInput(long time)
Process the user input to the scene now. User input is the mouse and keyboard processing that would be used to send events to Key/StringSensors and perform navigation and picking duties as well as adjust items like billboards and LODs.

Parameters:
time - The clock time, in Java coordinates, not VRML
Returns:
true if the user input was processed and performed an action for this layer

updateViewMatrix

public void updateViewMatrix()
Update the viewing matrix. Call this when you want the SensorManager to update the viewing matrix. Typically after all user input and events have resolved.


clear

public void clear()
Force clearing all state from this manager now. This is used to indicate that a new world is about to be loaded and everything should be cleaned out now.

Specified by:
clear in interface LayerSensorManager
Overrides:
clear in class BaseLayerSensorManager

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium