Class XrHandMeshMSFT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
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 XrHandMeshUpdateInfoMSFT::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.
Valid Usage (Implicit)
- The
XR_MSFT_hand_tracking_meshextension must be enabled prior to usingXrHandMeshMSFT typemust beTYPE_HAND_MESH_MSFTnextmust beNULLor a valid pointer to the next structure in a structure chainindexBuffermust be a validXrHandMeshIndexBufferMSFTstructurevertexBuffermust be a validXrHandMeshVertexBufferMSFTstructure
See Also
XrHandMeshIndexBufferMSFT, XrHandMeshVertexBufferMSFT, UpdateHandMeshMSFT
Layout
struct XrHandMeshMSFT {
XrStructureType type();
void * next();
XrBool32 isActive();
XrBool32 indexBufferChanged();
XrBool32 vertexBufferChanged();
XrHandMeshIndexBufferMSFT indexBuffer();
XrHandMeshVertexBufferMSFT vertexBuffer();
}-
Nested Class Summary
Nested ClassesNested 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 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 size in bytes.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionXrHandMeshMSFT(ByteBuffer container) Creates aXrHandMeshMSFTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrHandMeshMSFTcalloc()Returns a newXrHandMeshMSFTinstance allocated withmemCalloc.static XrHandMeshMSFT.Buffercalloc(int capacity) Returns a newXrHandMeshMSFT.Bufferinstance allocated withmemCalloc.static XrHandMeshMSFT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrHandMeshMSFT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrHandMeshMSFTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrHandMeshMSFTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrHandMeshMSFTcreate()Returns a newXrHandMeshMSFTinstance allocated withBufferUtils.static XrHandMeshMSFT.Buffercreate(int capacity) Returns a newXrHandMeshMSFT.Bufferinstance allocated withBufferUtils.static XrHandMeshMSFTcreate(long address) Returns a newXrHandMeshMSFTinstance for the specified memory address.static XrHandMeshMSFT.Buffercreate(long address, int capacity) Create aXrHandMeshMSFT.Bufferinstance at the specified memory.static @Nullable XrHandMeshMSFTcreateSafe(long address) static @Nullable XrHandMeshMSFT.BuffercreateSafe(long address, int capacity) anXrHandMeshIndexBufferMSFTreturns the index buffer of the tracked hand mesh.indexBuffer(Consumer<XrHandMeshIndexBufferMSFT> consumer) Passes theindexBuffer()field to the specifiedConsumer.Copies the specifiedXrHandMeshIndexBufferMSFTto theindexBuffer()field.booleananXrBool32indicating if theindexBuffercontent was changed during the update.indexBufferChanged(boolean value) Sets the specified value to theindexBufferChanged()field.booleanisActive()anXrBool32indicating if the current hand tracker is active.isActive(boolean value) Sets the specified value to theisActive()field.static XrHandMeshMSFTmalloc()Returns a newXrHandMeshMSFTinstance allocated withmemAlloc.static XrHandMeshMSFT.Buffermalloc(int capacity) Returns a newXrHandMeshMSFT.Bufferinstance allocated withmemAlloc.static XrHandMeshMSFT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrHandMeshMSFT.Bufferinstance allocated on the specifiedMemoryStack.static XrHandMeshMSFTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrHandMeshMSFTinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.next(long value) Sets the specified value to thenext()field.static XrHandMeshIndexBufferMSFTnindexBuffer(long struct) Unsafe version ofindexBuffer().static voidnindexBuffer(long struct, XrHandMeshIndexBufferMSFT value) Unsafe version ofindexBuffer.static intnindexBufferChanged(long struct) Unsafe version ofindexBufferChanged().static voidnindexBufferChanged(long struct, int value) Unsafe version ofindexBufferChanged.static intnisActive(long struct) Unsafe version ofisActive().static voidnisActive(long struct, int value) Unsafe version ofisActive.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static XrHandMeshVertexBufferMSFTnvertexBuffer(long struct) Unsafe version ofvertexBuffer().static voidnvertexBuffer(long struct, XrHandMeshVertexBufferMSFT value) Unsafe version ofvertexBuffer.static intnvertexBufferChanged(long struct) Unsafe version ofvertexBufferChanged().static voidnvertexBufferChanged(long struct, int value) Unsafe version ofvertexBufferChanged.set(int type, long next, boolean isActive, boolean indexBufferChanged, boolean vertexBufferChanged, XrHandMeshIndexBufferMSFT indexBuffer, XrHandMeshVertexBufferMSFT vertexBuffer) Initializes this struct with the specified values.set(XrHandMeshMSFT src) 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_HAND_MESH_MSFTvalue to thetype()field.anXrHandMeshVertexBufferMSFTreturns the vertex buffer of the tracked hand mesh.vertexBuffer(Consumer<XrHandMeshVertexBufferMSFT> consumer) Passes thevertexBuffer()field to the specifiedConsumer.Copies the specifiedXrHandMeshVertexBufferMSFTto thevertexBuffer()field.booleananXrBool32indicating if thevertexBuffercontent was changed during the update.vertexBufferChanged(boolean value) Sets the specified value to thevertexBufferChanged()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. -
ISACTIVE
public static final int ISACTIVEThe struct member offsets. -
INDEXBUFFERCHANGED
public static final int INDEXBUFFERCHANGEDThe struct member offsets. -
VERTEXBUFFERCHANGED
public static final int VERTEXBUFFERCHANGEDThe struct member offsets. -
INDEXBUFFER
public static final int INDEXBUFFERThe struct member offsets. -
VERTEXBUFFER
public static final int VERTEXBUFFERThe struct member offsets.
-
-
Constructor Details
-
XrHandMeshMSFT
Creates aXrHandMeshMSFTinstance 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<XrHandMeshMSFT>
-
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. -
isActive
public boolean isActive()anXrBool32indicating if the current hand tracker is active. -
indexBufferChanged
public boolean indexBufferChanged()anXrBool32indicating if theindexBuffercontent was changed during the update. -
vertexBufferChanged
public boolean vertexBufferChanged()anXrBool32indicating if thevertexBuffercontent was changed during the update. -
indexBuffer
anXrHandMeshIndexBufferMSFTreturns the index buffer of the tracked hand mesh. -
vertexBuffer
anXrHandMeshVertexBufferMSFTreturns the vertex buffer of the tracked hand mesh. -
type
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_HAND_MESH_MSFTvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
isActive
Sets the specified value to theisActive()field. -
indexBufferChanged
Sets the specified value to theindexBufferChanged()field. -
vertexBufferChanged
Sets the specified value to thevertexBufferChanged()field. -
indexBuffer
Copies the specifiedXrHandMeshIndexBufferMSFTto theindexBuffer()field. -
indexBuffer
Passes theindexBuffer()field to the specifiedConsumer. -
vertexBuffer
Copies the specifiedXrHandMeshVertexBufferMSFTto thevertexBuffer()field. -
vertexBuffer
Passes thevertexBuffer()field to the specifiedConsumer. -
set
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newXrHandMeshMSFTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrHandMeshMSFTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrHandMeshMSFTinstance allocated withBufferUtils. -
create
Returns a newXrHandMeshMSFTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrHandMeshMSFT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrHandMeshMSFT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrHandMeshMSFT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrHandMeshMSFT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrHandMeshMSFTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrHandMeshMSFTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXrHandMeshMSFT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXrHandMeshMSFT.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(). -
nisActive
public static int nisActive(long struct) Unsafe version ofisActive(). -
nindexBufferChanged
public static int nindexBufferChanged(long struct) Unsafe version ofindexBufferChanged(). -
nvertexBufferChanged
public static int nvertexBufferChanged(long struct) Unsafe version ofvertexBufferChanged(). -
nindexBuffer
Unsafe version ofindexBuffer(). -
nvertexBuffer
Unsafe version ofvertexBuffer(). -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nnext
public static void nnext(long struct, long value) Unsafe version ofnext. -
nisActive
public static void nisActive(long struct, int value) Unsafe version ofisActive. -
nindexBufferChanged
public static void nindexBufferChanged(long struct, int value) Unsafe version ofindexBufferChanged. -
nvertexBufferChanged
public static void nvertexBufferChanged(long struct, int value) Unsafe version ofvertexBufferChanged. -
nindexBuffer
Unsafe version ofindexBuffer. -
nvertexBuffer
Unsafe version ofvertexBuffer.
-