public interface VRInputAPI
| Modifier and Type | Method and Description | 
|---|---|
Vector3f | 
getAngularVelocity(int controllerIndex)
Get the controller angular velocity on all axes. 
 | 
Vector2f | 
getAxis(int controllerIndex,
       VRInputType forAxis)
Get the axis value for the given input on the given controller. 
 | 
Vector2f | 
getAxisDeltaSinceLastCall(int controllerIndex,
                         VRInputType forAxis)
Get the controller axis delta from the last value. 
 | 
float | 
getAxisMultiplier()
Get the controller axis multiplier. 
 | 
Vector2f | 
getAxisRaw(int controllerIndex,
          VRInputType forAxis)
Get the axis value for the given input on the given controller. 
 | 
Vector3f | 
getFinalObserverPosition(int index)
Get the position of the input after all positional tracking is complete. 
 | 
Quaternion | 
getFinalObserverRotation(int index)
Get where is the controller pointing, after all rotations are combined. 
 | 
Quaternion | 
getOrientation(int index)
Get the orientation of the input. 
 | 
Vector3f | 
getPosition(int index)
Get the position of the input. 
 | 
java.lang.Object | 
getRawControllerState(int index)
Get the native wrapping of a controller state. 
 | 
VRTrackedController | 
getTrackedController(int index)
Get a tracked controller (for example, a hand controller) that is attached to the VR system. 
 | 
int | 
getTrackedControllerCount()
Get the number of tracked controllers (for example, hand controllers) attached to the VR system. 
 | 
Vector3f | 
getVelocity(int controllerIndex)
Get the controller velocity on all axes. 
 | 
boolean | 
init()
Initialize the input. 
 | 
boolean | 
isButtonDown(int controllerIndex,
            VRInputType checkButton)
Check if the given button is down (more generally if the given input type is activated). 
 | 
boolean | 
isInputDeviceTracking(int index)
Check if the input device is actually tracked (i-e if we can obtain a pose from the input). 
 | 
boolean | 
isInputFocused()
Check if the VR system has the focus and if it's not used by other process. 
 | 
void | 
resetInputSinceLastCall()
Reset the current activation of the inputs. 
 | 
void | 
setAxisMultiplier(float set)
Set the controller axis multiplier. 
 | 
void | 
swapHands()
Swap the two hands (exchange the hands controller 1 and 2 indices). 
 | 
void | 
triggerHapticPulse(int controllerIndex,
                  float seconds)
Trigger a haptic pulse on the selected controller for the duration given in parameters (in seconds). 
 | 
void | 
updateConnectedControllers()
Update the connected controllers. 
 | 
void | 
updateControllerStates()
Update the controller states. 
 | 
boolean | 
wasButtonPressedSinceLastCall(int controllerIndex,
                             VRInputType checkButton)
Check if the given button / input from the given controller has been just pressed / activated. 
 | 
boolean isButtonDown(int controllerIndex,
                     VRInputType checkButton)
controllerIndex - the index of the controller to check.checkButton - the button / input to check.true if the button / input is down / activated and false otherwise.boolean wasButtonPressedSinceLastCall(int controllerIndex,
                                      VRInputType checkButton)
controllerIndex - the index of the controller.checkButton - the button / input to check.true if the given button / input from the given controller has been just pressed / activated and false otherwise.void resetInputSinceLastCall()
Vector2f getAxisDeltaSinceLastCall(int controllerIndex, VRInputType forAxis)
controllerIndex - the index of the controller.forAxis - the axis.Vector3f getVelocity(int controllerIndex)
controllerIndex - the index of the controller.getAngularVelocity(int)Vector3f getAngularVelocity(int controllerIndex)
controllerIndex - the index of the controller.getVelocity(int)Vector2f getAxis(int controllerIndex, VRInputType forAxis)
raw value multiplied by the  axis multiplier.controllerIndex - the index of the controller.forAxis - the axis.getAxisRaw(int, VRInputType), 
getAxisMultiplier()Vector2f getAxisRaw(int controllerIndex, VRInputType forAxis)
controllerIndex - the index of the controller.forAxis - the axis.getAxis(int, VRInputType)boolean init()
true if the initialization is successful and false otherwise.int getTrackedControllerCount()
getTrackedController(int)VRTrackedController getTrackedController(int index)
index - the index of the controller.getTrackedControllerCount()void updateConnectedControllers()
void updateControllerStates()
java.lang.Object getRawControllerState(int index)
index - the index of the controller.void swapHands()
float getAxisMultiplier()
setAxisMultiplier(float)void setAxisMultiplier(float set)
set - the controller axis multiplier.getAxisMultiplier()boolean isInputFocused()
true if the VR system has the focus and false otherwise.boolean isInputDeviceTracking(int index)
index - the index of the controller.true if the input device is actually tracked and false otherwise.Quaternion getOrientation(int index)
index - the index of the controller.Vector3f getPosition(int index)
index - the index of the controller.Quaternion getFinalObserverRotation(int index)
index - the index of the controller.Vector3f getFinalObserverPosition(int index)
index - the index of the controller.void triggerHapticPulse(int controllerIndex,
                        float seconds)
controllerIndex - the index of the controller.seconds - the duration of the pulse in seconds.