public class WandViewBehavior.ListenerBase extends SensorInputAdaptor
| Modifier and Type | Field and Description |
|---|---|
protected org.scijava.java3d.Transform3D |
sensorToTracker
The initial transform from sensor coordinates to tracker base
coordinates, set by
initAction. |
protected org.scijava.java3d.Transform3D |
sensorToVworld
The initial transform from sensor coordinates to virtual
world coordinates, set by
initAction. |
protected org.scijava.java3d.Transform3D |
trackerToVworld
The initial transform from tracker base coordinates to virtual
world coordinates, set by
initAction. |
protected org.scijava.java3d.Transform3D |
viewPlatformToVworld
The initial transform from view platform coordinates to virtual
world coordinates, set by
initAction. |
| Constructor and Description |
|---|
WandViewBehavior.ListenerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
conditionViewScale(org.scijava.java3d.Transform3D viewPlatformToVworld)
Equalizes the scale factors in the view tranform, which must be
congruent.
|
protected void |
endAction(org.scijava.java3d.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(org.scijava.java3d.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(org.scijava.java3d.Transform3D target,
org.scijava.vecmath.Point3d center,
org.scijava.java3d.Transform3D transform)
Transforms the target coordinate system about a center point.
|
protected void |
translateTransform(org.scijava.java3d.Transform3D transform,
org.scijava.vecmath.Vector3d translation)
Translates a coordinate system.
|
clicked, dragged, readprotected org.scijava.java3d.Transform3D viewPlatformToVworld
initAction.protected org.scijava.java3d.Transform3D trackerToVworld
initAction.protected org.scijava.java3d.Transform3D sensorToVworld
initAction.protected org.scijava.java3d.Transform3D sensorToTracker
initAction.protected void initAction(org.scijava.java3d.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(org.scijava.java3d.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(org.scijava.java3d.Transform3D transform,
org.scijava.vecmath.Vector3d translation)
transform - the coordinate system to be translatedtranslation - the vector by which to translateprotected void transformAboutCenter(org.scijava.java3d.Transform3D target,
org.scijava.vecmath.Point3d center,
org.scijava.java3d.Transform3D transform)
target - the coordinate system to transformcenter - the center point about which to transformtransform - the transform to applyprotected void conditionViewScale(org.scijava.java3d.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 © 2015. All rights reserved.