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
-
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
reset()
Resets the view back to it's initial statevoid
There is no real good universal way to select how much it should translate.void
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, mouseWheelMoved
-
Field Details
-
maxSamplePoints
public int maxSamplePoints
-
-
Constructor Details
-
FirstPersonCameraControl
public FirstPersonCameraControl()
-
-
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
-
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:
selectInitialParameters
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
-
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
-
getHelpText
Description copied from interface:Swing3dCameraControl
Explains how to use the control- Specified by:
getHelpText
in interfaceSwing3dCameraControl
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-