When the returned isActive value is FALSE, the runtime indicates the hand is not actively tracked, for example, the hand is outside of sensor’s range, or the input focus is taken away from the application. When the runtime returns FALSE to isActive, it must set indexBufferChanged and vertexBufferChanged to FALSE, and must not change the content in indexBuffer or vertexBuffer,
When the returned isActive value is TRUE, the hand tracking mesh represented in indexBuffer and vertexBuffer are updated to the latest data of the time given to the UpdateHandMeshMSFT function. The runtime must set indexBufferChanged and vertexBufferChanged to reflect whether the index or vertex buffer’s content are changed during the update. In this way, the application can easily avoid unnecessary processing of buffers when there’s no new data.
The hand mesh is represented in triangle lists and each triangle’s vertices are in clockwise order when looking from outside of the hand. When hand tracking is active, i.e. when isActive is returned as TRUE, the returned indexBuffer.indexCountOutput value must be positive and multiple of 3, and vertexBuffer.vertexCountOutput value must be equal to or larger than 3.
XR_MSFT_hand_tracking_mesh extension must be enabled prior to using XrHandMeshMSFTtype must be TYPE_HAND_MESH_MSFTnext must be NULL or a valid pointer to the next structure in a structure chainindexBuffer must be a valid XrHandMeshIndexBufferMSFT structurevertexBuffer must be a valid XrHandMeshVertexBufferMSFT structureXrHandMeshIndexBufferMSFT, XrHandMeshVertexBufferMSFT, UpdateHandMeshMSFT
struct XrHandMeshMSFT {
XrStructureType type;
void * next;
XrBool32 isActive;
XrBool32 indexBufferChanged;
XrBool32 vertexBufferChanged;
XrHandMeshIndexBufferMSFT indexBuffer;
XrHandMeshVertexBufferMSFT vertexBuffer;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrHandMeshMSFT.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | INDEXBUFFER
The struct member offsets. |
| public static final int | INDEXBUFFERCHANGED
The struct member offsets. |
| public static final int | ISACTIVE
The struct member offsets. |
| public static final int | NEXT
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 | VERTEXBUFFER
The struct member offsets. |
| public static final int | VERTEXBUFFERCHANGED
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrHandMeshMSFT(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static XrHandMeshMSFT | |
| public static XrHandMeshMSFT. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshMSFT | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshMSFT. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected XrHandMeshMSFT | 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 XrHandMeshMSFT | |
| public static XrHandMeshMSFT | |
| public static XrHandMeshMSFT. | create(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshMSFT. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrHandMeshMSFT | |
| public static XrHandMeshMSFT. | |
| public XrHandMeshIndexBufferMSFT | |
| public XrHandMeshMSFT | indexBuffer(XrHandMeshIndexBufferMSFT value)
Copies the specified |
| public XrHandMeshMSFT | indexBuffer(Consumer<XrHandMeshIndexBufferMSFT> consumer)
Passes the |
| public boolean | indexBufferChanged()
an |
| public XrHandMeshMSFT | |
| public boolean | |
| public XrHandMeshMSFT | |
| public static XrHandMeshMSFT | |
| public static XrHandMeshMSFT. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrHandMeshMSFT | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrHandMeshMSFT. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public long | |
| public XrHandMeshMSFT | |
| public static XrHandMeshIndexBufferMSFT | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static XrHandMeshVertexBufferMSFT | |
| public static void | |
| public static int | |
| public static void | |
| public XrHandMeshMSFT | set(int type, long next, boolean isActive, boolean indexBufferChanged, boolean vertexBufferChanged, XrHandMeshIndexBufferMSFT indexBuffer, XrHandMeshVertexBufferMSFT vertexBuffer)
Initializes this struct with the specified values. |
| public XrHandMeshMSFT | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public XrHandMeshMSFT | |
| public XrHandMeshMSFT | |
| public static void | |
| public XrHandMeshVertexBufferMSFT | |
| public XrHandMeshMSFT | vertexBuffer(XrHandMeshVertexBufferMSFT value)
Copies the specified |
| public XrHandMeshMSFT | vertexBuffer(Consumer<XrHandMeshVertexBufferMSFT> consumer)
Passes the |
| public boolean | vertexBufferChanged()
an |
| public XrHandMeshMSFT |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| INDEXBUFFER | back to summary |
|---|---|
| public static final int INDEXBUFFER The struct member offsets. | |
| INDEXBUFFERCHANGED | back to summary |
|---|---|
| public static final int INDEXBUFFERCHANGED The struct member offsets. | |
| ISACTIVE | back to summary |
|---|---|
| public static final int ISACTIVE The struct member offsets. | |
| NEXT | back to summary |
|---|---|
| public static final int NEXT The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| TYPE | back to summary |
|---|---|
| public static final int TYPE The struct member offsets. | |
| VERTEXBUFFER | back to summary |
|---|---|
| public static final int VERTEXBUFFER The struct member offsets. | |
| VERTEXBUFFERCHANGED | back to summary |
|---|---|
| public static final int VERTEXBUFFERCHANGED The struct member offsets. | |
| XrHandMeshMSFT | back to summary |
|---|---|
| protected XrHandMeshMSFT(long address, ByteBuffer container) | |
| XrHandMeshMSFT | back to summary |
|---|---|
| public XrHandMeshMSFT(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshMSFT calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrHandMeshMSFT. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshMSFT calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrHandMeshMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| protected XrHandMeshMSFT create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrHandMeshMSFT create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshMSFT create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrHandMeshMSFT. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrHandMeshMSFT. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshMSFT createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrHandMeshMSFT. Like
| |
| indexBuffer | back to summary |
|---|---|
| public XrHandMeshIndexBufferMSFT indexBuffer() an | |
| indexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT indexBuffer(XrHandMeshIndexBufferMSFT value) Copies the specified | |
| indexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT indexBuffer(Consumer<XrHandMeshIndexBufferMSFT> consumer) Passes the | |
| indexBufferChanged | back to summary |
|---|---|
| public boolean indexBufferChanged() an
| |
| indexBufferChanged | back to summary |
|---|---|
| public XrHandMeshMSFT indexBufferChanged(boolean value) Sets the specified value to the | |
| isActive | back to summary |
|---|---|
| public boolean isActive() an
| |
| isActive | back to summary |
|---|---|
| public XrHandMeshMSFT isActive(boolean value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static XrHandMeshMSFT malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrHandMeshMSFT. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshMSFT malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrHandMeshMSFT. Returns a new
| |
| next | back to summary |
|---|---|
| public long next()
| |
| next | back to summary |
|---|---|
| public XrHandMeshMSFT next(long value) Sets the specified value to the | |
| nindexBuffer | back to summary |
|---|---|
| public static XrHandMeshIndexBufferMSFT nindexBuffer(long struct) Unsafe version of | |
| nindexBuffer | back to summary |
|---|---|
| public static void nindexBuffer(long struct, XrHandMeshIndexBufferMSFT value) Unsafe version of | |
| nindexBufferChanged | back to summary |
|---|---|
| public static int nindexBufferChanged(long struct) Unsafe version of | |
| nindexBufferChanged | back to summary |
|---|---|
| public static void nindexBufferChanged(long struct, int value) Unsafe version of | |
| nisActive | back to summary |
|---|---|
| public static int nisActive(long struct) Unsafe version of | |
| nisActive | back to summary |
|---|---|
| public static void nisActive(long struct, int value) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static long nnext(long struct) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static void nnext(long struct, long value) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static int ntype(long struct) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static void ntype(long struct, int value) Unsafe version of | |
| nvertexBuffer | back to summary |
|---|---|
| public static XrHandMeshVertexBufferMSFT nvertexBuffer(long struct) Unsafe version of | |
| nvertexBuffer | back to summary |
|---|---|
| public static void nvertexBuffer(long struct, XrHandMeshVertexBufferMSFT value) Unsafe version of | |
| nvertexBufferChanged | back to summary |
|---|---|
| public static int nvertexBufferChanged(long struct) Unsafe version of | |
| nvertexBufferChanged | back to summary |
|---|---|
| public static void nvertexBufferChanged(long struct, int value) Unsafe version of | |
| set | back to summary |
|---|---|
| public XrHandMeshMSFT set(int type, long next, boolean isActive, boolean indexBufferChanged, boolean vertexBufferChanged, XrHandMeshIndexBufferMSFT indexBuffer, XrHandMeshVertexBufferMSFT vertexBuffer) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrHandMeshMSFT set(XrHandMeshMSFT src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| type | back to summary |
|---|---|
| public int type() the
| |
| type | back to summary |
|---|---|
| public XrHandMeshMSFT type(int value) Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrHandMeshMSFT type$Default() Sets the | |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
| vertexBuffer | back to summary |
|---|---|
| public XrHandMeshVertexBufferMSFT vertexBuffer() an | |
| vertexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT vertexBuffer(XrHandMeshVertexBufferMSFT value) Copies the specified | |
| vertexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT vertexBuffer(Consumer<XrHandMeshVertexBufferMSFT> consumer) Passes the | |
| vertexBufferChanged | back to summary |
|---|---|
| public boolean vertexBufferChanged() an
| |
| vertexBufferChanged | back to summary |
|---|---|
| public XrHandMeshMSFT vertexBufferChanged(boolean value) Sets the specified value to the | |
XrHandMeshMSFT structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrHandMeshMSFT |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrHandMeshMSFT 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 XrHandMeshMSFT getElementFactory() Implements abstract org.
| |
| indexBuffer | back to summary |
|---|---|
public XrHandMeshIndexBufferMSFT indexBuffer()
| |
| indexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT. Copies the specified | |
| indexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT. Passes the | |
| indexBufferChanged | back to summary |
|---|---|
public boolean indexBufferChanged()
| |
| indexBufferChanged | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the specified value to the | |
| isActive | back to summary |
|---|---|
public boolean isActive()
| |
| isActive | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the specified value to the | |
| next | back to summary |
|---|---|
public long next()
| |
| next | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected XrHandMeshMSFT. Implements abstract org.
| |
| type | back to summary |
|---|---|
public int type()
| |
| type | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the | |
| vertexBuffer | back to summary |
|---|---|
public XrHandMeshVertexBufferMSFT vertexBuffer()
| |
| vertexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT. Copies the specified | |
| vertexBuffer | back to summary |
|---|---|
| public XrHandMeshMSFT. Passes the | |
| vertexBufferChanged | back to summary |
|---|---|
public boolean vertexBufferChanged()
| |
| vertexBufferChanged | back to summary |
|---|---|
| public XrHandMeshMSFT. Sets the specified value to the | |