This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

Enumerations

enum
ovrButton {
ovrButton.ovrButton_A = 0x00000001, ovrButton.ovrButton_B = 0x00000002, ovrButton.ovrButton_RThumb = 0x00000004, ovrButton.ovrButton_RShoulder = 0x00000008, ovrButton.ovrButton_X = 0x00000100, ovrButton.ovrButton_Y = 0x00000200, ovrButton.ovrButton_LThumb = 0x00000400, ovrButton.ovrButton_LShoulder = 0x00000800, ovrButton.ovrButton_Up = 0x00010000, ovrButton.ovrButton_Down = 0x00020000, ovrButton.ovrButton_Left = 0x00040000, ovrButton.ovrButton_Right = 0x00080000, ovrButton.ovrButton_Enter = 0x00100000, ovrButton.ovrButton_Back = 0x00200000, ovrButton.ovrButton_GripTrigger = 0x04000000, ovrButton.ovrButton_Trigger = 0x20000000, ovrButton.ovrButton_Joystick = 0x80000000, ovrButton.ovrButton_EnumSize = 0x7fffffff, ovrButton.ovrButton_A = 0x00000001, ovrButton.ovrButton_B = 0x00000002, ovrButton.ovrButton_RThumb = 0x00000004, ovrButton.ovrButton_RShoulder = 0x00000008, ovrButton.ovrButton_X = 0x00000100, ovrButton.ovrButton_Y = 0x00000200, ovrButton.ovrButton_LThumb = 0x00000400, ovrButton.ovrButton_LShoulder = 0x00000800, ovrButton.ovrButton_Up = 0x00010000, ovrButton.ovrButton_Down = 0x00020000, ovrButton.ovrButton_Left = 0x00040000, ovrButton.ovrButton_Right = 0x00080000, ovrButton.ovrButton_Enter = 0x00100000, ovrButton.ovrButton_Back = 0x00200000, ovrButton.ovrButton_VolUp = 0x00400000, ovrButton.ovrButton_VolDown = 0x00800000, ovrButton.ovrButton_Home = 0x01000000, ovrButton.ovrButton_Private = ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home, ovrButton.ovrButton_RMask = ovrButton_A | ovrButton_B | ovrButton_RThumb | ovrButton_RShoulder, ovrButton.ovrButton_LMask = ovrButton_X | ovrButton_Y | ovrButton_LThumb | ovrButton_LShoulder | ovrButton_Enter, ovrButton.ovrButton_EnumSize = 0x7fffffff
}
Describes button input types.
enum
ovrTouch {
ovrTouch.ovrTouch_A = 0x00000001, ovrTouch.ovrTouch_B = 0x00000002, ovrTouch.ovrTouch_X = 0x00000004, ovrTouch.ovrTouch_Y = 0x00000008, ovrTouch.ovrTouch_TrackPad = 0x00000010, ovrTouch.ovrTouch_Joystick = 0x00000020, ovrTouch.ovrTouch_IndexTrigger = 0x00000040, ovrTouch.ovrTouch_ThumbUp = 0x00000100, ovrTouch.ovrTouch_IndexPointing = 0x00000200, ovrTouch.ovrTouch_BaseState = 0x00000300, ovrTouch.ovrTouch_LThumb = 0x00000400, ovrTouch.ovrTouch_RThumb = 0x00000800, ovrTouch.ovrTouch_EnumSize , ovrTouch.ovrTouch_A = ovrButton_A, ovrTouch.ovrTouch_B = ovrButton_B, ovrTouch.ovrTouch_RThumb = ovrButton_RThumb, ovrTouch.ovrTouch_RThumbRest = 0x00000008, ovrTouch.ovrTouch_RIndexTrigger = 0x00000010, ovrTouch.ovrTouch_RButtonMask = ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger, ovrTouch.ovrTouch_X = ovrButton_X, ovrTouch.ovrTouch_Y = ovrButton_Y, ovrTouch.ovrTouch_LThumb = ovrButton_LThumb, ovrTouch.ovrTouch_LThumbRest = 0x00000800, ovrTouch.ovrTouch_LIndexTrigger = 0x00001000, ovrTouch.ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger, ovrTouch.ovrTouch_RIndexPointing = 0x00000020, ovrTouch.ovrTouch_RThumbUp = 0x00000040, ovrTouch.ovrTouch_LIndexPointing = 0x00002000, ovrTouch.ovrTouch_LThumbUp = 0x00004000, ovrTouch.ovrTouch_RPoseMask = ovrTouch_RIndexPointing | ovrTouch_RThumbUp, ovrTouch.ovrTouch_LPoseMask = ovrTouch_LIndexPointing | ovrTouch_LThumbUp, ovrTouch.ovrTouch_EnumSize
}
Describes touch input types.
enum
ovrControllerType {
ovrControllerType.ovrControllerType_None = 0, ovrControllerType.ovrControllerType_Reserved0 = ( 1 << 0 ), ovrControllerType.ovrControllerType_Reserved1 = ( 1 << 1 ), ovrControllerType.ovrControllerType_TrackedRemote = ( 1 << 2 ), ovrControllerType.ovrControllerType_Headset = ( 1 << 3 ), ovrControllerType.ovrControllerType_Gamepad = ( 1 << 4 ), ovrControllerType.ovrControllerType_EnumSize = 0x7fffffff, ovrControllerType.ovrControllerType_None = 0x00, ovrControllerType.ovrControllerType_LTouch = 0x01, ovrControllerType.ovrControllerType_RTouch = 0x02, ovrControllerType.ovrControllerType_Touch = 0x03, ovrControllerType.ovrControllerType_Remote = 0x04, ovrControllerType.ovrControllerType_Headset = 0x08, ovrControllerType.ovrControllerType_XBox = 0x10, ovrControllerType.ovrControllerType_Active = 0xff, ovrControllerType.ovrControllerType_EnumSize = 0x7fffffff
}
Specifies which controller is connected; multiple can be connected at once.
enum
ovrDeviceIdType {
}
enum
ovrControllerCapabilties {
ovrControllerCapabilties.ovrControllerCaps_HasOrientationTracking = 0x00000001, ovrControllerCapabilties.ovrControllerCaps_HasPositionTracking = 0x00000002, ovrControllerCapabilties.ovrControllerCaps_LeftHand = 0x00000004, ovrControllerCapabilties.ovrControllerCaps_RightHand = 0x00000008, ovrControllerCapabilties.ovrControllerCaps_ModelOculusGo = 0x00000010, ovrControllerCapabilties.ovrControllerCaps_HasAnalogIndexTrigger = 0x00000040, ovrControllerCapabilties.ovrControllerCaps_HasAnalogGripTrigger = 0x00000080, ovrControllerCapabilties.ovrControllerCaps_HasSimpleHapticVibration = 0x00000200, ovrControllerCapabilties.ovrControllerCaps_HasBufferedHapticVibration = 0x00000400, ovrControllerCapabilties.ovrControllerCaps_ModelGearVR = 0x00000800, ovrControllerCapabilties.ovrControllerCaps_HasTrackpad = 0x00001000, ovrControllerCapabilties.ovrControllerCaps_HasJoystick = 0x00002000, ovrControllerCapabilties.ovrControllerCaps_ModelOculusTouch = 0x00004000, ovrControllerCapabilties.ovrControllerCaps_EnumSize = 0x7fffffff
}
Specifies capabilites of a controller Note that left and right hand are non-exclusive (a two-handed controller could set both)

