An application should preallocate the vertices array using the maxHandMeshVertexCount in XrSystemHandTrackingMeshPropertiesMSFT returned from GetSystemProperties. In this way, the application can avoid possible insufficient buffer sizes for each query, and therefore avoid reallocating memory each frame.
The input vertexCapacityInput must not be 0, and vertices must not be NULL, or else the runtime must return ERROR_VALIDATION_FAILURE on calls to the UpdateHandMeshMSFT function.
If the input vertexCapacityInput is not sufficient to contain all output vertices, the runtime must return ERROR_SIZE_INSUFFICIENT on calls to the UpdateHandMeshMSFT, do not change content in vertexUpdateTime and vertices, and return 0 for vertexCountOutput.
If the input vertexCapacityInput is equal to or larger than the maxHandMeshVertexCount in XrSystemHandTrackingMeshPropertiesMSFT returned from GetSystemProperties, the runtime must not return ERROR_SIZE_INSUFFICIENT on calls to the UpdateHandMeshMSFT because of insufficient vertex buffer size.
If the input vertexUpdateTime is 0, and the capacity of the vertices array is sufficient, and hand mesh tracking is active, the runtime must return the latest non-zero vertexUpdateTime, and fill in the vertexCountOutput and vertices fields.
If the input vertexUpdateTime is not 0, the runtime can either return without changing vertexCountOutput or the content in vertices, and return FALSE for vertexBufferChanged indicating the vertices are not changed; or return a new non-zero vertexUpdateTime and fill in latest data in vertexCountOutput and vertices and return TRUE for vertexBufferChanged indicating the vertices are updated to a newer version.
An application can keep the XrHandMeshVertexBufferMSFT structure for each frame in frame loop and use the returned vertexUpdateTime to detect the changes of the content in vertices. The application can therefore avoid unnecessary processing of vertices, such as coping them to GPU memory.
XR_MSFT_hand_tracking_mesh extension must be enabled prior to using XrHandMeshVertexBufferMSFTvertices must be a pointer to an array of vertexCapacityInput XrHandMeshVertexMSFT structuresvertexCapacityInput parameter must be greater than 0XrHandMeshMSFT, XrHandMeshVertexMSFT, XrSystemHandTrackingMeshPropertiesMSFT, UpdateHandMeshMSFT
struct XrHandMeshVertexBufferMSFT {
XrTime vertexUpdateTime;
uint32_t vertexCapacityInput;
uint32_t vertexCountOutput;
XrHandMeshVertexMSFT * vertices;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrHandMeshVertexBufferMSFT.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | VERTEXCAPACITYINPUT
The struct member offsets. |
| public static final int | VERTEXCOUNTOUTPUT
The struct member offsets. |
| public static final int | VERTEXUPDATETIME
The struct member offsets. |
| public static final int | VERTICES
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrHandMeshVertexBufferMSFT(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static XrHandMeshVertexBufferMSFT | |
| public static XrHandMeshVertexBufferMSFT. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshVertexBufferMSFT | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshVertexBufferMSFT. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected XrHandMeshVertexBufferMSFT | 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 XrHandMeshVertexBufferMSFT | |
| public static XrHandMeshVertexBufferMSFT | create(long address)
Returns a new |
| public static XrHandMeshVertexBufferMSFT. | create(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshVertexBufferMSFT. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrHandMeshVertexBufferMSFT | |
| public static XrHandMeshVertexBufferMSFT. | |
| public static XrHandMeshVertexBufferMSFT | |
| public static XrHandMeshVertexBufferMSFT. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshVertexBufferMSFT | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshVertexBufferMSFT. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static int | |
| public static void | nvertexCapacityInput(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static XrHandMeshVertexMSFT. | |
| public static void | |
| public XrHandMeshVertexBufferMSFT | set(long vertexUpdateTime, int vertexCountOutput, XrHandMeshVertexMSFT.
Initializes this struct with the specified values. |
| public XrHandMeshVertexBufferMSFT | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public static void | |
| public int | |
| public int | vertexCountOutput()
a |
| public XrHandMeshVertexBufferMSFT | |
| public long | vertexUpdateTime()
an |
| public XrHandMeshVertexBufferMSFT | |
| public XrHandMeshVertexMSFT. | vertices()
an array of |
| public XrHandMeshVertexBufferMSFT | vertices(XrHandMeshVertexMSFT.
Sets the address of the specified |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| VERTEXCAPACITYINPUT | back to summary |
|---|---|
| public static final int VERTEXCAPACITYINPUT The struct member offsets. | |
| VERTEXCOUNTOUTPUT | back to summary |
|---|---|
| public static final int VERTEXCOUNTOUTPUT The struct member offsets. | |
| VERTEXUPDATETIME | back to summary |
|---|---|
| public static final int VERTEXUPDATETIME The struct member offsets. | |
| VERTICES | back to summary |
|---|---|
| public static final int VERTICES The struct member offsets. | |
| XrHandMeshVertexBufferMSFT | back to summary |
|---|---|
| protected XrHandMeshVertexBufferMSFT(long address, ByteBuffer container) | |
| XrHandMeshVertexBufferMSFT | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| protected XrHandMeshVertexBufferMSFT create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Like
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT. Returns a new
| |
| nvertexCapacityInput | back to summary |
|---|---|
| public static int nvertexCapacityInput(long struct) Unsafe version of | |
| nvertexCapacityInput | back to summary |
|---|---|
| public static void nvertexCapacityInput(long struct, int value) Sets the specified value to the | |
| nvertexCountOutput | back to summary |
|---|---|
| public static int nvertexCountOutput(long struct) Unsafe version of | |
| nvertexCountOutput | back to summary |
|---|---|
| public static void nvertexCountOutput(long struct, int value) Unsafe version of | |
| nvertexUpdateTime | back to summary |
|---|---|
| public static long nvertexUpdateTime(long struct) Unsafe version of | |
| nvertexUpdateTime | back to summary |
|---|---|
| public static void nvertexUpdateTime(long struct, long value) Unsafe version of | |
| nvertices | back to summary |
|---|---|
| public static XrHandMeshVertexMSFT. Unsafe version of | |
| nvertices | back to summary |
|---|---|
| public static void nvertices(long struct, XrHandMeshVertexMSFT. Unsafe version of | |
| set | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT set(long vertexUpdateTime, int vertexCountOutput, XrHandMeshVertexMSFT. Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT set(XrHandMeshVertexBufferMSFT 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
| |
| vertexCapacityInput | back to summary |
|---|---|
| public int vertexCapacityInput() a positive
| |
| vertexCountOutput | back to summary |
|---|---|
| public int vertexCountOutput() a
| |
| vertexCountOutput | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT vertexCountOutput(int value) Sets the specified value to the | |
| vertexUpdateTime | back to summary |
|---|---|
| public long vertexUpdateTime() an
| |
| vertexUpdateTime | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT vertexUpdateTime(long value) Sets the specified value to the | |
| vertices | back to summary |
|---|---|
| public XrHandMeshVertexMSFT. an array of
| |
| vertices | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT vertices(XrHandMeshVertexMSFT. Sets the address of the specified | |
XrHandMeshVertexBufferMSFT structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrHandMeshVertexBufferMSFT |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected XrHandMeshVertexBufferMSFT | |
| protected XrHandMeshVertexBufferMSFT. | |
| public int | Returns: the value of theXrHandMeshVertexBufferMSFT#vertexCapacityInput field.
|
| public int | |
| public XrHandMeshVertexBufferMSFT. | vertexCountOutput(int value)
Sets the specified value to the |
| public long | |
| public XrHandMeshVertexBufferMSFT. | vertexUpdateTime(long value)
Sets the specified value to the |
| public XrHandMeshVertexMSFT. | Returns: aXrHandMeshVertexMSFT. view of the struct array pointed to by the XrHandMeshVertexBufferMSFT#vertices field.
|
| public XrHandMeshVertexBufferMSFT. | vertices(XrHandMeshVertexMSFT.
Sets the address of the specified |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrHandMeshVertexBufferMSFT 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 XrHandMeshVertexBufferMSFT getElementFactory() Implements abstract org.
| |
| self | back to summary |
|---|---|
| protected XrHandMeshVertexBufferMSFT. Implements abstract org.
| |
| vertexCapacityInput | back to summary |
|---|---|
public int vertexCapacityInput()
| |
| vertexCountOutput | back to summary |
|---|---|
public int vertexCountOutput()
| |
| vertexCountOutput | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT. Sets the specified value to the | |
| vertexUpdateTime | back to summary |
|---|---|
public long vertexUpdateTime()
| |
| vertexUpdateTime | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT. Sets the specified value to the | |
| vertices | back to summary |
|---|---|
public XrHandMeshVertexMSFT.
| |
| vertices | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT. Sets the address of the specified | |