Class XrSpaceTriangleMeshMETA

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

public class XrSpaceTriangleMeshMETA extends org.lwjgl.system.Struct<XrSpaceTriangleMeshMETA> implements org.lwjgl.system.NativeResource
Output parameter to the xrGetSpaceTriangleMeshMETA function.
Description

The XrSpaceTriangleMeshMETA structure can be used by the application to perform the two calls required to obtain a triangle mesh associated to a specified spatial entity.

The output values written in the indices array represent indices of vertices: Three consecutive elements represent a triangle with a counter-clockwise winding order.

Valid Usage (Implicit)
See Also

XrVector3f, GetSpaceTriangleMeshMETA

Layout


 struct XrSpaceTriangleMeshMETA {
     XrStructureType type();
     void * next();
     uint32_t vertexCapacityInput();
     uint32_t vertexCountOutput();
     XrVector3f * vertices();
     uint32_t indexCapacityInput();
     uint32_t indexCountOutput();
     uint32_t * indices();
 }
  • 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.
    • VERTEXCAPACITYINPUT

      public static final int VERTEXCAPACITYINPUT
      The struct member offsets.
    • VERTEXCOUNTOUTPUT

      public static final int VERTEXCOUNTOUTPUT
      The struct member offsets.
    • VERTICES

      public static final int VERTICES
      The struct member offsets.
    • INDEXCAPACITYINPUT

      public static final int INDEXCAPACITYINPUT
      The struct member offsets.
    • INDEXCOUNTOUTPUT

      public static final int INDEXCOUNTOUTPUT
      The struct member offsets.
    • INDICES

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

    • XrSpaceTriangleMeshMETA

      public XrSpaceTriangleMeshMETA(ByteBuffer container)
      Creates a XrSpaceTriangleMeshMETA 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<XrSpaceTriangleMeshMETA>
    • 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.
    • vertexCapacityInput

      public int vertexCapacityInput()
      an input parameter for the application to specify the capacity of the vertices array, or 0 to indicate a request to retrieve the required capacity.
    • vertexCountOutput

      public int vertexCountOutput()
      an output parameter that will hold the number of vertices written in the output array, or the required capacity in the case that vertexCapacityInput is insufficient. The returned value must be equal to or larger than 3.
    • vertices

      public @Nullable XrVector3f.Buffer vertices()
      a pointer to an array of XrVector3f, but can be NULL if vertexCapacityInput is 0. The vertices are defined in the coordinate frame of XrSpace to which this struct is associated.
    • indexCapacityInput

      public int indexCapacityInput()
      an input parameter for the application to specify the capacity of the indices array, or 0 to indicate a request to retrieve the required capacity.
    • indexCountOutput

      public int indexCountOutput()
      an output parameter that will hold the number of indices written in the output array, or the required capacity in the case that indexCapacityInput is insufficient. The returned value must be a multiple of 3.
    • indices

      public @Nullable IntBuffer indices()
      a pointer to an array of uint32_t, but can be NULL if indexCapacityInput is 0. Each element refers to a vertex in vertices.
    • type

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

      public XrSpaceTriangleMeshMETA type$Default()
      Sets the TYPE_SPACE_TRIANGLE_MESH_META value to the type() field.
    • next

      public XrSpaceTriangleMeshMETA next(long value)
      Sets the specified value to the next() field.
    • set

      public XrSpaceTriangleMeshMETA set(int type, long next)
      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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrSpaceTriangleMeshMETA.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrSpaceTriangleMeshMETA.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().
    • nvertexCapacityInput

      public static int nvertexCapacityInput(long struct)
      Unsafe version of vertexCapacityInput().
    • nvertexCountOutput

      public static int nvertexCountOutput(long struct)
      Unsafe version of vertexCountOutput().
    • nvertices

      public static @Nullable XrVector3f.Buffer nvertices(long struct)
      Unsafe version of vertices().
    • nindexCapacityInput

      public static int nindexCapacityInput(long struct)
      Unsafe version of indexCapacityInput().
    • nindexCountOutput

      public static int nindexCountOutput(long struct)
      Unsafe version of indexCountOutput().
    • nindices

      public static @Nullable IntBuffer nindices(long struct)
      Unsafe version of indices.
    • 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.