The XrInteractionProfileDpadBindingEXT structure is an input struct that defines how to use any two-axis input to provide dpad-like functionality to the application. The struct must be added for each input that should be treated as a dpad to the bindingModifications array of the XrBindingModificationsKHR structure (See XR_KHR_binding_modification extension).
Runtimes are free to ignore any of the fields when not obeying the bindings, but may use it for automatic rebindings of actions.
The implementation must return ERROR_VALIDATION_FAILURE from SuggestInteractionProfileBindings if any of the following are true:
forceThreshold or forceThresholdReleased are outside the half-open range (0, 1]forceThreshold < forceThresholdReleasedcenterRegion is outside the exclusive range (0, 1)wedgeAngle outside the half-open range [0, π)If more than one XrInteractionProfileDpadBindingEXT is provided for the same input identifier, including top level path (e.g. pathname:/user/hand/left/input/thumbstick), and two or more of them specify the same actionset, the runtime must return ERROR_VALIDATION_FAILURE. If the same input identifier, including top level path, is used for more than one action set, in addition to inputs being suppressed by higher priority action sets, haptic events from dpads are also suppressed.
For example, a Valve Index controller binding with a "Walking" action set can have a dpad on each of:
Another action set can also have a dpad active on each of those inputs, and they can have different settings. If both action sets are active, the higher priority one trumps the lower priority one, and the lower priority one is suppressed.
XR_EXT_dpad_binding extension must be enabled prior to using XrInteractionProfileDpadBindingEXTtype must be TYPE_INTERACTION_PROFILE_DPAD_BINDING_EXTnext must be NULL or a valid pointer to the next structure in a structure chainactionSet must be a valid XrActionSet handleonHaptic is not NULL, onHaptic must be a pointer to a valid XrHapticBaseHeader-based structure. See also: XrHapticAmplitudeEnvelopeVibrationFB, XrHapticPcmVibrationFB, XrHapticVibrationoffHaptic is not NULL, offHaptic must be a pointer to a valid XrHapticBaseHeader-based structure. See also: XrHapticAmplitudeEnvelopeVibrationFB, XrHapticPcmVibrationFB, XrHapticVibrationXrBindingModificationBaseHeaderKHR, XrHapticBaseHeader, SuggestInteractionProfileBindings
struct XrInteractionProfileDpadBindingEXT {
XrStructureType type;
void const * next;
XrPath binding;
XrActionSet actionSet;
float forceThreshold;
float forceThresholdReleased;
float centerRegion;
float wedgeAngle;
XrBool32 isSticky;
XrHapticBaseHeader const * onHaptic;
XrHapticBaseHeader const * offHaptic;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrInteractionProfileDpadBindingEXT.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACTIONSET
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BINDING
The struct member offsets. |
| public static final int | CENTERREGION
The struct member offsets. |
| public static final int | FORCETHRESHOLD
The struct member offsets. |
| public static final int | FORCETHRESHOLDRELEASED
The struct member offsets. |
| public static final int | ISSTICKY
The struct member offsets. |
| public static final int | NEXT
The struct member offsets. |
| public static final int | OFFHAPTIC
The struct member offsets. |
| public static final int | ONHAPTIC
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | TYPE
The struct member offsets. |
| public static final int | WEDGEANGLE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrInteractionProfileDpadBindingEXT(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public XrInteractionProfileDpadBindingEXT | |
| public long | binding()
the input path used for the specified actions in the suggested binding list to be used as a dpad. |
| public XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrInteractionProfileDpadBindingEXT | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrInteractionProfileDpadBindingEXT. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public float | |
| public XrInteractionProfileDpadBindingEXT | |
| protected XrInteractionProfileDpadBindingEXT | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT | create(long address)
Returns a new |
| public static XrInteractionProfileDpadBindingEXT | create(XrBindingModificationBaseHeaderKHR value)
Downcasts the specified |
| public static XrInteractionProfileDpadBindingEXT. | create(int
the buffer capacity capacity)Returns a new |
| public static XrInteractionProfileDpadBindingEXT. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrInteractionProfileDpadBindingEXT. | create(XrBindingModificationBaseHeaderKHR.
Downcasts the specified |
| public static XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT. | |
| public float | forceThreshold()
a number in the half-open range |
| public XrInteractionProfileDpadBindingEXT | |
| public float | forceThresholdReleased()
a number in the half-open range |
| public XrInteractionProfileDpadBindingEXT | |
| public boolean | isSticky()
indicates that the implementation will latch the first region that is activated and continue to indicate that the binding for that region is true until the user releases the input underlying the virtual dpad. |
| public XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT | |
| public static XrInteractionProfileDpadBindingEXT. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrInteractionProfileDpadBindingEXT | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrInteractionProfileDpadBindingEXT. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static long | |
| public static void | |
| public static long | |
| public static void | |
| public static float | |
| public static void | |
| public long | |
| public XrInteractionProfileDpadBindingEXT | |
| public static float | |
| public static void | |
| public static float | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static XrHapticBaseHeader | |
| public static void | |
| public static XrHapticBaseHeader | |
| public static void | |
| public static int | |
| public static void | |
| public static float | |
| public static void | |
| public XrHapticBaseHeader | offHaptic()
the haptic output that the runtime must trigger when the binding changes from true to false. |
| public XrInteractionProfileDpadBindingEXT | offHaptic(XrHapticBaseHeader value)
Sets the address of the specified |
| public XrHapticBaseHeader | onHaptic()
the haptic output that the runtime must trigger when the binding changes from false to true. |
| public XrInteractionProfileDpadBindingEXT | onHaptic(XrHapticBaseHeader value)
Sets the address of the specified |
| public XrInteractionProfileDpadBindingEXT | set(int type, long next, long binding, XrActionSet actionSet, float forceThreshold, float forceThresholdReleased, float centerRegion, float wedgeAngle, boolean isSticky, XrHapticBaseHeader onHaptic, XrHapticBaseHeader offHaptic)
Initializes this struct with the specified values. |
| public XrInteractionProfileDpadBindingEXT | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public XrInteractionProfileDpadBindingEXT | |
| public XrInteractionProfileDpadBindingEXT | |
| public static void | |
| public float | wedgeAngle()
indicates the angle in radians of each direction region and is a value in the half-open range |
| public XrInteractionProfileDpadBindingEXT |