Package com.jme3.input.vr
Interface VRMouseManager
- All Known Implementing Classes:
- AbstractVRMouseManager,- LWJGLOpenVRMouseManager,- OculusMouseManager,- OpenVRMouseManager
public interface VRMouseManager
A class dedicated to the handling of the mouse within VR environment.
- 
Method SummaryModifier and TypeMethodDescriptionvoidCenter the mouse on the display.Get the actual cursor position.floatGet the move scale.floatGet the acceleration of the mouse.floatGet the sensitivity of the mouse.Get theVR Environmentto which this manager is attached.voidInitialize the VR mouse manager.booleanGet if the VR device controller is used within thumb stick mode.voidSet the image to use as mouse cursor.voidsetMouseMoveScale(float set) Set the mouse move scale.voidsetSpeed(float sensitivity, float acceleration) Set the speed of the mouse.voidsetThumbstickMode(boolean set) Set if the VR device controller is used within thumb stick mode.voidsetVRMouseEnabled(boolean enabled) Set if the mouse cursor should be used in the VR view.voidupdate(float tpf) Update the mouse manager.voidupdateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf) Update analog controller as it was a mouse controller.
- 
Method Details- 
initializevoid initialize()Initialize the VR mouse manager.
- 
getVREnvironmentVREnvironment getVREnvironment()Get theVR Environmentto which this manager is attached.- Returns:
- the VR Environmentto which this manager is attached.
 
- 
setVRMouseEnabledvoid setVRMouseEnabled(boolean enabled) Set if the mouse cursor should be used in the VR view.- Parameters:
- enabled-- trueif the mouse cursor should be displayed in VR and- falseotherwise.
 
- 
setThumbstickModevoid setThumbstickMode(boolean set) Set if the VR device controller is used within thumb stick mode.- Parameters:
- set-- trueif the VR device controller is used within thumb stick mode and- falseotherwise.
 
- 
isThumbstickModeboolean isThumbstickMode()Get if the VR device controller is used within thumb stick mode.- Returns:
- trueif the VR device controller is used within thumb stick mode and- falseotherwise.
 
- 
setSpeedvoid setSpeed(float sensitivity, float acceleration) Set the speed of the mouse.- Parameters:
- sensitivity- the sensitivity of the mouse.
- acceleration- the acceleration of the mouse.
- See Also:
 
- 
getSpeedSensitivityfloat getSpeedSensitivity()Get the sensitivity of the mouse.- Returns:
- the sensitivity of the mouse.
- See Also:
 
- 
getSpeedAccelerationfloat getSpeedAcceleration()Get the acceleration of the mouse.- Returns:
- the acceleration of the mouse.
- See Also:
 
- 
getMouseMoveScalefloat getMouseMoveScale()Get the move scale. return the move scale.- See Also:
 
- 
setMouseMoveScalevoid setMouseMoveScale(float set) Set the mouse move scale.- Parameters:
- set- the mouse move scale.
- See Also:
 
- 
setImageSet the image to use as mouse cursor. The given string describe an asset that the underlying application asset manager has to load.- Parameters:
- texture- the image to use as mouse cursor.
 
- 
updateAnalogAsMousevoid updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf) Update analog controller as it was a mouse controller.- Parameters:
- inputIndex- the index of the controller attached to the VR system.
- mouseListener- the JMonkey mouse listener to trigger.
- mouseXName- the mouseX identifier.
- mouseYName- the mouseY identifier
- tpf- the time per frame.
 
- 
getCursorPositionVector2f getCursorPosition()Get the actual cursor position.- Returns:
- the actual cursor position.
 
- 
centerMousevoid centerMouse()Center the mouse on the display.
- 
updatevoid update(float tpf) Update the mouse manager. This method should not be called manually. The standard behavior for this method is to be called from theupdate methodof the attachedVR view manager.- Parameters:
- tpf- the time per frame.
 
 
-