public class Mouse6DPointerBehavior extends Behavior(Code)
This class provides basic behavior for a 6DOF mouse sensor. It
generates a visible 3D cursor echo in the virtual world which tracks the
position and orientation of the 6DOF mouse in the physical world. It
can be extended to provide other functions by accessing its
SensorEventAgent.
See Also:SensorEventAgent since: Java 3D 1.3
Inner Class :public class EchoReadListener implements SensorReadListener
Constructor Summary
public
Mouse6DPointerBehavior(Sensor sensor, double size, boolean enableLighting) Constructs the behavior with a default echo.
public Mouse6DPointerBehavior(Sensor sensor, double size, boolean enableLighting)(Code)
Constructs the behavior with a default echo. To make the echo visible,
call getEcho() to retrieve the TransformGroup that parents the echo
geometry, and then add that TransformGroup to the scene graph.
The default echo is a solid 6-pointed star where each point is aligned
with the axes of the local coordinate system of the sensor, and with
the center of the star at the location of the sensor hotspot.
Parameters: sensor - a 6 degree of freedom Sensor which generates positionand orientation relative to the tracker base. Parameters: size - the physical width of the echo in centimeters. Parameters: enableLighting - a boolean indicating whether the echo geometryshould have lighting enabled.
Constructs the behavior with an echo parented by the specified
TransformGroup.
Parameters: sensor - a 6 degree of freedom Sensor which generates positionand orientation relative to the tracker base. Parameters: tg - a TransformGroup with a child defining the visible echowhich will track the Sensor position and orientation; the Transform3Dassociated with the TransformGroup will be updated in order to effectthe behavior, so it must have the ALLOW_TRANSFORM_WRITE capabilityset before the scene graph is set live