Class XrInteractionProfileDpadBindingEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
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 XrBindingModificationsKHR::bindingModifications array in 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:
forceThresholdorforceThresholdReleasedare outside the half-open range(0, 1]forceThreshold < forceThresholdReleasedcenterRegionis outside the exclusive range(0, 1)wedgeAngleoutside 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:
- left thumbstick
- right thumbstick
- left trackpad
- right trackpad
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.
Valid Usage (Implicit)
- The
XR_EXT_dpad_bindingextension must be enabled prior to usingXrInteractionProfileDpadBindingEXT typemust beTYPE_INTERACTION_PROFILE_DPAD_BINDING_EXTnextmust beNULLor a valid pointer to the next structure in a structure chainactionSetmust be a validXrActionSethandle- If
onHapticis notNULL,onHapticmust be a pointer to a validXrHapticBaseHeader-based structure. See also:XrHapticAmplitudeEnvelopeVibrationFB,XrHapticPcmVibrationFB,XrHapticVibration - If
offHapticis notNULL,offHapticmust be a pointer to a validXrHapticBaseHeader-based structure. See also:XrHapticAmplitudeEnvelopeVibrationFB,XrHapticPcmVibrationFB,XrHapticVibration
See Also
XrBindingModificationBaseHeaderKHR, XrHapticBaseHeader, SuggestInteractionProfileBindings
Layout
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();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofXrInteractionProfileDpadBindingEXTstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrInteractionProfileDpadBindingEXT(ByteBuffer container) Creates aXrInteractionProfileDpadBindingEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongthe action set for which this dpad will be active.actionSet(XrActionSet value) Sets the specified value to theactionSet()field.longbinding()the input path used for the specified actions in the suggested binding list to be used as a dpad.binding(long value) Sets the specified value to thebinding()field.calloc()Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.floatdefines the center region of the thumbstick or trackpad.centerRegion(float value) Sets the specified value to thecenterRegion()field.create()Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withBufferUtils.create(int capacity) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withBufferUtils.create(long address) Returns a newXrInteractionProfileDpadBindingEXTinstance for the specified memory address.create(long address, int capacity) Create aXrInteractionProfileDpadBindingEXT.Bufferinstance at the specified memory.Downcasts the specifiedXrBindingModificationBaseHeaderKHRinstance toXrInteractionProfileDpadBindingEXT.Downcasts the specifiedXrBindingModificationBaseHeaderKHR.Bufferinstance toXrInteractionProfileDpadBindingEXT.Buffer.static @Nullable XrInteractionProfileDpadBindingEXTcreateSafe(long address) static @Nullable XrInteractionProfileDpadBindingEXT.BuffercreateSafe(long address, int capacity) floata number in the half-open range(0, 1]representing the force value threshold at or above which (≥) a dpad input will transition from inactive to active.forceThreshold(float value) Sets the specified value to theforceThreshold()field.floata number in the half-open range(0, 1]representing the force value threshold strictly below which (<) a dpad input will transition from active to inactive.forceThresholdReleased(float value) Sets the specified value to theforceThresholdReleased()field.booleanisSticky()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.isSticky(boolean value) Sets the specified value to theisSticky()field.malloc()Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXTinstance allocated on the specifiedMemoryStack.static longnactionSet(long struct) Unsafe version ofactionSet().static voidnactionSet(long struct, XrActionSet value) Unsafe version ofactionSet.static longnbinding(long struct) Unsafe version ofbinding().static voidnbinding(long struct, long value) Unsafe version ofbinding.static floatncenterRegion(long struct) Unsafe version ofcenterRegion().static voidncenterRegion(long struct, float value) Unsafe version ofcenterRegion.longnext()NULLor a pointer to the next structure in a structure chain.next(long value) Sets the specified value to thenext()field.static floatnforceThreshold(long struct) Unsafe version offorceThreshold().static voidnforceThreshold(long struct, float value) Unsafe version offorceThreshold.static floatnforceThresholdReleased(long struct) Unsafe version offorceThresholdReleased().static voidnforceThresholdReleased(long struct, float value) Unsafe version offorceThresholdReleased.static intnisSticky(long struct) Unsafe version ofisSticky().static voidnisSticky(long struct, int value) Unsafe version ofisSticky.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static @Nullable XrHapticBaseHeadernoffHaptic(long struct) Unsafe version ofoffHaptic().static voidnoffHaptic(long struct, @Nullable XrHapticBaseHeader value) Unsafe version ofoffHaptic.static @Nullable XrHapticBaseHeadernonHaptic(long struct) Unsafe version ofonHaptic().static voidnonHaptic(long struct, @Nullable XrHapticBaseHeader value) Unsafe version ofonHaptic.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static floatnwedgeAngle(long struct) Unsafe version ofwedgeAngle().static voidnwedgeAngle(long struct, float value) Unsafe version ofwedgeAngle.@Nullable XrHapticBaseHeaderthe haptic output that the runtime must trigger when the binding changes from true to false.offHaptic(@Nullable XrHapticBaseHeader value) Sets the address of the specifiedXrHapticBaseHeaderto theoffHaptic()field.@Nullable XrHapticBaseHeaderonHaptic()the haptic output that the runtime must trigger when the binding changes from false to true.onHaptic(@Nullable XrHapticBaseHeader value) Sets the address of the specifiedXrHapticBaseHeaderto theonHaptic()field.set(int type, long next, long binding, XrActionSet actionSet, float forceThreshold, float forceThresholdReleased, float centerRegion, float wedgeAngle, boolean isSticky, @Nullable XrHapticBaseHeader onHaptic, @Nullable XrHapticBaseHeader offHaptic) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.type(int value) Sets the specified value to thetype()field.Sets theTYPE_INTERACTION_PROFILE_DPAD_BINDING_EXTvalue to thetype()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.floatindicates the angle in radians of each direction region and is a value in the half-open range[0, π).wedgeAngle(float value) Sets the specified value to thewedgeAngle()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
NEXT
public static final int NEXTThe struct member offsets. -
BINDING
public static final int BINDINGThe struct member offsets. -
ACTIONSET
public static final int ACTIONSETThe struct member offsets. -
FORCETHRESHOLD
public static final int FORCETHRESHOLDThe struct member offsets. -
FORCETHRESHOLDRELEASED
public static final int FORCETHRESHOLDRELEASEDThe struct member offsets. -
CENTERREGION
public static final int CENTERREGIONThe struct member offsets. -
WEDGEANGLE
public static final int WEDGEANGLEThe struct member offsets. -
ISSTICKY
public static final int ISSTICKYThe struct member offsets. -
ONHAPTIC
public static final int ONHAPTICThe struct member offsets. -
OFFHAPTIC
public static final int OFFHAPTICThe struct member offsets.
-
-
Constructor Details
-
XrInteractionProfileDpadBindingEXT
Creates aXrInteractionProfileDpadBindingEXTinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<XrInteractionProfileDpadBindingEXT>
-
type
public int type()theXrStructureTypeof this structure. -
next
public long next()NULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension. -
binding
public long binding()the input path used for the specified actions in the suggested binding list to be used as a dpad. E.g. path:/user/hand/right/input/thumbstick -
actionSet
public long actionSet()the action set for which this dpad will be active. The implementation must use the parameters from this structure for any actions from this action set that are bound to one of the dpad subpaths for this input path. -
forceThreshold
public float forceThreshold()a number in the half-open range(0, 1]representing the force value threshold at or above which (≥) a dpad input will transition from inactive to active. -
forceThresholdReleased
public float forceThresholdReleased()a number in the half-open range(0, 1]representing the force value threshold strictly below which (<) a dpad input will transition from active to inactive. -
centerRegion
public float centerRegion()defines the center region of the thumbstick or trackpad. This is the radius, in the input value space, of a logically circular region in the center of the input, in the range(0, 1). -
wedgeAngle
public float wedgeAngle()indicates the angle in radians of each direction region and is a value in the half-open range[0, π). -
isSticky
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. -
onHaptic
the haptic output that the runtime must trigger when the binding changes from false to true. If this field isNULL, the runtime must not trigger any haptic output on the threshold. This field can point to any supported sub-type ofXrHapticBaseHeader. -
offHaptic
the haptic output that the runtime must trigger when the binding changes from true to false. If this field is NULL, the runtime must not trigger any haptic output on the threshold. This field can point to any supported sub-type ofXrHapticBaseHeader. -
type
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_INTERACTION_PROFILE_DPAD_BINDING_EXTvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
binding
Sets the specified value to thebinding()field. -
actionSet
Sets the specified value to theactionSet()field. -
forceThreshold
Sets the specified value to theforceThreshold()field. -
forceThresholdReleased
Sets the specified value to theforceThresholdReleased()field. -
centerRegion
Sets the specified value to thecenterRegion()field. -
wedgeAngle
Sets the specified value to thewedgeAngle()field. -
isSticky
Sets the specified value to theisSticky()field. -
onHaptic
Sets the address of the specifiedXrHapticBaseHeaderto theonHaptic()field. -
offHaptic
Sets the address of the specifiedXrHapticBaseHeaderto theoffHaptic()field. -
set
public XrInteractionProfileDpadBindingEXT set(int type, long next, long binding, XrActionSet actionSet, float forceThreshold, float forceThresholdReleased, float centerRegion, float wedgeAngle, boolean isSticky, @Nullable XrHapticBaseHeader onHaptic, @Nullable XrHapticBaseHeader offHaptic) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrInteractionProfileDpadBindingEXTinstance allocated withBufferUtils. -
create
Returns a newXrInteractionProfileDpadBindingEXTinstance for the specified memory address. -
createSafe
-
create
Downcasts the specifiedXrBindingModificationBaseHeaderKHRinstance toXrInteractionProfileDpadBindingEXT. -
malloc
Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrInteractionProfileDpadBindingEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable XrInteractionProfileDpadBindingEXT.Buffer createSafe(long address, int capacity) -
create
public static XrInteractionProfileDpadBindingEXT.Buffer create(XrBindingModificationBaseHeaderKHR.Buffer value) Downcasts the specifiedXrBindingModificationBaseHeaderKHR.Bufferinstance toXrInteractionProfileDpadBindingEXT.Buffer. -
malloc
Returns a newXrInteractionProfileDpadBindingEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrInteractionProfileDpadBindingEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrInteractionProfileDpadBindingEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrInteractionProfileDpadBindingEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrInteractionProfileDpadBindingEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nnext
public static long nnext(long struct) Unsafe version ofnext(). -
nbinding
public static long nbinding(long struct) Unsafe version ofbinding(). -
nactionSet
public static long nactionSet(long struct) Unsafe version ofactionSet(). -
nforceThreshold
public static float nforceThreshold(long struct) Unsafe version offorceThreshold(). -
nforceThresholdReleased
public static float nforceThresholdReleased(long struct) Unsafe version offorceThresholdReleased(). -
ncenterRegion
public static float ncenterRegion(long struct) Unsafe version ofcenterRegion(). -
nwedgeAngle
public static float nwedgeAngle(long struct) Unsafe version ofwedgeAngle(). -
nisSticky
public static int nisSticky(long struct) Unsafe version ofisSticky(). -
nonHaptic
Unsafe version ofonHaptic(). -
noffHaptic
Unsafe version ofoffHaptic(). -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nnext
public static void nnext(long struct, long value) Unsafe version ofnext. -
nbinding
public static void nbinding(long struct, long value) Unsafe version ofbinding. -
nactionSet
Unsafe version ofactionSet. -
nforceThreshold
public static void nforceThreshold(long struct, float value) Unsafe version offorceThreshold. -
nforceThresholdReleased
public static void nforceThresholdReleased(long struct, float value) Unsafe version offorceThresholdReleased. -
ncenterRegion
public static void ncenterRegion(long struct, float value) Unsafe version ofcenterRegion. -
nwedgeAngle
public static void nwedgeAngle(long struct, float value) Unsafe version ofwedgeAngle. -
nisSticky
public static void nisSticky(long struct, int value) Unsafe version ofisSticky. -
nonHaptic
Unsafe version ofonHaptic. -
noffHaptic
Unsafe version ofoffHaptic. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-