Package boofcv.gui.mesh
Class OrbitAroundPointControl
java.lang.Object
java.awt.event.MouseAdapter
boofcv.gui.mesh.OrbitAroundPointControl
- All Implemented Interfaces:
Swing3dCameraControl,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
Camera controls for
MeshViewerPanel where it rotates around a central control point.
Dragging the mouse will rotate the camera around this point. Using the mouse wheel will zoom in and out.
This has been designed so that multiple threads can access it at the same time-
Field Summary
FieldsModifier and TypeFieldDescriptionCalled every time the camera has changedint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattachControls(JComponent parent) Attaches controls to the componentvoiddetachControls(JComponent parent) Detaches controls to the componentExplains how to use the controlTransform from world to cameravoidvoidvoidvoidreset()Resets the view back to it's initial statevoidBy default sets the focal point that it rotates around to the medium pointvoidsetCamera(CameraPinhole intrinsics) Specifies the camera used to render the scenevoidsetChangeHandler(Runnable handler) This is called whenever the settings have changed and the rendering should be updated.Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased
-
Field Details
-
maxSamplePoints
public int maxSamplePoints -
handleCameraChanged
Called every time the camera has changed
-
-
Constructor Details
-
OrbitAroundPointControl
public OrbitAroundPointControl()
-
-
Method Details
-
attachControls
Description copied from interface:Swing3dCameraControlAttaches controls to the component- Specified by:
attachControlsin interfaceSwing3dCameraControl
-
detachControls
Description copied from interface:Swing3dCameraControlDetaches controls to the component- Specified by:
detachControlsin interfaceSwing3dCameraControl
-
reset
public void reset()Description copied from interface:Swing3dCameraControlResets the view back to it's initial state- Specified by:
resetin interfaceSwing3dCameraControl
-
selectInitialParameters
By default sets the focal point that it rotates around to the medium point- Specified by:
selectInitialParametersin interfaceSwing3dCameraControl
-
setCamera
Description copied from interface:Swing3dCameraControlSpecifies the camera used to render the scene- Specified by:
setCamerain interfaceSwing3dCameraControl
-
getWorldToCamera
Description copied from interface:Swing3dCameraControlTransform from world to camera- Specified by:
getWorldToCamerain interfaceSwing3dCameraControl
-
setChangeHandler
Description copied from interface:Swing3dCameraControlThis is called whenever the settings have changed and the rendering should be updated.- Specified by:
setChangeHandlerin interfaceSwing3dCameraControl
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseWheelMoved
- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Overrides:
mouseWheelMovedin classMouseAdapter
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter
-
getHelpText
Description copied from interface:Swing3dCameraControlExplains how to use the control- Specified by:
getHelpTextin interfaceSwing3dCameraControl
-