| |
|
| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Leaf javax.media.j3d.Behavior com.db.behaviors.ViewerBehavior com.db.behaviors.ExamineViewerBehavior
ExamineViewerBehavior | public class ExamineViewerBehavior extends ViewerBehavior (Code) | | Wakeup on mouse button presses, releases, and mouse movements and
generate transforms in an "examination style" that enables the user
to rotate, translation, and zoom an object as if it is held at
arm's length. Such an examination style is similar to the "Examine"
navigation type used by VRML browsers.
The behavior maps mouse drags to different transforms depending
upon the mosue button held down:
Button 1 (left)
Horizontal movement --> Y-axis rotation
Vertical movement --> X-axis rotation
Button 2 (middle)
Horizontal movement --> nothing
Vertical movement --> Z-axis translation
Button 3 (right)
Horizontal movement --> X-axis translation
Vertical movement --> Y-axis translation
To support systems with 2 or 1 mouse buttons, the following
alternate mappings are supported while dragging with any mouse
button held down and zero or more keyboard modifiers held down:
No modifiers = Button 1
ALT = Button 2
Meta = Button 3
Control = Button 3
The behavior automatically modifies a TransformGroup provided
to the constructor. The TransformGroup's transform can be set
at any time by the application or other behaviors to cause the
examine rotation and translation to be reset.
|
Constructor Summary | |
public | ExamineViewerBehavior() Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into a transform group given later
with the setTransformGroup() method. | public | ExamineViewerBehavior(Component parent) Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into a transform group given later
with the setTransformGroup() method. | public | ExamineViewerBehavior(TransformGroup transformGroup) Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into the given transform group. | public | ExamineViewerBehavior(TransformGroup transformGroup, Component parent) Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into the given transform group. |
previousX | protected int previousX(Code) | | |
previousY | protected int previousY(Code) | | |
ExamineViewerBehavior | public ExamineViewerBehavior()(Code) | | Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into a transform group given later
with the setTransformGroup() method.
|
ExamineViewerBehavior | public ExamineViewerBehavior(Component parent)(Code) | | Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into a transform group given later
with the setTransformGroup() method.
Parameters: parent - The AWT Component that contains the areagenerating mouse events. |
ExamineViewerBehavior | public ExamineViewerBehavior(TransformGroup transformGroup)(Code) | | Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into the given transform group.
Parameters: transformGroup - The transform group to be modifiedby the behavior. |
ExamineViewerBehavior | public ExamineViewerBehavior(TransformGroup transformGroup, Component parent)(Code) | | Construct an examine behavior that listens to mouse movement
and button presses to generate rotation and translation
transforms written into the given transform group.
Parameters: transformGroup - The transform group to be modifiedby the behavior. Parameters: parent - The AWT Component that contains the areagenerating mouse events. |
onButton1 | public void onButton1(MouseEvent mev)(Code) | | Respond to a button1 event (press, release, or drag).
Parameters: mouseEvent - A MouseEvent to respond to. |
onButton2 | public void onButton2(MouseEvent mev)(Code) | | Respond to a button2 event (press, release, or drag).
Parameters: mouseEvent - A MouseEvent to respond to. |
onButton3 | public void onButton3(MouseEvent mev)(Code) | | Respond to a button3 event (press, release, or drag).
Parameters: mouseEvent - A MouseEvent to respond to. |
onElapsedFrames | public void onElapsedFrames(WakeupOnElapsedFrames timeEvent)(Code) | | Respond to an elapsed frames event (assuming subclass has set up a
wakeup criterion for it).
Parameters: time - A WakeupOnElapsedFrames criterion to respond to. |
|
|
|