public abstract class AbstractVRMouseManager extends java.lang.Object implements VRMouseManager
VRMouseManager
. This class should be overridden 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, wait
updateAnalogAsMouse
protected final Vector2f cursorPos
public AbstractVRMouseManager(VREnvironment environment)
VR environment
.environment
- the VR environment
that this manager is attached to.public void initialize()
VRMouseManager
initialize
in interface VRMouseManager
public VREnvironment getVREnvironment()
VRMouseManager
VR Environment
to which this manager is attached.getVREnvironment
in interface VRMouseManager
VR Environment
to which this manager is attached.public void setVRMouseEnabled(boolean enabled)
VRMouseManager
setVRMouseEnabled
in interface VRMouseManager
enabled
- true
if the mouse cursor should be displayed in VR and false
otherwise.public void setThumbstickMode(boolean set)
VRMouseManager
setThumbstickMode
in interface VRMouseManager
set
- true
if the VR device controller is used within thumb stick mode and false
otherwise.public boolean isThumbstickMode()
VRMouseManager
isThumbstickMode
in interface VRMouseManager
true
if the VR device controller is used within thumb stick mode and false
otherwise.public void setSpeed(float sensitivity, float acceleration)
VRMouseManager
setSpeed
in interface VRMouseManager
sensitivity
- the sensitivity of the mouse.acceleration
- the acceleration of the mouse.VRMouseManager.getSpeedAcceleration()
,
VRMouseManager.getSpeedSensitivity()
public float getSpeedSensitivity()
VRMouseManager
getSpeedSensitivity
in interface VRMouseManager
VRMouseManager.setSpeed(float, float)
public float getSpeedAcceleration()
VRMouseManager
getSpeedAcceleration
in interface VRMouseManager
VRMouseManager.setSpeed(float, float)
public float getMouseMoveScale()
VRMouseManager
getMouseMoveScale
in interface VRMouseManager
VRMouseManager.setMouseMoveScale(float)
public void setMouseMoveScale(float set)
VRMouseManager
setMouseMoveScale
in interface VRMouseManager
set
- the mouse move scale.VRMouseManager.getMouseMoveScale()
public void setImage(java.lang.String texture)
VRMouseManager
setImage
in interface VRMouseManager
texture
- the image to use as mouse cursor.public Vector2f getCursorPosition()
VRMouseManager
getCursorPosition
in interface VRMouseManager
public void centerMouse()
VRMouseManager
centerMouse
in interface VRMouseManager
public void update(float tpf)
VRMouseManager
update method
of the attached VR view manager
.update
in interface VRMouseManager
tpf
- the time per frame.