Package Vrml2Sourcebook.Chapter09SensingViewer
Authors can design interactivity into a scene that responds to user actions.
A scene can sense when the viewer's cursor is over a shape, has touched a shape, or is dragging atop a shape. A scene can also trigger animations on a viewer's touch, enabling the viewer to move and rotate shapes. There are four main action sensor types: TouchSensor senses touch, SphereSensor senses drags in a spherical way, CylinderSensor senses drags cylindrically, and PlaneSensor senses drags around a plane.
These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.
This X3D VRML2 Sourcebook Chapter 09 Sensing Viewer examples archive is online.
The X3D Java Scene Access Interface (x3djsail) package provides concrete classes for each X3D node and statement.
Online: X3D Java Scene Access Interface Library (X3DJSAIL) and X3DJSAIL Javadoc
- See Also:
-
ClassDescriptionA cube that spins when the cursor moves over it.A cube that spins when the cursor moves over it, with coordinate axes superimposed to show X3D/VRML directions.A cube that spins when the viewer touches it.A cube that spins when the viewer touches it, with coordinate axes superimposed to show X3D/VRML directions.A Cone that translates in the vertical XY plane when the viewer drags it.A Cone that translates in the vertical XY plane when the viewer drags it, with coordinate axes superimposed to show X3D/VRML directions.A cone that translates within a limited range of the XZ plane when the viewer drags it.A cone that translates within a limited range of the XZ plane when the viewer drags it, with coordinate axes superimposed to show X3D/VRML directions.Four stacking blocks, select and drag to see each of them.Four stacking blocks, select and drag to see each of them.Two shapes that rotate when the viewer drags them, with coordinate axes superimposed to show X3D/VRML directions.Two shapes that rotate when the viewer drags them, with coordinate axes superimposed to show X3D/VRML directions.Two shapes that rotate about an axis when the viewer drags them, with coordinate axes superimposed to show X3D/VRML directions.Two shapes that rotate about an axis when the viewer drags them, with coordinate axes superimposed to show X3D/VRML directions.Two shapes that rotate about an axis when the viewer drags them, with coordinate axes superimposed to show X3D/VRML directions.A cube that spins when the cursor moves over it and translates when the cursor drags it, with coordinate axes superimposed to show X3D/VRML directions.A desk lamp with arm angles that can be adjusted using nested sensors.A desk lamp with arm angles that can be adjusted using nested sensors, with coordinate axes superimposed to show X3D/VRML directions.