Typedefs

uint32_t

Functions

ovrResult
vrapi_EnumerateInputDevices ( ovrMobile * ovr, const uint32_t index, ovrInputCapabilityHeader * capsHeader )
Enumerates the input devices connected to the system Start with index=0 and counting up.
ovrResult
Returns the capabilities of the input device for the corresponding device ID.
ovrResult
vrapi_SetHapticVibrationSimple ( ovrMobile * ovr, const ovrDeviceID deviceID, const float intensity )
Sets the vibration level of a haptic device.
ovrResult
vrapi_SetHapticVibrationBuffer ( ovrMobile * ovr, const ovrDeviceID deviceID, const ovrHapticBuffer * hapticBuffer )
Fills the haptic vibration buffer of a haptic device there should only be one call to vrapi_SetHapticVibrationSimple or vrapi_SetHapticVibrationBuffer per frame additional calls of either will return ovrError_InvalidOperation and have undefined behavior Input: ovr, deviceID, pointer to a hapticBuffer with filled in data.
ovrResult
vrapi_GetCurrentInputState ( ovrMobile * ovr, const ovrDeviceID deviceID, ovrInputStateHeader * inputState )
Returns the current input state for controllers, without positional tracking info.
ovrResult
vrapi_GetInputTrackingState ( ovrMobile * ovr, const ovrDeviceID deviceID, const double absTimeInSeconds, ovrTracking * tracking )
Returns the predicted input state based on the specified absolute system time in seconds.
OVR_VRAPI_DEPRECATED ( void vrapi_RecenterInputPose )
Can be called from any thread while in VR mode.
ovrResult
vrapi_SetRemoteEmulation ( ovrMobile * ovr, const bool emulationOn )
Enable or disable emulation for the GearVR Controller.

