Class XrHandMeshMSFT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XrHandMeshMSFT
    extends org.lwjgl.system.Struct
    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 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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, NEXT, ISACTIVE, INDEXBUFFERCHANGED, VERTEXBUFFERCHANGED, INDEXBUFFER, VERTEXBUFFER

        The struct member offsets.
    • Constructor Detail

      • XrHandMeshMSFT

        public XrHandMeshMSFT​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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.
      • 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

        @Nullable
        public static 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​(long address,
                                                   int capacity)
        Create a XrHandMeshMSFT.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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().
      • 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.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate