Class WandViewBehavior.ScaleListener2D

All Implemented Interfaces:
SensorButtonListener, SensorReadListener
Enclosing class:
WandViewBehavior

public class WandViewBehavior.ScaleListener2D extends WandViewBehavior.ListenerBase
Implements a 2D valuator listener that scales the view platform. Pushing the valuator forwards gives the appearance of the virtual world increasing in size, while pushing the valuator backwards makes the virtual world appear to shrink. The X and Y values from the valuator should have a continuous range from -1.0 to +1.0, although the scale speed can be adjusted to compensate for a different range.

This listener will work in conjunction with a 6DOF sensor if supplied in the constructor. If setTransformCenterSource has been called with the value HOTSPOT, then scaling is about the 6DOF sensor's hotspot; otherwise, the scaling center is the value set by setTransformCenter.

See Also:
  • Constructor Details

    • ScaleListener2D

      public ScaleListener2D(Sensor sensor2D, Sensor sensor6D)
      Construct an instance of this class with the specified sensors.
      Parameters:
      sensor2D - the 2D valuator whose Y value drive the scaling
      sensor6D - the 6DOF sensor to use if the rotation/scale center source is HOTSPOT; may be null
  • Method Details