Enumeration Type Documentation

enum VrApi_Input.h.ovrButton
Describes button input types.
Enumerator
ovrButton_A= 0x00000001
ovrButton_B= 0x00000002
ovrButton_RThumb= 0x00000004
ovrButton_RShoulder= 0x00000008
ovrButton_X= 0x00000100
ovrButton_Y= 0x00000200
ovrButton_LThumb= 0x00000400
ovrButton_LShoulder= 0x00000800
ovrButton_Up= 0x00010000
ovrButton_Down= 0x00020000
ovrButton_Left= 0x00040000
ovrButton_Right= 0x00080000
ovrButton_Enter= 0x00100000
ovrButton_Back= 0x00200000
ovrButton_GripTrigger= 0x04000000
ovrButton_Trigger= 0x20000000
ovrButton_Joystick= 0x80000000
ovrButton_EnumSize= 0x7fffffff
ovrButton_A= 0x00000001
ovrButton_B= 0x00000002
ovrButton_RThumb= 0x00000004
ovrButton_RShoulder= 0x00000008
ovrButton_X= 0x00000100
ovrButton_Y= 0x00000200
ovrButton_LThumb= 0x00000400
ovrButton_LShoulder= 0x00000800
ovrButton_Up= 0x00010000
ovrButton_Down= 0x00020000
ovrButton_Left= 0x00040000
ovrButton_Right= 0x00080000
ovrButton_Enter= 0x00100000
ovrButton_Back= 0x00200000
ovrButton_VolUp= 0x00400000
ovrButton_VolDown= 0x00800000
ovrButton_Home= 0x01000000
ovrButton_Private
Bit mask of all buttons that are for private usage by Oculus.
ovrButton_RMask
Bit mask of all buttons on the right Touch controller.
ovrButton_LMask
Bit mask of all buttons on the left Touch controller.
ovrButton_EnumSize= 0x7fffffff
enum VrApi_Input.h.ovrTouch
Describes touch input types.
Enumerator
ovrTouch_A= 0x00000001
ovrTouch_B= 0x00000002
ovrTouch_X= 0x00000004
ovrTouch_Y= 0x00000008
ovrTouch_TrackPad= 0x00000010
ovrTouch_Joystick= 0x00000020
ovrTouch_IndexTrigger= 0x00000040
ovrTouch_ThumbUp= 0x00000100
ovrTouch_IndexPointing= 0x00000200
ovrTouch_BaseState= 0x00000300
ovrTouch_LThumb= 0x00000400
ovrTouch_RThumb= 0x00000800
ovrTouch_EnumSize
ovrTouch_A= ovrButton_A
ovrTouch_B= ovrButton_B
ovrTouch_RThumb= ovrButton_RThumb
ovrTouch_RThumbRest= 0x00000008
ovrTouch_RIndexTrigger= 0x00000010
ovrTouch_RButtonMask
Bit mask of all the button touches on the right controller.
ovrTouch_X= ovrButton_X
ovrTouch_Y= ovrButton_Y
ovrTouch_LThumb= ovrButton_LThumb
ovrTouch_LThumbRest= 0x00000800
ovrTouch_LIndexTrigger= 0x00001000
ovrTouch_LButtonMask
Bit mask of all the button touches on the left controller.
ovrTouch_RIndexPointing
Finger pose state Derived internally based on distance, proximity to sensors and filtering.
ovrTouch_RThumbUp= 0x00000040
ovrTouch_LIndexPointing= 0x00002000
ovrTouch_LThumbUp= 0x00004000
ovrTouch_RPoseMask
Bit mask of all right controller poses.
ovrTouch_LPoseMask
Bit mask of all left controller poses.
ovrTouch_EnumSize
enum VrApi_Input.h.ovrControllerType
Specifies which controller is connected; multiple can be connected at once.
Enumerator
ovrControllerType_None= 0
ovrControllerType_Reserved0= ( 1 << 0 )
ovrControllerType_Reserved1= ( 1 << 1 )
ovrControllerType_TrackedRemote= ( 1 << 2 )
ovrControllerType_Headset= ( 1 << 3 )
ovrControllerType_Gamepad= ( 1 << 4 )
ovrControllerType_EnumSize= 0x7fffffff
ovrControllerType_None= 0x00
ovrControllerType_LTouch= 0x01
ovrControllerType_RTouch= 0x02
ovrControllerType_Touch= 0x03
ovrControllerType_Remote= 0x04
ovrControllerType_Headset= 0x08
ovrControllerType_XBox= 0x10
ovrControllerType_Active= 0xff
ovrControllerType_EnumSize= 0x7fffffff
enum VrApi_Input.h.ovrDeviceIdType
Enumerator
ovrDeviceIdType_Invalid= 0x7fffffff
ovrDeviceIdType_Invalid= 0x7fffffff
enum VrApi_Input.h.ovrControllerCapabilties
Specifies capabilites of a controller Note that left and right hand are non-exclusive (a two-handed controller could set both)
Enumerator
ovrControllerCaps_HasOrientationTracking= 0x00000001
ovrControllerCaps_HasPositionTracking= 0x00000002
ovrControllerCaps_LeftHand= 0x00000004
ovrControllerCaps_RightHand= 0x00000008
ovrControllerCaps_ModelOculusGo= 0x00000010
ovrControllerCaps_HasAnalogIndexTrigger= 0x00000040
ovrControllerCaps_HasAnalogGripTrigger= 0x00000080
ovrControllerCaps_HasSimpleHapticVibration= 0x00000200
ovrControllerCaps_HasBufferedHapticVibration= 0x00000400
ovrControllerCaps_ModelGearVR= 0x00000800
ovrControllerCaps_HasTrackpad= 0x00001000
ovrControllerCaps_HasJoystick= 0x00002000
ovrControllerCaps_ModelOculusTouch= 0x00004000
ovrControllerCaps_EnumSize= 0x7fffffff

