Moves the View around a point of interest when the mouse is dragged with
a mouse button pressed. Includes rotation, zoom, and translation
actions. Zooming can also be obtained by using mouse wheel.
This behavior must be added to the ViewingPlatform
using the ViewingPlatform.setViewPlatformBehavior method.
The rotate action rotates the ViewPlatform around the point of interest
when the mouse is moved with the main mouse button pressed. The
rotation is in the direction of the mouse movement, with a default
rotation of 0.01 radians for each pixel of mouse movement.
The zoom action moves the ViewPlatform closer to or further from the
point of interest when the mouse is moved with the middle mouse button
pressed (or Alt-main mouse button on systems without a middle mouse button).
The default zoom action is to translate the ViewPlatform 0.01 units for each
pixel of mouse movement. Moving the mouse up moves the ViewPlatform closer,
moving the mouse down moves the ViewPlatform further away.
By default, the zoom action allows the ViewPlatform to move through
the center of rotation to orbit at a negative radius.
The STOP_ZOOM constructor flag will stop the ViewPlatform at
a minimum radius from the center. The default minimum radius is 0.0
and can be set using the setMinRadius method.
The PROPORTIONAL_ZOOM constructor flag changes the zoom action
to move the ViewPlatform proportional to its distance from the center
of rotation. For this mode, the default action is to move the ViewPlatform
by 1% of its distance from the center of rotation for each pixel of
mouse movement.
The translate action translates the ViewPlatform when the mouse is moved
with the right mouse button pressed (Shift-main mouse button on systems
without a right mouse button). The translation is in the direction of the
mouse movement, with a default translation of 0.01 units for each pixel
of mouse movement.
The sensitivity of the actions can be scaled using the
set ActionFactor() methods which scale
the default movement by the factor. The rotate and translate actions
have separate factors for x and y.
The actions can be reversed using the REVERSE_ ACTION
constructor flags. The default action moves the ViewPlatform around the
objects in the scene. The REVERSE_ ACTION flags can
make the objects in the scene appear to be moving in the direction
of the mouse movement.
The actions can be disabled by either using the
DISABLE_ ACTION constructor flags or the
set ActionEnable methods.
The default center of rotation is (0, 0, 0) and can be set using the
setRotationCenter() method.
since: Java 3D 1.2.1 |