Class XrHandMeshMSFT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrHandMeshMSFT>
org.lwjgl.openxr.XrHandMeshMSFT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrHandMeshMSFT extends org.lwjgl.system.Struct<XrHandMeshMSFT> implements org.lwjgl.system.NativeResource
The data of a hand mesh.
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)
See Also

XrHandMeshIndexBufferMSFT, XrHandMeshVertexBufferMSFT, UpdateHandMeshMSFT

Layout


 struct XrHandMeshMSFT {
     XrStructureType type();
     void * next();
     XrBool32 isActive();
     XrBool32 indexBufferChanged();
     XrBool32 vertexBufferChanged();
     XrHandMeshIndexBufferMSFT indexBuffer();
     XrHandMeshVertexBufferMSFT vertexBuffer();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • ISACTIVE

      public static final int ISACTIVE
      The struct member offsets.
    • INDEXBUFFERCHANGED

      public static final int INDEXBUFFERCHANGED
      The struct member offsets.
    • VERTEXBUFFERCHANGED

      public static final int VERTEXBUFFERCHANGED
      The struct member offsets.
    • INDEXBUFFER

      public static final int INDEXBUFFER
      The struct member offsets.
    • VERTEXBUFFER

      public static final int VERTEXBUFFER
      The struct member offsets.
  • Constructor Details

    • XrHandMeshMSFT

      public XrHandMeshMSFT(ByteBuffer container)
      Creates a XrHandMeshMSFT 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrHandMeshMSFT>
    • type

      public int type()
      the XrStructureType of this structure.
    • next

      public long next()
      NULL or 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()
      an XrBool32 indicating if the current hand tracker is active.
    • indexBufferChanged

      public boolean indexBufferChanged()
      an XrBool32 indicating if the indexBuffer content was changed during the update.
    • vertexBufferChanged

      public boolean vertexBufferChanged()
      an XrBool32 indicating if the vertexBuffer content was changed during the update.
    • indexBuffer

      public XrHandMeshIndexBufferMSFT indexBuffer()
      an XrHandMeshIndexBufferMSFT returns the index buffer of the tracked hand mesh.
    • vertexBuffer

      public XrHandMeshVertexBufferMSFT vertexBuffer()
      an XrHandMeshVertexBufferMSFT returns the vertex buffer of the tracked hand mesh.
    • type

      public XrHandMeshMSFT type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrHandMeshMSFT type$Default()
      Sets the TYPE_HAND_MESH_MSFT value to the type() field.
    • next

      public XrHandMeshMSFT next(long value)
      Sets the specified value to the next() field.
    • isActive

      public XrHandMeshMSFT isActive(boolean value)
      Sets the specified value to the isActive() field.
    • indexBufferChanged

      public XrHandMeshMSFT indexBufferChanged(boolean value)
      Sets the specified value to the indexBufferChanged() field.
    • vertexBufferChanged

      public XrHandMeshMSFT vertexBufferChanged(boolean value)
      Sets the specified value to the vertexBufferChanged() field.
    • indexBuffer

      public XrHandMeshMSFT indexBuffer(XrHandMeshIndexBufferMSFT value)
      Copies the specified XrHandMeshIndexBufferMSFT to the indexBuffer() field.
    • indexBuffer

      public XrHandMeshMSFT indexBuffer(Consumer<XrHandMeshIndexBufferMSFT> consumer)
      Passes the indexBuffer() field to the specified Consumer.
    • vertexBuffer

      public XrHandMeshMSFT vertexBuffer(XrHandMeshVertexBufferMSFT value)
      Copies the specified XrHandMeshVertexBufferMSFT to the vertexBuffer() field.
    • vertexBuffer

      public XrHandMeshMSFT vertexBuffer(Consumer<XrHandMeshVertexBufferMSFT> consumer)
      Passes the vertexBuffer() field to the specified Consumer.
    • 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

      public XrHandMeshMSFT set(XrHandMeshMSFT src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrHandMeshMSFT malloc()
      Returns a new XrHandMeshMSFT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrHandMeshMSFT calloc()
      Returns a new XrHandMeshMSFT instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrHandMeshMSFT create()
      Returns a new XrHandMeshMSFT instance allocated with BufferUtils.
    • create

      public static XrHandMeshMSFT create(long address)
      Returns a new XrHandMeshMSFT instance for the specified memory address.
    • createSafe

      public static @Nullable XrHandMeshMSFT createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrHandMeshMSFT.Buffer malloc(int capacity)
      Returns a new XrHandMeshMSFT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrHandMeshMSFT.Buffer calloc(int capacity)
      Returns a new XrHandMeshMSFT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrHandMeshMSFT.Buffer create(int capacity)
      Returns a new XrHandMeshMSFT.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrHandMeshMSFT.Buffer create(long address, int capacity)
      Create a XrHandMeshMSFT.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrHandMeshMSFT.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrHandMeshMSFT malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrHandMeshMSFT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrHandMeshMSFT calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrHandMeshMSFT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrHandMeshMSFT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrHandMeshMSFT.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrHandMeshMSFT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrHandMeshMSFT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nisActive

      public static int nisActive(long struct)
      Unsafe version of isActive().
    • nindexBufferChanged

      public static int nindexBufferChanged(long struct)
      Unsafe version of indexBufferChanged().
    • nvertexBufferChanged

      public static int nvertexBufferChanged(long struct)
      Unsafe version of vertexBufferChanged().
    • nindexBuffer

      public static XrHandMeshIndexBufferMSFT nindexBuffer(long struct)
      Unsafe version of indexBuffer().
    • nvertexBuffer

      public static XrHandMeshVertexBufferMSFT nvertexBuffer(long struct)
      Unsafe version of vertexBuffer().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nisActive

      public static void nisActive(long struct, int value)
      Unsafe version of isActive.
    • nindexBufferChanged

      public static void nindexBufferChanged(long struct, int value)
      Unsafe version of indexBufferChanged.
    • nvertexBufferChanged

      public static void nvertexBufferChanged(long struct, int value)
      Unsafe version of vertexBufferChanged.
    • nindexBuffer

      public static void nindexBuffer(long struct, XrHandMeshIndexBufferMSFT value)
      Unsafe version of indexBuffer.
    • nvertexBuffer

      public static void nvertexBuffer(long struct, XrHandMeshVertexBufferMSFT value)
      Unsafe version of vertexBuffer.