Class XrSpacesLocateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
Direct Known Subclasses:
XrSpacesLocateInfoKHR

public class XrSpacesLocateInfo extends Struct<XrSpacesLocateInfo> implements NativeResource

 struct XrSpacesLocateInfo {
     XrStructureType type;
     void const * next;
     XrSpace baseSpace;
     XrTime time;
     uint32_t spaceCount;
     XrSpace const * spaces;
 }
  • 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.
    • BASESPACE

      public static final int BASESPACE
      The struct member offsets.
    • TIME

      public static final int TIME
      The struct member offsets.
    • SPACECOUNT

      public static final int SPACECOUNT
      The struct member offsets.
    • SPACES

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

    • XrSpacesLocateInfo

      public XrSpacesLocateInfo(ByteBuffer container)
      Creates a XrSpacesLocateInfo 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XrSpacesLocateInfo>
    • type

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • baseSpace

      public long baseSpace()
      Returns:
      the value of the baseSpace field.
    • time

      public long time()
      Returns:
      the value of the time field.
    • spaceCount

      public int spaceCount()
      Returns:
      the value of the spaceCount field.
    • spaces

      public PointerBuffer spaces()
      Returns:
      a PointerBuffer view of the data pointed to by the spaces field.
    • type

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

      public XrSpacesLocateInfo type$Default()
      Sets the TYPE_SPACES_LOCATE_INFO value to the type field.
    • next

      public XrSpacesLocateInfo next(long value)
      Sets the specified value to the next field.
    • baseSpace

      public XrSpacesLocateInfo baseSpace(XrSpace value)
      Sets the specified value to the baseSpace field.
    • time

      public XrSpacesLocateInfo time(long value)
      Sets the specified value to the time field.
    • spaces

      public XrSpacesLocateInfo spaces(PointerBuffer value)
      Sets the address of the specified PointerBuffer to the spaces field.
    • set

      public XrSpacesLocateInfo set(int type, long next, XrSpace baseSpace, long time, PointerBuffer spaces)
      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 XrSpacesLocateInfo malloc()
      Returns a new XrSpacesLocateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrSpacesLocateInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrSpacesLocateInfo.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().
    • nbaseSpace

      public static long nbaseSpace(long struct)
      Unsafe version of baseSpace().
    • ntime

      public static long ntime(long struct)
      Unsafe version of time().
    • nspaceCount

      public static int nspaceCount(long struct)
      Unsafe version of spaceCount().
    • nspaces

      public static PointerBuffer nspaces(long struct)
      Unsafe version of spaces.
    • 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.
    • nbaseSpace

      public static void nbaseSpace(long struct, XrSpace value)
      Unsafe version of baseSpace.
    • ntime

      public static void ntime(long struct, long value)
      Unsafe version of time.
    • nspaceCount

      public static void nspaceCount(long struct, int value)
      Sets the specified value to the spaceCount field of the specified struct.
    • nspaces

      public static void nspaces(long struct, PointerBuffer value)
      Unsafe version of spaces.
    • validate

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