Class DefaultLayerSensorManager
java.lang.Object
org.web3d.vrml.renderer.common.input.BaseLayerSensorManager
org.web3d.vrml.renderer.ogl.input.DefaultLayerSensorManager
- All Implemented Interfaces:
LayerSensorManager
Default implementation of the LayerSensorManager interface for the OpenGL
renderer.
- Version:
- $Revision: 1.20 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty defining a user input handler implementationFields 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, originListeners, originManager, pickManager, useOriginManager, viewStack, worldScale -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Force clearing all state from this manager now.booleanprocessUserInput(long time) Process the user input to the scene now.voidSet the global effects handler for this sensor manager.voidsetViewEnvironment(org.j3d.aviatrix3d.ViewEnvironment data) Set the container for the view environment data.voidsetWorldRoot(org.j3d.aviatrix3d.Group root) Set the branchgroup that acts as the world root for doing picking against.voidsetWorldScale(float scale) Set the world scale applied.voidUpdate 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, setOriginManager, setPickingManager, setVRMLClock, unloadScene
-
Field Details
-
USER_INPUT_HANDLER_PROP
Property defining a user input handler implementation- See Also:
-
-
Constructor Details
-
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 Details
-
setGlobalEffectsHandler
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 visibility 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) Description copied from interface:LayerSensorManagerProcess 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()Description copied from interface:LayerSensorManagerUpdate 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:
clearin interfaceLayerSensorManager- Overrides:
clearin classBaseLayerSensorManager
-