Class EXTConformanceAutomation
The XR_EXT_conformance_automation allows conformance test and runtime developers to provide hints to the underlying runtime as to what input the test is expecting. This enables runtime authors to automate the testing of their runtime conformance. This is useful for achieving rapidly iterative runtime development whilst maintaining conformance for runtime releases.
This extension provides the following capabilities:
- The ability to toggle the active state of an input device.
- The ability to set the state of an input device button or other input component.
- The ability to set the location of the input device.
Applications may call these functions at any time. The runtime must do its best to honor the request of applications calling these functions, however it does not guarantee that any state change will be reflected immediately, at all, or with the exact value that was requested. Applications are thus advised to wait for the state change to be observable and to not assume that the value they requested will be the value observed. If any of the functions of this extension are called, control over input must be removed from the physical hardware of the system.
Warning
This extension is not intended for use by non-conformance-test applications. A runtime may require a runtime-specified configuration such as a "developer mode" to be enabled before reporting support for this extension or providing a non-stub implementation of it.
Do not use this functionality in a non-conformance-test application!
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrSetInputDeviceLocationEXT(XrSession session, long topLevelPath, long inputSourcePath, XrSpace space, long pose) Unsafe version of:SetInputDeviceLocationEXTstatic intnxrSetInputDeviceStateVector2fEXT(XrSession session, long topLevelPath, long inputSourcePath, long state) Unsafe version of:SetInputDeviceStateVector2fEXTstatic intxrSetInputDeviceActiveEXT(XrSession session, long interactionProfile, long topLevelPath, boolean isActive) Sets the active state of the input device.static intxrSetInputDeviceLocationEXT(XrSession session, long topLevelPath, long inputSourcePath, XrSpace space, XrPosef pose) Sets the effective location of a pose input source on the input device.static intxrSetInputDeviceStateBoolEXT(XrSession session, long topLevelPath, long inputSourcePath, boolean state) Sets the state of a boolean input source on the input device.static intxrSetInputDeviceStateFloatEXT(XrSession session, long topLevelPath, long inputSourcePath, float state) Sets the state of a float input source on the input device.static intxrSetInputDeviceStateVector2fEXT(XrSession session, long topLevelPath, long inputSourcePath, XrVector2f state) Sets the state of a 2D vector input source on the input device.
-
Field Details
-
XR_EXT_conformance_automation_SPEC_VERSION
public static final int XR_EXT_conformance_automation_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_EXT_CONFORMANCE_AUTOMATION_EXTENSION_NAME
The extension name.- See Also:
-
-
Method Details
-
xrSetInputDeviceActiveEXT
public static int xrSetInputDeviceActiveEXT(XrSession session, long interactionProfile, long topLevelPath, boolean isActive) Sets the active state of the input device.C Specification
XrResult xrSetInputDeviceActiveEXT( XrSession session, XrPath interactionProfile, XrPath topLevelPath, XrBool32 isActive);Valid Usage
sessionmust be a valid session handle.topLevelPathmust be a valid top level path.
Valid Usage (Implicit)
- The
XR_EXT_conformance_automationextension must be enabled prior to callingSetInputDeviceActiveEXT sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- theXrSessionto set the input device state in.interactionProfile- the path representing the interaction profile of the input device (e.g. pathname:/interaction_profiles/khr/simple_controller).topLevelPath- the path representing the input device (e.g. pathname:/user/hand/left).isActive- the requested activation state of the input device.
-
xrSetInputDeviceStateBoolEXT
public static int xrSetInputDeviceStateBoolEXT(XrSession session, long topLevelPath, long inputSourcePath, boolean state) Sets the state of a boolean input source on the input device.C Specification
XrResult xrSetInputDeviceStateBoolEXT( XrSession session, XrPath topLevelPath, XrPath inputSourcePath, XrBool32 state);Valid Usage
sessionmust be a valid session handle.topLevelPathmust be a valid top level path.inputSourcePathmust be a valid input source path.
Valid Usage (Implicit)
- The
XR_EXT_conformance_automationextension must be enabled prior to callingSetInputDeviceStateBoolEXT sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- theXrSessionto set the input device state in.topLevelPath- the path representing the input device (e.g. pathname:/user/hand/left).inputSourcePath- the full path of the input component for which we wish to set the state for (e.g. pathname:/user/hand/left/input/select/click).state- the requested boolean state of the input device.
-
xrSetInputDeviceStateFloatEXT
public static int xrSetInputDeviceStateFloatEXT(XrSession session, long topLevelPath, long inputSourcePath, float state) Sets the state of a float input source on the input device.C Specification
XrResult xrSetInputDeviceStateFloatEXT( XrSession session, XrPath topLevelPath, XrPath inputSourcePath, float state);Valid Usage
sessionmust be a valid session handle.topLevelPathmust be a valid top level path.inputSourcePathmust be a valid input source path.
Valid Usage (Implicit)
- The
XR_EXT_conformance_automationextension must be enabled prior to callingSetInputDeviceStateFloatEXT sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- theXrSessionto set the input device state in.topLevelPath- the path representing the input device (e.g. pathname:/user/hand/left).inputSourcePath- the full path of the input component for which we wish to set the state for (e.g. pathname:/user/hand/left/input/trigger/value).state- the requested float state of the input device.
-
nxrSetInputDeviceStateVector2fEXT
public static int nxrSetInputDeviceStateVector2fEXT(XrSession session, long topLevelPath, long inputSourcePath, long state) Unsafe version of:SetInputDeviceStateVector2fEXT -
xrSetInputDeviceStateVector2fEXT
public static int xrSetInputDeviceStateVector2fEXT(XrSession session, long topLevelPath, long inputSourcePath, XrVector2f state) Sets the state of a 2D vector input source on the input device.C Specification
XrResult xrSetInputDeviceStateVector2fEXT( XrSession session, XrPath topLevelPath, XrPath inputSourcePath, XrVector2f state);Valid Usage
sessionmust be a valid session handle.topLevelPathmust be a valid top level path.inputSourcePathmust be a valid input source path.
Valid Usage (Implicit)
- The
XR_EXT_conformance_automationextension must be enabled prior to callingSetInputDeviceStateVector2fEXT sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto set the input device state in.topLevelPath- the path representing the input device (e.g. pathname:/user/hand/left).inputSourcePath- the full path of the input component for which we wish to set the state for (e.g. pathname:/user/hand/left/input/thumbstick).state- the requested two-dimensional state of the input device.
-
nxrSetInputDeviceLocationEXT
public static int nxrSetInputDeviceLocationEXT(XrSession session, long topLevelPath, long inputSourcePath, XrSpace space, long pose) Unsafe version of:SetInputDeviceLocationEXT -
xrSetInputDeviceLocationEXT
public static int xrSetInputDeviceLocationEXT(XrSession session, long topLevelPath, long inputSourcePath, XrSpace space, XrPosef pose) Sets the effective location of a pose input source on the input device.C Specification
XrResult xrSetInputDeviceLocationEXT( XrSession session, XrPath topLevelPath, XrPath inputSourcePath, XrSpace space, XrPosef pose);Valid Usage
sessionmust be a valid session handle.topLevelPathmust be a valid top level path.inputSourcePathmust be a valid input source path.spacemust be a validXrSpace.posemust be a validXrPosef.
Valid Usage (Implicit)
- The
XR_EXT_conformance_automationextension must be enabled prior to callingSetInputDeviceLocationEXT sessionmust be a validXrSessionhandlespacemust be a validXrSpacehandlespacemust have been created, allocated, or retrieved fromsession
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto set the input device state in.topLevelPath- the path representing the input device (e.g. pathname:/user/hand/left).inputSourcePath- the full path of the input component for which we wish to set the pose for (e.g. pathname:/user/hand/left/input/grip/pose).pose- the requested pose state of the input device.
-