Class OrbitMouseOwner
java.lang.Object
java.awt.event.MouseAdapter
com.j3d.engine.interact.input.mouse.MouseOwner
com.j3d.engine.interact.cmd.commands.camera.orbit.OrbitMouseOwner
- All Implemented Interfaces:
EventEmitterInterface,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
A mouse owner that handles camera orbiting logic. When active, dragging the mouse
will rotate the scene camera's pitch and yaw.
This class is used exclusively by the OrbitCmd command.
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields inherited from class com.j3d.engine.interact.input.mouse.MouseOwner
registered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called when a mouse drag event occurs, but only after theMouseOwner.clickDelayThresholdhas been exceeded.voidvoidHandles the mouse pressed event.doublescaleDifference(int d) Scales the raw mouse movement difference by the orbit sensitivity setting.Methods inherited from class com.j3d.engine.interact.input.mouse.MouseOwner
attachListener, broadcast, clear, detachAll, detachListener, getMouseLoc, getMouseLocFromPhysical, getPhysicalMouse, getSelectionMouseLoc, isAttached, isNotOwner, mouseDragged, mouseMoved, requestOwnership, sendMouseToCentre, setOldPoint, wrapMethods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
-
Constructor Details
-
OrbitMouseOwner
public OrbitMouseOwner()
-
-
Method Details
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseReleased
Description copied from class:MouseOwnerHandles the mouse pressed event.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseOwner- Parameters:
e- the event to be processed
-
mouseDraggedUsingClickDelay
Description copied from class:MouseOwnerThis method is called when a mouse drag event occurs, but only after theMouseOwner.clickDelayThresholdhas been exceeded. This is used to differentiate between a click and a drag.- Overrides:
mouseDraggedUsingClickDelayin classMouseOwner- Parameters:
e- The mouse event.
-
scaleDifference
public double scaleDifference(int d) Scales the raw mouse movement difference by the orbit sensitivity setting.- Parameters:
d- The raw mouse movement difference.- Returns:
- The scaled movement difference.
-