public class WandViewBehavior.ListenerBase extends SensorInputAdaptor
| Modifier and Type | Field and Description |
|---|---|
protected Transform3D |
sensorToTracker
The initial transform from sensor coordinates to tracker base
coordinates, set by
initAction. |
protected Transform3D |
sensorToVworld
The initial transform from sensor coordinates to virtual
world coordinates, set by
initAction. |
protected Transform3D |
trackerToVworld
The initial transform from tracker base coordinates to virtual
world coordinates, set by
initAction. |
protected Transform3D |
viewPlatformToVworld
The initial transform from view platform coordinates to virtual
world coordinates, set by
initAction. |
| Constructor and Description |
|---|
ListenerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
conditionViewScale(Transform3D viewPlatformToVworld)
Equalizes the scale factors in the view tranform, which must be
congruent.
|
protected void |
endAction(Sensor s)
Ends the action.
|
protected double |
getPhysicalToViewPlatformScale()
Gets the scale from physical units to view platform units.
|
protected double |
getPhysicalToVirtualScale()
Gets the physical to virtual scale.
|
protected void |
initAction(Sensor s)
Initializes the listener action.
|
protected boolean |
isActive()
Returns true if the listener is currently active; that is, if
initAction has been called but not yet
endAction. |
void |
pressed(SensorEvent e)
This method is called when a sensor's button is pressed.
|
void |
released(SensorEvent e)
This method is called when a sensor's button is released.
|
protected void |
transformAboutCenter(Transform3D target,
Point3d center,
Transform3D transform)
Transforms the target coordinate system about a center point.
|
protected void |
translateTransform(Transform3D transform,
Vector3d translation)
Translates a coordinate system.
|
clicked, dragged, readprotected Transform3D viewPlatformToVworld
initAction.protected Transform3D trackerToVworld
initAction.protected Transform3D sensorToVworld
initAction.protected Transform3D sensorToTracker
initAction.protected void initAction(Sensor s)
pressed or when a 2D
valuator exits the deadzone threshold.s - reference to a 6DOF sensor if used by the listener; may
be nullprotected void endAction(Sensor s)
released or when a 2D valuator enters the deadzone
threshold.s - reference to a 6DOF sensor if used by the listener; may
be nullprotected boolean isActive()
initAction has been called but not yet
endAction.public void pressed(SensorEvent e)
SensorButtonListenerpressed in interface SensorButtonListenerpressed in class SensorInputAdaptore - the sensor eventpublic void released(SensorEvent e)
SensorButtonListenerreleased in interface SensorButtonListenerreleased in class SensorInputAdaptore - the sensor eventprotected double getPhysicalToVirtualScale()
protected double getPhysicalToViewPlatformScale()
protected void translateTransform(Transform3D transform, Vector3d translation)
transform - the coordinate system to be translatedtranslation - the vector by which to translateprotected void transformAboutCenter(Transform3D target, Point3d center, Transform3D transform)
target - the coordinate system to transformcenter - the center point about which to transformtransform - the transform to applyprotected void conditionViewScale(Transform3D viewPlatformToVworld)
ViewingPlatform
TransformGroup is updated; otherwise, its transform is reset
to the home transform. This should be called if multiple
incremental scale factors are applied to the view transform.viewPlatformToVworld - the view transformCopyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.