Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.ogl.input
Interface OGLUserInputHandler

All Superinterfaces:
UserInputHandler
All Known Implementing Classes:
DefaultUserInputHandler

public interface OGLUserInputHandler
extends UserInputHandler

A complete handler for all user input information within a scene.

The handler takes care of all the handling needed for sensors, anchors, navigation and keyboard. However, it does not define a way of sourcing those events as it assumes that a user will either delegate or extend this class with more specific information such as an AWT listener or Java3D behavior.

The current key handling does not allow keyboard navigation of the world. It passes all key events directly through to the current key sensor if one is registered.

Version:
$Revision: 1.9 $
Author:
Justin Couch

Method Summary
 void setCollisionListener(CollisionListener l)
          Set the listener for collision notifications.
 void setPickableScene(org.j3d.aviatrix3d.Group scene)
          Set the root group that we are doing the picking on.
 void setViewInfo(OGLViewpointNodeType vp, org.j3d.aviatrix3d.TransformGroup tg, org.j3d.aviatrix3d.SceneGraphPath path)
          Set the view and it's related transform group to use and the path to get there from the root of the scene.
 
Methods inherited from interface org.xj3d.core.eventmodel.UserInputHandler
addNavigationStateListener, addSensorStatusListener, clear, getNavigationEnabled, getOrientation, getPosition, processNavigation, removeNavigationStateListener, removeSensorStatusListener, sendCurrentNavState, setActivateSensors, setCenterOfRotation, setNavigationEnabled, setNavigationInfo, setNavigationMode, setTestPointingDevices, setVRMLClock, setWorldScale, trackerButton, trackerClicked, trackerDragged, trackerIntersected, trackerMoved, trackerOrientation, trackerPressed, trackerReleased, trackerWheel
 

Method Detail

setPickableScene

void setPickableScene(org.j3d.aviatrix3d.Group scene)
Set the root group that we are doing the picking on. This allows us to look for the picked items in the scene. A null value is used to clear the world and disable picking behaviours.

Parameters:
scene - The scene to pick against

setViewInfo

void setViewInfo(OGLViewpointNodeType vp,
                 org.j3d.aviatrix3d.TransformGroup tg,
                 org.j3d.aviatrix3d.SceneGraphPath path)
                 throws java.lang.IllegalArgumentException
Set the view and it's related transform group to use and the path to get there from the root of the scene. The transform group must allow for reading the local to Vworld coordinates so that we can accurately implement terrain following. A null value for the path is permitted.

Parameters:
vp - The current viewpoint
tg - The transform just about the viewpoint used to move it around in response to the UI device input
path - The path from the root to the transform to use
Throws:
java.lang.IllegalArgumentException - The terminal node is not a viewpoint

setCollisionListener

void setCollisionListener(CollisionListener l)
Set the listener for collision notifications. By setting a value of null it will clear the currently set instance

Parameters:
l - The listener to use for change updates

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium