public abstract class AbstractVRMouseManager extends java.lang.Object implements VRMouseManager
VRMouseManager. This class should be overrided by specific hardware implementation of VR devices.| Constructor and Description |
|---|
AbstractVRMouseManager(VREnvironment environment)
Create a new AbstractVRMouseManager attached to the given
VR environment. |
| Modifier and Type | Method and Description |
|---|---|
void |
centerMouse()
Center the mouse on the display.
|
Vector2f |
getCursorPosition()
Get the actual cursor position.
|
float |
getMouseMoveScale()
Get the move scale.
|
float |
getSpeedAcceleration()
Get the acceleration of the mouse.
|
float |
getSpeedSensitivity()
Get the sensitivity of the mouse.
|
VREnvironment |
getVREnvironment()
Get the
VR Environment to which this manager is attached. |
void |
initialize()
Initialize the VR mouse manager.
|
boolean |
isThumbstickMode()
Get if the VR device controller is used within thumb stick mode.
|
void |
setImage(java.lang.String texture)
Set the image to use as mouse cursor.
|
void |
setMouseMoveScale(float set)
Set the mouse move scale.
|
void |
setSpeed(float sensitivity,
float acceleration)
Set the speed of the mouse.
|
void |
setThumbstickMode(boolean set)
Set if the VR device controller is used within thumb stick mode.
|
void |
setVRMouseEnabled(boolean enabled)
Set if the mouse cursor should be used in the VR view.
|
void |
update(float tpf)
Update the mouse manager.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateAnalogAsMouseprotected final Vector2f cursorPos
public AbstractVRMouseManager(VREnvironment environment)
VR environment.environment - the VR environment that this manager is attached to.public void initialize()
VRMouseManagerinitialize in interface VRMouseManagerpublic VREnvironment getVREnvironment()
VRMouseManagerVR Environment to which this manager is attached.getVREnvironment in interface VRMouseManagerVR Environment to which this manager is attached.public void setVRMouseEnabled(boolean enabled)
VRMouseManagersetVRMouseEnabled in interface VRMouseManagerenabled - true if the mouse cursor should be displayed in VR and false otherwise.public void setThumbstickMode(boolean set)
VRMouseManagersetThumbstickMode in interface VRMouseManagerset - true if the VR device controller is used within thumb stick mode and false otherwise.public boolean isThumbstickMode()
VRMouseManagerisThumbstickMode in interface VRMouseManagertrue if the VR device controller is used within thumb stick mode and false otherwise.public void setSpeed(float sensitivity,
float acceleration)
VRMouseManagersetSpeed in interface VRMouseManagersensitivity - the sensitivity of the mouse.acceleration - the acceleration of the mouse.VRMouseManager.getSpeedAcceleration(),
VRMouseManager.getSpeedSensitivity()public float getSpeedSensitivity()
VRMouseManagergetSpeedSensitivity in interface VRMouseManagerVRMouseManager.setSpeed(float, float)public float getSpeedAcceleration()
VRMouseManagergetSpeedAcceleration in interface VRMouseManagerVRMouseManager.setSpeed(float, float)public float getMouseMoveScale()
VRMouseManagergetMouseMoveScale in interface VRMouseManagerVRMouseManager.setMouseMoveScale(float)public void setMouseMoveScale(float set)
VRMouseManagersetMouseMoveScale in interface VRMouseManagerset - the mouse move scale.VRMouseManager.getMouseMoveScale()public void setImage(java.lang.String texture)
VRMouseManagersetImage in interface VRMouseManagertexture - the image to use as mouse cursor.public Vector2f getCursorPosition()
VRMouseManagergetCursorPosition in interface VRMouseManagerpublic void centerMouse()
VRMouseManagercenterMouse in interface VRMouseManagerpublic void update(float tpf)
VRMouseManagerupdate method of the attached VR view manager.update in interface VRMouseManagertpf - the time per frame.