Class FlyBehaviorRenderer
Here are the functions:
Left mouse button:
Up - zooms out
Down - zooms in
Right - spins to the left
Left - spins to the right
Right mouse button:
Up - translates down
Down - translates up
Right - translates left
Left - translates right
Middle mouse button:
Up - pitches up
Down - pitches down
Right - rolls right
Left - rolls left
A slider in the dialog controls the speed of these changes. Also, the further away from the center of the canvas the mouse event is, the faster it will occur. So if the user points the mouse with the left mouse button at the very top of the canvas, the image will zoom out quickly. If the user points the mouse with the left mouse button only slightly above the center of the canvas, the image will zoom out slowly.
-
Field Summary
Fields inherited from class gov.nih.mipav.view.renderer.J3D.surfaceview.MouseBehaviorRenderer
awtCondition, bothCondition, canvasBounds, canvasCenter, deadFactor, deadXSize, deadYSize, ignoreMouseMotion, MAX_ANGLE, MAX_VELOCITY, motion, mouseCallback, newTargetTransform, parent, pitchAngle, pitchTransform, spinAngle, spinTransform, targetTG, targetTransform, velocity, velocityTransform, yawAngle, yawTransformFields inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
homeTransform, vpFields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING -
Constructor Summary
ConstructorsConstructorDescriptionFlyBehaviorRenderer(JPanelView parent) Constructs new behavior and initializes wake up events. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidSets up the new transform by creating transforms from the determined pitch, yaw, and roll angles and multiplying these with the velocity.protected voidprocessMouseEvent(MouseEvent event) Processes the mouse event, setting yaw, pitch, roll, and velocity depending on mouse button and position.Methods inherited from class gov.nih.mipav.view.renderer.J3D.surfaceview.MouseBehaviorRenderer
getCanvasCenter, getTarget, initialize, isIgnoreMouseMotion, processStimulus, setMaximumAngle, setMaximumVelocity, setTarget, setupCallbackMethods inherited from class com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior
getHomeTransform, getViewingPlatform, goHome, setHomeTransform, setViewingPlatformMethods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOnMethods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableMethods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
-
Constructor Details
-
FlyBehaviorRenderer
Constructs new behavior and initializes wake up events.- Parameters:
parent- The dialog that called this behavior.
-
-
Method Details
-
integrateTransforms
protected void integrateTransforms()Sets up the new transform by creating transforms from the determined pitch, yaw, and roll angles and multiplying these with the velocity.- Specified by:
integrateTransformsin classMouseBehaviorRenderer
-
processMouseEvent
Processes the mouse event, setting yaw, pitch, roll, and velocity depending on mouse button and position.- Specified by:
processMouseEventin classMouseBehaviorRenderer- Parameters:
event- Mouse event to process.
-