12
12
public interface VRInputAPI {
13
13
14
14
/**
15
- * Registers an action manifest. An actions manifest is a file that defines "actions" a player can make.
15
+ * Registers an action manifest. An action manifest is a file that defines "actions" a player can make.
16
16
* (An action is an abstract version of a button press). The action manifest may then also include references to
17
17
* further files that define default mappings between those actions and physical buttons on the VR controllers.
18
18
*
19
- * Note that registering an actions manifest will deactivate legacy inputs ( i.e. methods such as {@link #isButtonDown}
19
+ * Note that registering an actions manifest will deactivate legacy inputs. i.e. methods such as {@link #isButtonDown}
20
20
* will no longer work
21
21
*
22
22
* See https://github.com/ValveSoftware/openvr/wiki/Action-manifest for documentation on how to create an
@@ -138,7 +138,8 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
138
138
/**
139
139
* Check if the given button is down (more generally if the given input type is activated).
140
140
*
141
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
141
+ * @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
142
+ * Note: action-manifest will only work with the OpenVR api.
142
143
*
143
144
* @param controllerIndex the index of the controller to check.
144
145
* @param checkButton the button / input to check.
@@ -150,28 +151,34 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
150
151
/**
151
152
* Check if the given button / input from the given controller has been just pressed / activated.
152
153
*
153
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
154
+ * @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
155
+ * Note: action-manifest will only work with the OpenVR api.
154
156
*
155
157
* @param controllerIndex the index of the controller.
156
158
* @param checkButton the button / input to check.
157
- * @return <code>true</code> if the given button / input from the given controller has been just pressed / activated and <code>false</code> otherwise.
159
+ * @return <code>true</code> if the given input from the given controller has just been activated,
160
+ * <code>false</code> otherwise.
158
161
*/
159
162
@ Deprecated
160
163
public boolean wasButtonPressedSinceLastCall (int controllerIndex , VRInputType checkButton );
161
164
162
165
/**
163
- * Reset the current activation of the inputs. After a call to this method, all input activation is considered as new activation.
166
+ * Reset the current activation of the inputs. After a call to this method, any input activation is
167
+ * considered a new activation.
168
+ *
164
169
* @see #wasButtonPressedSinceLastCall(int, VRInputType)
165
170
*
166
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
171
+ * @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
172
+ * Note: action-manifest will only work with the OpenVR api.
167
173
*/
168
174
@ Deprecated
169
175
public void resetInputSinceLastCall ();
170
176
171
177
/**
172
178
* Get the controller axis delta from the last value.
173
179
*
174
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
180
+ * @deprecated Use action-manifest approach instead. See {@link #registerActionManifest}.
181
+ * Note: action-manifest will only work with the OpenVR api.
175
182
*
176
183
* @param controllerIndex the index of the controller.
177
184
* @param forAxis the axis.
@@ -198,9 +205,11 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
198
205
199
206
/**
200
207
* Get the axis value for the given input on the given controller.
201
- * This value is the {@link #getAxisRaw(int, VRInputType) raw value} multiplied by the {@link #getAxisMultiplier() axis multiplier}.
208
+ * This value is the {@link #getAxisRaw(int, VRInputType) raw value} multiplied by the
209
+ * {@link #getAxisMultiplier() axis multiplier}.
202
210
*
203
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
211
+ * @deprecated Use action-manifest approach instead. See {@link #registerActionManifest}.
212
+ * Note: action-manifest will only work with the OpenVR api.
204
213
*
205
214
* @param controllerIndex the index of the controller.
206
215
* @param forAxis the axis.
@@ -214,7 +223,8 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
214
223
/**
215
224
* Get the axis value for the given input on the given controller.
216
225
*
217
- * Deprecated as should use an actions manifest approach. See {@link #registerActionManifest} Note; action based will only work with the OpenVR api
226
+ * @deprecated Use the action-manifest approach. See {@link #registerActionManifest}.
227
+ * Note: action-manifest will only work with the OpenVR api.
218
228
*
219
229
* @param controllerIndex the index of the controller.
220
230
* @param forAxis the axis.
@@ -333,7 +343,7 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
333
343
/**
334
344
* Trigger a haptic pulse on the selected controller for the duration given in parameters (in seconds).
335
345
*
336
- * Deprecated, use triggerHapticAction instead (as it has more options and doesn't use deprecated methods)
346
+ * @deprecated Use triggerHapticAction instead - it has more options and doesn't use deprecated methods.
337
347
*
338
348
* @param controllerIndex the index of the controller.
339
349
* @param seconds the duration of the pulse in seconds.
@@ -344,9 +354,10 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
344
354
/**
345
355
* Triggers a haptic action (aka a vibration).
346
356
*
347
- * Note if you want a haptic action in only one hand that is done either by only binding the action to one hand in
348
- * the action manifest's standard bindings or by binding to both and using {@link #triggerHapticAction(String, float, float, float, String)}
349
- * to control which input it gets set to at run time
357
+ * Note: if you want a haptic action in only one hand, you can either bind the action to one hand in
358
+ * the action manifest's standard bindings or bind to both and use
359
+ * {@link #triggerHapticAction(String, float, float, float, String)}
360
+ * to control which input it gets set to at runtime.
350
361
*
351
362
* @param actionName The name of the action. Will be something like /actions/main/out/vibrate
352
363
* @param duration how long in seconds the
@@ -360,16 +371,18 @@ default void triggerHapticAction( String actionName, float duration, float frequ
360
371
/**
361
372
* Triggers a haptic action (aka a vibration) restricted to just one input (e.g. left or right hand).
362
373
*
363
- * Note that restrictToInput only restricts, it must still be bound to the input you want to send the haptic to in
364
- * the action manifest default bindings.
374
+ * Note: restrictToInput only restricts which input is used at runtime. You must still bind the input
375
+ * you want to send the haptic to in the action manifest default bindings.
365
376
*
366
- * This method is typically used to bind the haptic to both hands then decide at run time which hand to sent to *
377
+ * This method is typically used by binding the haptic to both hands, and then deciding at runtime which
378
+ * hand it should be sent to.
367
379
*
368
380
* @param actionName The name of the action. Will be something like /actions/main/out/vibrate
369
381
* @param duration how long in seconds the
370
382
* @param frequency in cycles per second
371
383
* @param amplitude between 0 and 1
372
- * @param restrictToInput the input to restrict the action to. E.g. /user/hand/right, /user/hand/left. Or null, which means "any input"
384
+ * @param restrictToInput the input to restrict the action to, such as <code>/user/hand/right</code> or
385
+ * <code>/user/hand/left</code>. <code>null</code> means "any input".
373
386
*/
374
387
default void triggerHapticAction ( String actionName , float duration , float frequency , float amplitude , String restrictToInput ){
375
388
throw new UnsupportedOperationException ("Action manifests are not supported for the currently used VR API" );
0 commit comments