Package boofcv.gui.mesh
Class FirstPersonCameraControl
java.lang.Object
java.awt.event.MouseAdapter
boofcv.gui.mesh.FirstPersonCameraControl
- All Implemented Interfaces:
Swing3dCameraControl,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
Controls the camera using similar commands as a first person shooting. WASD keys will translate the camera and
dragging the mouse will cause a rotation.
-
Field Summary
Fields -
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 cameravoidvoidvoidreset()Resets the view back to it's initial statevoidThere is no real good universal way to select how much it should translate.voidsetCamera(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, mouseWheelMoved
-
Field Details
-
maxSamplePoints
public int maxSamplePoints
-
-
Constructor Details
-
FirstPersonCameraControl
public FirstPersonCameraControl()
-
-
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
-
selectInitialParameters
There is no real good universal way to select how much it should translate. In this case it will select a step such that it will take 150 ticks to get to the median point- Specified by:
selectInitialParametersin interfaceSwing3dCameraControl
-
reset
public void reset()Description copied from interface:Swing3dCameraControlResets the view back to it's initial state- Specified by:
resetin 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
-
getHelpText
Description copied from interface:Swing3dCameraControlExplains how to use the control- Specified by:
getHelpTextin interfaceSwing3dCameraControl
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter
-