Interface OGLUserInputHandler
- All Superinterfaces:
OriginListener
,UserInputHandler
- All Known Implementing Classes:
DefaultUserInputHandler
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
Modifier and TypeMethodDescriptionvoid
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.OriginListener
originChanged
Methods inherited from interface org.xj3d.core.eventmodel.UserInputHandler
addNavigationStateListener, addSensorStatusListener, clear, getNavigationEnabled, getOrientation, getPosition, processNavigation, removeNavigationStateListener, removeSensorStatusListener, sendCurrentNavState, setActivateSensors, setCenterOfRotation, setNavigationEnabled, setNavigationInfo, setNavigationMode, setOriginManager, setTestPointingDevices, setVRMLClock, setWorldScale, trackerButton, trackerClicked, trackerDragged, trackerIntersected, trackerMoved, trackerOrientation, trackerPressed, trackerReleased, trackerWheel
-
Method Details
-
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 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 viewpointtg
- The transform just about the viewpoint used to move it around in response to the UI device inputpath
- The path from the root to the transform to use- Throws:
IllegalArgumentException
- The terminal node is not a viewpoint
-
setCollisionListener
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
-