Top Description Inners Fields Constructors Methods
org.lwjgl.openxr

public Class XrHandMeshVertexBufferMSFT

extends Struct<XrHandMeshVertexBufferMSFT>
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 vertex buffer of a hand mesh.
Description

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.

Valid Usage (Implicit)
See Also

XrHandMeshMSFT, XrHandMeshVertexMSFT, XrSystemHandTrackingMeshPropertiesMSFT, UpdateHandMeshMSFT

Layout


struct XrHandMeshVertexBufferMSFT {
    XrTime vertexUpdateTime;
    uint32_t vertexCapacityInput;
    uint32_t vertexCountOutput;
    XrHandMeshVertexMSFT * vertices;
}

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

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
XrHandMeshVertexBufferMSFT(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static XrHandMeshVertexBufferMSFT
calloc()

Returns a new XrHandMeshVertexBufferMSFT instance allocated with memCalloc.

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

Returns a new XrHandMeshVertexBufferMSFT.Buffer instance allocated with memCalloc.

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

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

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

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

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

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

Returns a new XrHandMeshVertexBufferMSFT instance allocated with BufferUtils.

public static XrHandMeshVertexBufferMSFT
create(long address)

Returns a new XrHandMeshVertexBufferMSFT instance for the specified memory address.

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

Returns a new XrHandMeshVertexBufferMSFT.Buffer instance allocated with BufferUtils.

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

Create a XrHandMeshVertexBufferMSFT.Buffer instance at the specified memory.

public static XrHandMeshVertexBufferMSFT
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public static XrHandMeshVertexBufferMSFT
malloc()

Returns a new XrHandMeshVertexBufferMSFT instance allocated with memAlloc.

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

Returns a new XrHandMeshVertexBufferMSFT.Buffer instance allocated with memAlloc.

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

Returns a new XrHandMeshVertexBufferMSFT instance allocated on the specified MemoryStack.

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

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

public static int
nvertexCapacityInput(long struct)

Unsafe version of vertexCapacityInput.

public static void
nvertexCapacityInput(long struct, int value)

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

public static int
nvertexCountOutput(long struct)

Unsafe version of vertexCountOutput.

public static void
nvertexCountOutput(long struct, int value)

Unsafe version of vertexCountOutput.

public static long
nvertexUpdateTime(long struct)

Unsafe version of vertexUpdateTime.

public static void
nvertexUpdateTime(long struct, long value)

Unsafe version of vertexUpdateTime.

public static XrHandMeshVertexMSFT.Buffer
nvertices(long struct)

Unsafe version of vertices.

public static void
nvertices(long struct, XrHandMeshVertexMSFT.Buffer value)

Unsafe version of vertices.

public XrHandMeshVertexBufferMSFT
set(long vertexUpdateTime, int vertexCountOutput, XrHandMeshVertexMSFT.Buffer vertices)

Initializes this struct with the specified values.

public XrHandMeshVertexBufferMSFT

Returns:

this struct
set
(XrHandMeshVertexBufferMSFT
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.

public int
vertexCapacityInput()

a positive uint32_t describes the capacity of the vertices array.

public int
vertexCountOutput()

a uint32_t filled in by the runtime with the count of vertices written in vertices.

public XrHandMeshVertexBufferMSFT
vertexCountOutput(int value)

Sets the specified value to the vertexCountOutput field.

public long
vertexUpdateTime()

an XrTime representing the time when the runtime receives the vertex buffer content or 0 to indicate a request to retrieve latest vertices regardless of existing content in vertices.

public XrHandMeshVertexBufferMSFT
vertexUpdateTime(long value)

Sets the specified value to the vertexUpdateTime field.

public XrHandMeshVertexMSFT.Buffer
vertices()

an array of XrHandMeshVertexMSFT filled in by the runtime, specifying the vertices of the hand mesh including the position and normal vector in the hand mesh space.

public XrHandMeshVertexBufferMSFT
vertices(XrHandMeshVertexMSFT.Buffer value)

Sets the address of the specified XrHandMeshVertexMSFT.Buffer to the vertices field.

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.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

VERTEXCAPACITYINPUTback to summary
public static final int VERTEXCAPACITYINPUT

The struct member offsets.

VERTEXCOUNTOUTPUTback to summary
public static final int VERTEXCOUNTOUTPUT

The struct member offsets.

VERTEXUPDATETIMEback to summary
public static final int VERTEXUPDATETIME

The struct member offsets.

VERTICESback to summary
public static final int VERTICES

The struct member offsets.

Constructor Detail

XrHandMeshVertexBufferMSFTback to summary
protected XrHandMeshVertexBufferMSFT(long address, ByteBuffer container)
XrHandMeshVertexBufferMSFTback to summary
public XrHandMeshVertexBufferMSFT(ByteBuffer container)

Creates a XrHandMeshVertexBufferMSFT 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 XrHandMeshVertexBufferMSFT calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static XrHandMeshVertexBufferMSFT calloc(MemoryStack stack)

Returns a new XrHandMeshVertexBufferMSFT 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 XrHandMeshVertexBufferMSFT.Buffer calloc(int capacity, MemoryStack stack)

Returns a new XrHandMeshVertexBufferMSFT.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 XrHandMeshVertexBufferMSFT 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 XrHandMeshVertexBufferMSFT create()

Returns a new XrHandMeshVertexBufferMSFT instance allocated with BufferUtils.

createback to summary
public static XrHandMeshVertexBufferMSFT create(long address)

Returns a new XrHandMeshVertexBufferMSFT instance for the specified memory address.

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

Returns a new XrHandMeshVertexBufferMSFT.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a XrHandMeshVertexBufferMSFT.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static XrHandMeshVertexBufferMSFT createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static XrHandMeshVertexBufferMSFT malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static XrHandMeshVertexBufferMSFT malloc(MemoryStack stack)

Returns a new XrHandMeshVertexBufferMSFT instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nvertexCapacityInputback to summary
public static int nvertexCapacityInput(long struct)

Unsafe version of vertexCapacityInput.

nvertexCapacityInputback to summary
public static void nvertexCapacityInput(long struct, int value)

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

nvertexCountOutputback to summary
public static int nvertexCountOutput(long struct)

Unsafe version of vertexCountOutput.

nvertexCountOutputback to summary
public static void nvertexCountOutput(long struct, int value)

Unsafe version of vertexCountOutput.

nvertexUpdateTimeback to summary
public static long nvertexUpdateTime(long struct)

Unsafe version of vertexUpdateTime.

nvertexUpdateTimeback to summary
public static void nvertexUpdateTime(long struct, long value)

Unsafe version of vertexUpdateTime.

nverticesback to summary
public static XrHandMeshVertexMSFT.Buffer nvertices(long struct)

Unsafe version of vertices.

nverticesback to summary
public static void nvertices(long struct, XrHandMeshVertexMSFT.Buffer value)

Unsafe version of vertices.

setback to summary
public XrHandMeshVertexBufferMSFT set(long vertexUpdateTime, int vertexCountOutput, XrHandMeshVertexMSFT.Buffer vertices)

Initializes this struct with the specified values.

setback to summary
public XrHandMeshVertexBufferMSFT set(XrHandMeshVertexBufferMSFT src)

Copies the specified struct data to this struct.

Parameters
src:XrHandMeshVertexBufferMSFT

the source struct

Returns:XrHandMeshVertexBufferMSFT

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

vertexCapacityInputback to summary
public int vertexCapacityInput()

a positive uint32_t describes the capacity of the vertices array.

Annotations
@NativeType:uint32_t
vertexCountOutputback to summary
public int vertexCountOutput()

a uint32_t filled in by the runtime with the count of vertices written in vertices.

Annotations
@NativeType:uint32_t
vertexCountOutputback to summary
public XrHandMeshVertexBufferMSFT vertexCountOutput(int value)

Sets the specified value to the vertexCountOutput field.

vertexUpdateTimeback to summary
public long vertexUpdateTime()

an XrTime representing the time when the runtime receives the vertex buffer content or 0 to indicate a request to retrieve latest vertices regardless of existing content in vertices.

Annotations
@NativeType:XrTime
vertexUpdateTimeback to summary
public XrHandMeshVertexBufferMSFT vertexUpdateTime(long value)

Sets the specified value to the vertexUpdateTime field.

verticesback to summary
public XrHandMeshVertexMSFT.Buffer vertices()

an array of XrHandMeshVertexMSFT filled in by the runtime, specifying the vertices of the hand mesh including the position and normal vector in the hand mesh space.

Annotations
@NativeType:XrHandMeshVertexMSFT *
verticesback to summary
public XrHandMeshVertexBufferMSFT vertices(XrHandMeshVertexMSFT.Buffer value)

Sets the address of the specified XrHandMeshVertexMSFT.Buffer to the vertices field.

org.lwjgl.openxr back to summary

public Class XrHandMeshVertexBufferMSFT.Buffer

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

An array of XrHandMeshVertexBufferMSFT structs.

Field Summary

Modifier and TypeField and Description
private static final XrHandMeshVertexBufferMSFT

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new XrHandMeshVertexBufferMSFT.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 XrHandMeshVertexBufferMSFT
protected XrHandMeshVertexBufferMSFT.Buffer
public int
public int
public XrHandMeshVertexBufferMSFT.Buffer
vertexCountOutput(int value)

Sets the specified value to the XrHandMeshVertexBufferMSFT#vertexCountOutput field.

public long
public XrHandMeshVertexBufferMSFT.Buffer
vertexUpdateTime(long value)

Sets the specified value to the XrHandMeshVertexBufferMSFT#vertexUpdateTime field.

public XrHandMeshVertexMSFT.Buffer

Returns:

a XrHandMeshVertexMSFT.Buffer view of the struct array pointed to by the XrHandMeshVertexBufferMSFT#vertices field.
vertices
()

public XrHandMeshVertexBufferMSFT.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final XrHandMeshVertexBufferMSFT ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new XrHandMeshVertexBufferMSFT.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 XrHandMeshVertexBufferMSFT#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 XrHandMeshVertexBufferMSFT getElementFactory()

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

Annotations
@Override
selfback to summary
protected XrHandMeshVertexBufferMSFT.Buffer self()

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

Annotations
@Override
vertexCapacityInputback to summary
public int vertexCapacityInput()
Returns:int

the value of the XrHandMeshVertexBufferMSFT#vertexCapacityInput field.

Annotations
@NativeType:uint32_t
vertexCountOutputback to summary
public int vertexCountOutput()
Returns:int

the value of the XrHandMeshVertexBufferMSFT#vertexCountOutput field.

Annotations
@NativeType:uint32_t
vertexCountOutputback to summary
public XrHandMeshVertexBufferMSFT.Buffer vertexCountOutput(int value)

Sets the specified value to the XrHandMeshVertexBufferMSFT#vertexCountOutput field.

vertexUpdateTimeback to summary
public long vertexUpdateTime()
Returns:long

the value of the XrHandMeshVertexBufferMSFT#vertexUpdateTime field.

Annotations
@NativeType:XrTime
vertexUpdateTimeback to summary
public XrHandMeshVertexBufferMSFT.Buffer vertexUpdateTime(long value)

Sets the specified value to the XrHandMeshVertexBufferMSFT#vertexUpdateTime field.

verticesback to summary
public XrHandMeshVertexMSFT.Buffer vertices()
Returns:XrHandMeshVertexMSFT.Buffer

a XrHandMeshVertexMSFT.Buffer view of the struct array pointed to by the XrHandMeshVertexBufferMSFT#vertices field.

Annotations
@NativeType:XrHandMeshVertexMSFT *
verticesback to summary
public XrHandMeshVertexBufferMSFT.Buffer vertices(XrHandMeshVertexMSFT.Buffer value)

Sets the address of the specified XrHandMeshVertexMSFT.Buffer to the XrHandMeshVertexBufferMSFT#vertices field.