An application should preallocate the indices array using the maxHandMeshIndexCount in XrSystemHandTrackingMeshPropertiesMSFT returned from GetSystemProperties. In this way, the application can avoid possible insufficient buffer sizees for each query, and therefore avoid reallocating memory each frame.
The input indexCapacityInput must not be 0, and indices must not be NULL, or else the runtime must return ERROR_VALIDATION_FAILURE on calls to the UpdateHandMeshMSFT function.
If the input indexCapacityInput is not sufficient to contain all output indices, the runtime must return ERROR_SIZE_INSUFFICIENT on calls to UpdateHandMeshMSFT, not change the content in indexBufferKey and indices, and return 0 for indexCountOutput.
If the input indexCapacityInput is equal to or larger than the maxHandMeshIndexCount in XrSystemHandTrackingMeshPropertiesMSFT returned from GetSystemProperties, the runtime must not return ERROR_SIZE_INSUFFICIENT error on UpdateHandMeshMSFT because of insufficient index buffer size.
If the input indexBufferKey is 0, the capacity of indices array is sufficient, and hand mesh tracking is active, the runtime must return the latest non-zero indexBufferKey, and fill in indexCountOutput and indices.
If the input indexBufferKey is not 0, the runtime can either return without changing indexCountOutput or content in indices, and return FALSE for indexBufferChanged indicating the indices are not changed; or return a new non-zero indexBufferKey and fill in latest data in indexCountOutput and indices, and return TRUE for indexBufferChanged indicating the indices are updated to a newer version.
An application can keep the XrHandMeshIndexBufferMSFT structure for each frame in a frame loop and use the returned indexBufferKey to identify different triangle list topology described in indices. The application can therefore avoid unnecessary processing of indices, such as coping them to GPU memory.
The runtime must return the same indexBufferKey for the same XrHandTrackerEXT at a given time, regardless of the input XrHandPoseTypeMSFT in XrHandMeshUpdateInfoMSFT. This ensures the index buffer has the same mesh topology and allows the application to reason about vertices across different hand pose types. For example, the application can build a procedure to perform UV mapping on vertices of a hand mesh using HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT, and apply the resultant UV data on vertices to the mesh returned from the same hand tracker using HAND_POSE_TYPE_TRACKED_MSFT.
XR_MSFT_hand_tracking_mesh extension must be enabled prior to using XrHandMeshIndexBufferMSFTindices must be a pointer to an array of indexCapacityInput uint32_t valuesindexCapacityInput parameter must be greater than 0XrHandMeshMSFT, XrSystemHandTrackingMeshPropertiesMSFT, UpdateHandMeshMSFT
struct XrHandMeshIndexBufferMSFT {
uint32_t indexBufferKey;
uint32_t indexCapacityInput;
uint32_t indexCountOutput;
uint32_t * indices;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrHandMeshIndexBufferMSFT.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | INDEXBUFFERKEY
The struct member offsets. |
| public static final int | INDEXCAPACITYINPUT
The struct member offsets. |
| public static final int | INDEXCOUNTOUTPUT
The struct member offsets. |
| public static final int | INDICES
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrHandMeshIndexBufferMSFT(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static XrHandMeshIndexBufferMSFT | |
| public static XrHandMeshIndexBufferMSFT. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshIndexBufferMSFT | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshIndexBufferMSFT. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected XrHandMeshIndexBufferMSFT | 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 XrHandMeshIndexBufferMSFT | |
| public static XrHandMeshIndexBufferMSFT | create(long address)
Returns a new |
| public static XrHandMeshIndexBufferMSFT. | create(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshIndexBufferMSFT. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrHandMeshIndexBufferMSFT | |
| public static XrHandMeshIndexBufferMSFT. | |
| public int | indexBufferKey()
a |
| public XrHandMeshIndexBufferMSFT | |
| public int | |
| public int | |
| public XrHandMeshIndexBufferMSFT | |
| public IntBuffer | indices()
an array of indices filled in by the runtime, specifying the indices of the triangles list in the vertex buffer. |
| public XrHandMeshIndexBufferMSFT | |
| public static XrHandMeshIndexBufferMSFT | |
| public static XrHandMeshIndexBufferMSFT. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshIndexBufferMSFT | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshIndexBufferMSFT. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static int | |
| public static void | |
| public static int | |
| public static void | nindexCapacityInput(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | |
| public static IntBuffer | |
| public static void | |
| public XrHandMeshIndexBufferMSFT | |
| public XrHandMeshIndexBufferMSFT | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public static void |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| INDEXBUFFERKEY | back to summary |
|---|---|
| public static final int INDEXBUFFERKEY The struct member offsets. | |
| INDEXCAPACITYINPUT | back to summary |
|---|---|
| public static final int INDEXCAPACITYINPUT The struct member offsets. | |
| INDEXCOUNTOUTPUT | back to summary |
|---|---|
| public static final int INDEXCOUNTOUTPUT The struct member offsets. | |
| INDICES | back to summary |
|---|---|
| public static final int INDICES The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| XrHandMeshIndexBufferMSFT | back to summary |
|---|---|
| protected XrHandMeshIndexBufferMSFT(long address, ByteBuffer container) | |
| XrHandMeshIndexBufferMSFT | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| protected XrHandMeshIndexBufferMSFT create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Like
| |
| indexBufferKey | back to summary |
|---|---|
| public int indexBufferKey() a
| |
| indexBufferKey | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT indexBufferKey(int value) Sets the specified value to the | |
| indexCapacityInput | back to summary |
|---|---|
| public int indexCapacityInput() a positive
| |
| indexCountOutput | back to summary |
|---|---|
| public int indexCountOutput() a
| |
| indexCountOutput | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT indexCountOutput(int value) Sets the specified value to the | |
| indices | back to summary |
|---|---|
| public IntBuffer indices() an array of indices filled in by the runtime, specifying the indices of the triangles list in the vertex buffer.
| |
| indices | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT indices(IntBuffer value) Sets the address of the specified | |
| malloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT. Returns a new
| |
| nindexBufferKey | back to summary |
|---|---|
| public static int nindexBufferKey(long struct) Unsafe version of | |
| nindexBufferKey | back to summary |
|---|---|
| public static void nindexBufferKey(long struct, int value) Unsafe version of | |
| nindexCapacityInput | back to summary |
|---|---|
| public static int nindexCapacityInput(long struct) Unsafe version of | |
| nindexCapacityInput | back to summary |
|---|---|
| public static void nindexCapacityInput(long struct, int value) Sets the specified value to the | |
| nindexCountOutput | back to summary |
|---|---|
| public static int nindexCountOutput(long struct) Unsafe version of | |
| nindexCountOutput | back to summary |
|---|---|
| public static void nindexCountOutput(long struct, int value) Unsafe version of | |
| nindices | back to summary |
|---|---|
| public static IntBuffer nindices(long struct) Unsafe version of | |
| nindices | back to summary |
|---|---|
| public static void nindices(long struct, IntBuffer value) Unsafe version of | |
| set | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT set(int indexBufferKey, int indexCountOutput, IntBuffer indices) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT set(XrHandMeshIndexBufferMSFT src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
XrHandMeshIndexBufferMSFT structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrHandMeshIndexBufferMSFT |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected XrHandMeshIndexBufferMSFT | |
| public int | |
| public XrHandMeshIndexBufferMSFT. | indexBufferKey(int value)
Sets the specified value to the |
| public int | |
| public int | |
| public XrHandMeshIndexBufferMSFT. | indexCountOutput(int value)
Sets the specified value to the |
| public IntBuffer | |
| public XrHandMeshIndexBufferMSFT. | indices(IntBuffer value)
Sets the address of the specified |
| protected XrHandMeshIndexBufferMSFT. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrHandMeshIndexBufferMSFT ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| getElementFactory | back to summary |
|---|---|
| protected XrHandMeshIndexBufferMSFT getElementFactory() Implements abstract org.
| |
| indexBufferKey | back to summary |
|---|---|
public int indexBufferKey()
| |
| indexBufferKey | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT. Sets the specified value to the | |
| indexCapacityInput | back to summary |
|---|---|
public int indexCapacityInput()
| |
| indexCountOutput | back to summary |
|---|---|
public int indexCountOutput()
| |
| indexCountOutput | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT. Sets the specified value to the | |
| indices | back to summary |
|---|---|
public IntBuffer indices()
| |
| indices | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT. Sets the address of the specified | |
| self | back to summary |
|---|---|
| protected XrHandMeshIndexBufferMSFT. Implements abstract org.
| |