com.sun.j3d.utils.behaviors.vp
Class WandViewBehavior.ResetViewListener
java.lang.Object
com.sun.j3d.utils.behaviors.sensor.SensorInputAdaptor
com.sun.j3d.utils.behaviors.vp.WandViewBehavior.ResetViewListener
- All Implemented Interfaces:
- SensorButtonListener, SensorReadListener
- Enclosing class:
- WandViewBehavior
public class WandViewBehavior.ResetViewListener
- extends SensorInputAdaptor
Resets the view back to the home transform when a specified number of
buttons are down simultaneously.
- See Also:
WandViewBehavior.setResetViewButtonCount6D(int)
,
ViewPlatformBehavior.setHomeTransform
Method Summary |
void |
pressed(SensorEvent e)
This method is called when a sensor's button is pressed. |
void |
read(SensorEvent e)
This method is called each time the dispatchEvents
method of SensorEventAgent is called and none of a
sensor's buttons have been handled by a button listener. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WandViewBehavior.ResetViewListener
public WandViewBehavior.ResetViewListener(Sensor s,
int count)
- Creates a sensor listener that resets the view when the specified
number of buttons are down simultaneously.
- Parameters:
s
- the sensor to listen tocount
- the number of buttons that must be down simultaneously
pressed
public void pressed(SensorEvent e)
- Description copied from interface:
SensorButtonListener
- This method is called when a sensor's button is pressed.
- Specified by:
pressed
in interface SensorButtonListener
- Overrides:
pressed
in class SensorInputAdaptor
- Parameters:
e
- the sensor event
read
public void read(SensorEvent e)
- Description copied from interface:
SensorReadListener
- This method is called each time the
dispatchEvents
method of SensorEventAgent
is called and none of a
sensor's buttons have been handled by a button listener. The
sensor read value has not necessarily changed since the last read
event.
- Specified by:
read
in interface SensorReadListener
- Overrides:
read
in class SensorInputAdaptor
- Parameters:
e
- the sensor event