Typedef Documentation

typedef uint32_t ovrDeviceID ( )

Function Documentation

OVR_VRAPI_EXPORT ovrResult vrapi_EnumerateInputDevices ( ovrMobile * ovr, const uint32_t index, ovrInputCapabilityHeader * capsHeader )
Enumerates the input devices connected to the system Start with index=0 and counting up.
Stop when ovrResult is < 0
Input: ovrMobile, device index, and a capabilities header The capabilities header does not need to have any fields set before calling. Output: capabilitiesHeader with information for that enumeration index
OVR_VRAPI_EXPORT ovrResult vrapi_GetInputDeviceCapabilities ( ovrMobile * ovr, ovrInputCapabilityHeader * capsHeader )
Returns the capabilities of the input device for the corresponding device ID.
Input: ovr, pointer to a capabilities structure Output: capabilities will be filled with information for the deviceID Example: The Type field of the capabilitiesHeader must be set when calling this function. Normally the capabilitiesHeader is obtained from the vrapi_EnumerateInputDevices API The Type field in the header should match the structure type that is passed.
ovrInputCapabilityHeader capsHeader;
if ( vrapi_EnumerateInputDevices( ovr, deviceIndex, &capsHeader ) >= 0 ) {
    if ( capsHeader.Type == ovrDeviceType_TrackedRemote ) {
        ovrInputTrackedRemoteCapabilities remoteCaps;
        remoteCaps.Header = capsHeader;
        vrapi_GetInputDeviceCapabilities( ovr, &remoteCaps.Header );  
OVR_VRAPI_EXPORT ovrResult vrapi_SetHapticVibrationSimple ( ovrMobile * ovr, const ovrDeviceID deviceID, const float intensity )
Sets the vibration level of a haptic device.
there should only be one call to vrapi_SetHapticVibrationSimple or vrapi_SetHapticVibrationBuffer per frame additional calls of either will return ovrError_InvalidOperation and have undefined behavior Input: ovr, deviceID, intensity: 0.0 - 1.0
OVR_VRAPI_EXPORT ovrResult vrapi_SetHapticVibrationBuffer ( ovrMobile * ovr, const ovrDeviceID deviceID, const ovrHapticBuffer * hapticBuffer )
Fills the haptic vibration buffer of a haptic device there should only be one call to vrapi_SetHapticVibrationSimple or vrapi_SetHapticVibrationBuffer per frame additional calls of either will return ovrError_InvalidOperation and have undefined behavior Input: ovr, deviceID, pointer to a hapticBuffer with filled in data.
OVR_VRAPI_EXPORT ovrResult vrapi_GetCurrentInputState ( ovrMobile * ovr, const ovrDeviceID deviceID, ovrInputStateHeader * inputState )
Returns the current input state for controllers, without positional tracking info.
Input: ovr, deviceID, pointer to a capabilities structure (with Type field set) Output: Upon return the inputState structure will be set to the device's current input state Example: The Type field of the passed ovrInputStateHeader must be set to the type that corresponds to the type of structure being passed. The pointer to the ovrInputStateHeader should be a pointer to a Header field in structure matching the value of the Type field.
ovrInputStateTrackedRemote state; state.Header.Type = ovrControllerType_TrackedRemote; if ( vrapi_GetCurrentInputState( ovr, remoteDeviceID, &state.Header ) >= 0 ) {
OVR_VRAPI_EXPORT ovrResult vrapi_GetInputTrackingState ( ovrMobile * ovr, const ovrDeviceID deviceID, const double absTimeInSeconds, ovrTracking * tracking )
Returns the predicted input state based on the specified absolute system time in seconds.
Pass absTime value of 0.0 to request the most recent sensor reading. Input: ovr, device ID, prediction time Output: ovrTracking structure containing the device's predicted tracking state.
OVR_VRAPI_DEPRECATED ( void vrapi_RecenterInputPose )
Can be called from any thread while in VR mode.
Recenters the tracked remote to the current yaw of the headset. Input: ovr, device ID Output: None
OVR_VRAPI_EXPORT ovrResult vrapi_SetRemoteEmulation ( ovrMobile * ovr, const bool emulationOn )
Enable or disable emulation for the GearVR Controller.
Emulation is false by default. If emulationOn == true, then the back button and touch events on the GearVR Controller will be sent through the Android dispatchKeyEvent and dispatchTouchEvent path as if they were from the headset back button and touchpad. Applications that are intentionally enumerating the controller will likely want to turn emulation off in order to differentiate between controller and headset input events.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
99
100
101
102
104
105
106
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
134
135
136
137
139
140
142
143
146
147
148
150
151
152
155
157
159
160
161
162
163
174
175
176
177
179
180
182
183
186
187
188
190
191
192
193
195
196
197
198
200
201
203
204
205
206
207
208
210
211
213
214
216
217
218
219
220
221
222
223
226
227
229
230
232
233
234
238
239
240
241
243
244
247
248
250
251
253
256
258
259
261
262
263
264
266
267
268
269
270
271
272
273
274
275
276
281
282
283
284
286
287
290
291
293
294
295
297
298
299
300
302
303
304
305
306
307
308
310
312
313
314
315
316
317
318
319
320
321
328
329
345
346
351
352
357
358
372
373
374
379
380
381
385
386
393
394
395
396
397
398
399
400
/************************************************************************************

Filename    :   VrApi_Input.h
Content     :   Input API
Created     :   Feb 9, 2016
Authors     :   Jonathan E. Wright
Language    :   C99

Copyright   :   Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.

*************************************************************************************/
#ifndef OVR_VrApi_Input_h
#define OVR_VrApi_Input_h


#include <stddef.h>
#include <stdint.h>
#include "VrApi_Config.h"
#include "VrApi_Types.h"

typedefenum ovrButton_
{
    ovrButton_A           = 0x00000001, // Set for trigger pulled on the Gear VR and Go Controllers
    ovrButton_B           = 0x00000002,
    ovrButton_RThumb      = 0x00000004,
    ovrButton_RShoulder   = 0x00000008,

    ovrButton_X           = 0x00000100,
    ovrButton_Y           = 0x00000200,
    ovrButton_LThumb      = 0x00000400,
    ovrButton_LShoulder   = 0x00000800,

    ovrButton_Up          = 0x00010000,
    ovrButton_Down        = 0x00020000,
    ovrButton_Left        = 0x00040000,
    ovrButton_Right       = 0x00080000,
    ovrButton_Enter       = 0x00100000, //< Set for touchpad click on the Gear VR and Go Controllers, menu button on Left Quest Controller
    ovrButton_Back        = 0x00200000, //< Back button on the headset or Gear VR Controller (only set when a short press comes up)
    ovrButton_GripTrigger = 0x04000000, //< grip trigger engaged
    ovrButton_Trigger     = 0x20000000, //< Index Trigger engaged
    ovrButton_Joystick    = 0x80000000, //< Click of the Joystick

    ovrButton_EnumSize  = 0x7fffffff
} ovrButton;


typedefenum ovrTouch_
{
    ovrTouch_A             = 0x00000001,    //< The A button has a finger resting on it.
    ovrTouch_B             = 0x00000002,    //< The B button has a finger resting on it.
    ovrTouch_X             = 0x00000004,    //< The X button has a finger resting on it.
    ovrTouch_Y             = 0x00000008,    //< The Y button has a finger resting on it.
    ovrTouch_TrackPad      = 0x00000010,    //< The TrackPad has a finger resting on it.
    ovrTouch_Joystick      = 0x00000020,    //< The Joystick has a finger resting on it.
    ovrTouch_IndexTrigger  = 0x00000040,    //< The Index Trigger has a finger resting on it.
    ovrTouch_ThumbUp       = 0x00000100,    //< None of A, B, X, Y, or Joystick has a finger/thumb in proximity to it
    ovrTouch_IndexPointing = 0x00000200,    //< The finger is sufficiently far away from the trigger to not be considered in proximity to it.
    ovrTouch_BaseState     = 0x00000300,    //< No buttons touched or in proximity.  finger pointing and thumb up.
    ovrTouch_LThumb        = 0x00000400,    //< The Left controller Joystick has a finger/thumb resting on it.
    ovrTouch_RThumb        = 0x00000800,    //< The Right controller Joystick has a finger/thumb resting on it.
    ovrTouch_EnumSize
} ovrTouch;

typedefenum ovrControllerType_
{
    ovrControllerType_None          = 0,
    ovrControllerType_Reserved0     = ( 1 << 0 ),   //< LTouch in CAPI
    ovrControllerType_Reserved1     = ( 1 << 1 ),   //< RTouch in CAPI
    ovrControllerType_TrackedRemote = ( 1 << 2 ),
    ovrControllerType_Headset       = ( 1 << 3 ),
    ovrControllerType_Gamepad       = ( 1 << 4 ),   //< Xbox in CAPI

    ovrControllerType_EnumSize      = 0x7fffffff
} ovrControllerType;

typedef uint32_t ovrDeviceID;

typedefenum ovrDeviceIdType_
{
    ovrDeviceIdType_Invalid = 0x7fffffff
} ovrDeviceIdType;

typedefstruct ovrInputCapabilityHeader_
{
    ovrControllerType   Type;

    ovrDeviceID         DeviceID;
} ovrInputCapabilityHeader;

typedefenum ovrControllerCapabilities_
{
    ovrControllerCaps_HasOrientationTracking        = 0x00000001,
    ovrControllerCaps_HasPositionTracking           = 0x00000002,
    ovrControllerCaps_LeftHand                      = 0x00000004,   //< Controller is configured for left hand
    ovrControllerCaps_RightHand                     = 0x00000008,   //< Controller is configured for right hand

    ovrControllerCaps_ModelOculusGo                 = 0x00000010,   //< Controller for Oculus Go devices

    ovrControllerCaps_HasAnalogIndexTrigger         = 0x00000040,   //< Controller has an analog index trigger vs. a binary one
    ovrControllerCaps_HasAnalogGripTrigger          = 0x00000080,   //< Controller has an analog grip trigger vs. a binary one
    ovrControllerCaps_HasSimpleHapticVibration      = 0x00000200,   //< Controller supports simple haptic vibration
    ovrControllerCaps_HasBufferedHapticVibration    = 0x00000400,   //< Controller supports buffered haptic vibration

    ovrControllerCaps_ModelGearVR                   = 0x00000800,   //< Controller is the Gear VR Controller

    ovrControllerCaps_HasTrackpad                   = 0x00001000,   //< Controller has a trackpad

    ovrControllerCaps_HasJoystick                   = 0x00002000,   //< Controller has a joystick.
    ovrControllerCaps_ModelOculusTouch              = 0x00004000,   //< Oculus Touch Controller For Oculus Quest

    ovrControllerCaps_EnumSize                  = 0x7fffffff
} ovrControllerCapabilties;

typedefstruct ovrInputTrackedRemoteCapabilities_
{
    ovrInputCapabilityHeader    Header;

    uint32_t                    ControllerCapabilities;

    uint32_t                    ButtonCapabilities;

    uint16_t                    TrackpadMaxX;
    uint16_t                    TrackpadMaxY;

float                       TrackpadSizeX;
float                       TrackpadSizeY;

    uint32_t HapticSamplesMax;
    uint32_t HapticSampleDurationMS;
    uint32_t TouchCapabilities;
    uint32_t Reserved4;
    uint32_t Reserved5;
} ovrInputTrackedRemoteCapabilities;

typedefstruct ovrInputHeadsetCapabilities_
{
    ovrInputCapabilityHeader    Header;

    uint32_t                    ControllerCapabilities;

    uint32_t                    ButtonCapabilities;

    uint16_t                    TrackpadMaxX;
    uint16_t                    TrackpadMaxY;

float                       TrackpadSizeX;
float                       TrackpadSizeY;
} ovrInputHeadsetCapabilities;

typedefstruct ovrInputGamepadCapabilities_
{
    ovrInputCapabilityHeader    Header;

    uint32_t                    ControllerCapabilities;

    uint32_t                    ButtonCapabilities;

// Reserved for future use.
    uint64_t            Reserved[20];
} ovrInputGamepadCapabilities;

typedefstruct ovrHapticBuffer_
{
double                      BufferTime;

    uint32_t                    NumSamples;

// True if this is the end of the buffers being sent
bool                        Terminated;

    uint8_t *                   HapticBuffer;
} ovrHapticBuffer;

typedefstruct ovrInputStateHeader_
{
    ovrControllerType   ControllerType;

double              TimeInSeconds;
} ovrInputStateHeader;

typedefstruct ovrInputStateTrackedRemote_
{
    ovrInputStateHeader Header;

    uint32_t            Buttons;

    uint32_t            TrackpadStatus;

    ovrVector2f         TrackpadPosition;

    uint8_t             BatteryPercentRemaining;    
    uint8_t             RecenterCount;  
    uint16_t            Reserved;

// Analog values from 0.0 - 1.0 of the pull of the triggers
float IndexTrigger;
float GripTrigger;

    uint32_t Touches;
    uint32_t Reserved5a;
// Analog values from -1.0 - 1.0
// The value is set to 0.0 on Joystick, if the magnitude of the vector is < 0.1f
    ovrVector2f Joystick;
// JoystickNoDeadZone does change the raw values of the data.
    ovrVector2f JoystickNoDeadZone;

} ovrInputStateTrackedRemote;


typedefstruct ovrInputStateHeadset_
{
    ovrInputStateHeader Header;

    uint32_t            Buttons;

    uint32_t            TrackpadStatus;

    ovrVector2f         TrackpadPosition;
} ovrInputStateHeadset;

typedefstruct ovrInputStateGamepad_
{
    ovrInputStateHeader Header;

    uint32_t            Buttons;

// Analog value from 0.0 - 1.0 of the pull of the Left Trigger
float               LeftTrigger;
// Analog value from 0.0 - 1.0 of the pull of the Right Trigger
float               RightTrigger;

    ovrVector2f         LeftJoystick;
    ovrVector2f         RightJoystick;

// Reserved for future use.
    uint64_t            Reserved[20];
} ovrInputStateGamepad;

#if defined( __cplusplus )
extern"C" {
#endif

OVR_VRAPI_EXPORT ovrResult vrapi_EnumerateInputDevices( ovrMobile * ovr, const uint32_t index, ovrInputCapabilityHeader * capsHeader );

OVR_VRAPI_EXPORT ovrResult vrapi_GetInputDeviceCapabilities( ovrMobile * ovr, ovrInputCapabilityHeader * capsHeader );

OVR_VRAPI_EXPORT ovrResult vrapi_SetHapticVibrationSimple( ovrMobile * ovr, const ovrDeviceID deviceID, constfloat intensity );

OVR_VRAPI_EXPORT ovrResult vrapi_SetHapticVibrationBuffer( ovrMobile * ovr, const ovrDeviceID deviceID, const ovrHapticBuffer * hapticBuffer );

OVR_VRAPI_EXPORT ovrResult vrapi_GetCurrentInputState( ovrMobile * ovr, const ovrDeviceID deviceID, ovrInputStateHeader * inputState );


OVR_VRAPI_EXPORT ovrResult vrapi_GetInputTrackingState( ovrMobile * ovr, const ovrDeviceID deviceID, 
constdouble absTimeInSeconds, ovrTracking * tracking );

OVR_VRAPI_DEPRECATED( OVR_VRAPI_EXPORT void vrapi_RecenterInputPose( ovrMobile * ovr, const ovrDeviceID deviceID ) );

OVR_VRAPI_EXPORT ovrResult vrapi_SetRemoteEmulation( ovrMobile * ovr, constbool emulationOn );

#if defined( __cplusplus )
}   // extern "C"
#endif


#endif  // OVR_VrApi_Input_h
The documentation for this file was generated from the following file: Include/VrApi_Input.h