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
Modifier and TypeFieldDescriptionCalled every time the camera has changedint
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attachControls
(JComponent parent) Attaches controls to the componentvoid
detachControls
(JComponent parent) Detaches controls to the componentExplains how to use the controlTransform from world to cameravoid
void
void
void
reset()
Resets the view back to it's initial statevoid
By default sets the focal point that it rotates around to the medium pointvoid
setCamera
(CameraPinhole intrinsics) Specifies the camera used to render the scenevoid
setChangeHandler
(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:Swing3dCameraControl
Attaches controls to the component- Specified by:
attachControls
in interfaceSwing3dCameraControl
-
detachControls
Description copied from interface:Swing3dCameraControl
Detaches controls to the component- Specified by:
detachControls
in interfaceSwing3dCameraControl
-
reset
public void reset()Description copied from interface:Swing3dCameraControl
Resets the view back to it's initial state- Specified by:
reset
in interfaceSwing3dCameraControl
-
selectInitialParameters
By default sets the focal point that it rotates around to the medium point- Specified by:
selectInitialParameters
in interfaceSwing3dCameraControl
-
setCamera
Description copied from interface:Swing3dCameraControl
Specifies the camera used to render the scene- Specified by:
setCamera
in interfaceSwing3dCameraControl
-
getWorldToCamera
Description copied from interface:Swing3dCameraControl
Transform from world to camera- Specified by:
getWorldToCamera
in interfaceSwing3dCameraControl
-
setChangeHandler
Description copied from interface:Swing3dCameraControl
This is called whenever the settings have changed and the rendering should be updated.- Specified by:
setChangeHandler
in interfaceSwing3dCameraControl
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
mouseWheelMoved
- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
- Overrides:
mouseWheelMoved
in classMouseAdapter
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
getHelpText
Description copied from interface:Swing3dCameraControl
Explains how to use the control- Specified by:
getHelpText
in interfaceSwing3dCameraControl
-