Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrHandMeshIndexBufferMSFT

extends Struct<XrHandMeshIndexBufferMSFT>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

The index buffer of a hand mesh.
Description

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.

Valid Usage (Implicit)
See Also

XrHandMeshMSFT, XrSystemHandTrackingMeshPropertiesMSFT, UpdateHandMeshMSFT

Layout


struct XrHandMeshIndexBufferMSFT {
    uint32_t indexBufferKey;
    uint32_t indexCapacityInput;
    uint32_t indexCountOutput;
    uint32_t * indices;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField 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.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
XrHandMeshIndexBufferMSFT(long address, ByteBuffer container)

public
XrHandMeshIndexBufferMSFT(ByteBuffer container)

Creates a XrHandMeshIndexBufferMSFT instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static XrHandMeshIndexBufferMSFT
calloc()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with memCalloc.

public static XrHandMeshIndexBufferMSFT.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with memCalloc.

public static XrHandMeshIndexBufferMSFT
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrHandMeshIndexBufferMSFT instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static XrHandMeshIndexBufferMSFT.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

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.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static XrHandMeshIndexBufferMSFT
create()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with BufferUtils.

public static XrHandMeshIndexBufferMSFT
create(long address)

Returns a new XrHandMeshIndexBufferMSFT instance for the specified memory address.

public static XrHandMeshIndexBufferMSFT.Buffer
create(int
the buffer capacity
capacity
)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with BufferUtils.

public static XrHandMeshIndexBufferMSFT.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a XrHandMeshIndexBufferMSFT.Buffer instance at the specified memory.

public static XrHandMeshIndexBufferMSFT
createSafe(long address)

Like create, but returns null if address is NULL.

public static XrHandMeshIndexBufferMSFT.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
indexBufferKey()

a uint32_t serving as the key of the returned index buffer content or 0 to indicate a request to retrieve the latest indices regardless of existing content in indices.

public XrHandMeshIndexBufferMSFT
indexBufferKey(int value)

Sets the specified value to the indexBufferKey field.

public int
indexCapacityInput()

a positive uint32_t describes the capacity of the indices array.

public int
indexCountOutput()

a uint32_t returned by the runtime with the count of indices written in indices.

public XrHandMeshIndexBufferMSFT
indexCountOutput(int value)

Sets the specified value to the indexCountOutput field.

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
indices(IntBuffer value)

Sets the address of the specified IntBuffer to the indices field.

public static XrHandMeshIndexBufferMSFT
malloc()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with memAlloc.

public static XrHandMeshIndexBufferMSFT.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with memAlloc.

public static XrHandMeshIndexBufferMSFT
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new XrHandMeshIndexBufferMSFT instance allocated on the specified MemoryStack.

public static XrHandMeshIndexBufferMSFT.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated on the specified MemoryStack.

public static int
nindexBufferKey(long struct)

Unsafe version of indexBufferKey.

public static void
nindexBufferKey(long struct, int value)

Unsafe version of indexBufferKey.

public static int
nindexCapacityInput(long struct)

Unsafe version of indexCapacityInput.

public static void
nindexCapacityInput(long struct, int value)

Sets the specified value to the indexCapacityInput field of the specified struct.

public static int
nindexCountOutput(long struct)

Unsafe version of indexCountOutput.

public static void
nindexCountOutput(long struct, int value)

Unsafe version of indexCountOutput.

public static IntBuffer
nindices(long struct)

Unsafe version of indices.

public static void
nindices(long struct, IntBuffer value)

Unsafe version of indices.

public XrHandMeshIndexBufferMSFT
set(int indexBufferKey, int indexCountOutput, IntBuffer indices)

Initializes this struct with the specified values.

public XrHandMeshIndexBufferMSFT

Returns:

this struct
set
(XrHandMeshIndexBufferMSFT
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

INDEXBUFFERKEYback to summary
public static final int INDEXBUFFERKEY

The struct member offsets.

INDEXCAPACITYINPUTback to summary
public static final int INDEXCAPACITYINPUT

The struct member offsets.

INDEXCOUNTOUTPUTback to summary
public static final int INDEXCOUNTOUTPUT

The struct member offsets.

INDICESback to summary
public static final int INDICES

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

XrHandMeshIndexBufferMSFTback to summary
protected XrHandMeshIndexBufferMSFT(long address, ByteBuffer container)
XrHandMeshIndexBufferMSFTback to summary
public XrHandMeshIndexBufferMSFT(ByteBuffer container)

Creates a XrHandMeshIndexBufferMSFT instance at the current position of the specified ByteBuffer container. 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 Detail

callocback to summary
public static XrHandMeshIndexBufferMSFT calloc()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static XrHandMeshIndexBufferMSFT.Buffer calloc(int capacity)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrHandMeshIndexBufferMSFT calloc(MemoryStack stack)

Returns a new XrHandMeshIndexBufferMSFT instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static XrHandMeshIndexBufferMSFT.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected XrHandMeshIndexBufferMSFT create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static XrHandMeshIndexBufferMSFT create()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with BufferUtils.

createback to summary
public static XrHandMeshIndexBufferMSFT create(long address)

Returns a new XrHandMeshIndexBufferMSFT instance for the specified memory address.

createback to summary
public static XrHandMeshIndexBufferMSFT.Buffer create(int capacity)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static XrHandMeshIndexBufferMSFT.Buffer create(long address, int capacity)

Create a XrHandMeshIndexBufferMSFT.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrHandMeshIndexBufferMSFT createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static XrHandMeshIndexBufferMSFT.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
indexBufferKeyback to summary
public int indexBufferKey()

a uint32_t serving as the key of the returned index buffer content or 0 to indicate a request to retrieve the latest indices regardless of existing content in indices.

Annotations
@NativeType:uint32_t
indexBufferKeyback to summary
public XrHandMeshIndexBufferMSFT indexBufferKey(int value)

Sets the specified value to the indexBufferKey field.

indexCapacityInputback to summary
public int indexCapacityInput()

a positive uint32_t describes the capacity of the indices array.

Annotations
@NativeType:uint32_t
indexCountOutputback to summary
public int indexCountOutput()

a uint32_t returned by the runtime with the count of indices written in indices.

Annotations
@NativeType:uint32_t
indexCountOutputback to summary
public XrHandMeshIndexBufferMSFT indexCountOutput(int value)

Sets the specified value to the indexCountOutput field.

indicesback 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.

Annotations
@NativeType:uint32_t *
indicesback to summary
public XrHandMeshIndexBufferMSFT indices(IntBuffer value)

Sets the address of the specified IntBuffer to the indices field.

mallocback to summary
public static XrHandMeshIndexBufferMSFT malloc()

Returns a new XrHandMeshIndexBufferMSFT instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static XrHandMeshIndexBufferMSFT.Buffer malloc(int capacity)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrHandMeshIndexBufferMSFT malloc(MemoryStack stack)

Returns a new XrHandMeshIndexBufferMSFT instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static XrHandMeshIndexBufferMSFT.Buffer malloc(int capacity, MemoryStack stack)

Returns a new XrHandMeshIndexBufferMSFT.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nindexBufferKeyback to summary
public static int nindexBufferKey(long struct)

Unsafe version of indexBufferKey.

nindexBufferKeyback to summary
public static void nindexBufferKey(long struct, int value)

Unsafe version of indexBufferKey.

nindexCapacityInputback to summary
public static int nindexCapacityInput(long struct)

Unsafe version of indexCapacityInput.

nindexCapacityInputback to summary
public static void nindexCapacityInput(long struct, int value)

Sets the specified value to the indexCapacityInput field of the specified struct.

nindexCountOutputback to summary
public static int nindexCountOutput(long struct)

Unsafe version of indexCountOutput.

nindexCountOutputback to summary
public static void nindexCountOutput(long struct, int value)

Unsafe version of indexCountOutput.

nindicesback to summary
public static IntBuffer nindices(long struct)

Unsafe version of indices.

nindicesback to summary
public static void nindices(long struct, IntBuffer value)

Unsafe version of indices.

setback to summary
public XrHandMeshIndexBufferMSFT set(int indexBufferKey, int indexCountOutput, IntBuffer indices)

Initializes this struct with the specified values.

setback to summary
public XrHandMeshIndexBufferMSFT set(XrHandMeshIndexBufferMSFT src)

Copies the specified struct data to this struct.

Parameters
src:XrHandMeshIndexBufferMSFT

the source struct

Returns:XrHandMeshIndexBufferMSFT

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
validateback to summary
public static void validate(long struct)

Validates pointer members that should not be NULL.

Parameters
struct:long

the struct to validate

org.lwjgl.openxr back to summary

public Class XrHandMeshIndexBufferMSFT.Buffer

extends StructBuffer<XrHandMeshIndexBufferMSFT, XrHandMeshIndexBufferMSFT.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of XrHandMeshIndexBufferMSFT structs.

Field Summary

Modifier and TypeField and Description
private static final XrHandMeshIndexBufferMSFT

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrHandMeshIndexBufferMSFT.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected XrHandMeshIndexBufferMSFT
public int

Returns:

the value of the XrHandMeshIndexBufferMSFT#indexBufferKey field.
indexBufferKey
()

public XrHandMeshIndexBufferMSFT.Buffer
indexBufferKey(int value)

Sets the specified value to the XrHandMeshIndexBufferMSFT#indexBufferKey field.

public int
public int
public XrHandMeshIndexBufferMSFT.Buffer
indexCountOutput(int value)

Sets the specified value to the XrHandMeshIndexBufferMSFT#indexCountOutput field.

public IntBuffer

Returns:

a IntBuffer view of the data pointed to by the XrHandMeshIndexBufferMSFT#indices field.
indices
()

public XrHandMeshIndexBufferMSFT.Buffer
indices(IntBuffer value)

Sets the address of the specified IntBuffer to the XrHandMeshIndexBufferMSFT#indices field.

protected XrHandMeshIndexBufferMSFT.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrHandMeshIndexBufferMSFT ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrHandMeshIndexBufferMSFT.Buffer instance backed by the specified container.

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 XrHandMeshIndexBufferMSFT#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected XrHandMeshIndexBufferMSFT getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
indexBufferKeyback to summary
public int indexBufferKey()
Returns:int

the value of the XrHandMeshIndexBufferMSFT#indexBufferKey field.

Annotations
@NativeType:uint32_t
indexBufferKeyback to summary
public XrHandMeshIndexBufferMSFT.Buffer indexBufferKey(int value)

Sets the specified value to the XrHandMeshIndexBufferMSFT#indexBufferKey field.

indexCapacityInputback to summary
public int indexCapacityInput()
Returns:int

the value of the XrHandMeshIndexBufferMSFT#indexCapacityInput field.

Annotations
@NativeType:uint32_t
indexCountOutputback to summary
public int indexCountOutput()
Returns:int

the value of the XrHandMeshIndexBufferMSFT#indexCountOutput field.

Annotations
@NativeType:uint32_t
indexCountOutputback to summary
public XrHandMeshIndexBufferMSFT.Buffer indexCountOutput(int value)

Sets the specified value to the XrHandMeshIndexBufferMSFT#indexCountOutput field.

indicesback to summary
public IntBuffer indices()
Returns:IntBuffer

a IntBuffer view of the data pointed to by the XrHandMeshIndexBufferMSFT#indices field.

Annotations
@NativeType:uint32_t *
indicesback to summary
public XrHandMeshIndexBufferMSFT.Buffer indices(IntBuffer value)

Sets the address of the specified IntBuffer to the XrHandMeshIndexBufferMSFT#indices field.

selfback to summary
protected XrHandMeshIndexBufferMSFT.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override