Class XrSpacesLocateInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrSpacesLocateInfo>
org.lwjgl.openxr.XrSpacesLocateInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
XrSpacesLocateInfoKHR

public class XrSpacesLocateInfo extends org.lwjgl.system.Struct<XrSpacesLocateInfo> implements org.lwjgl.system.NativeResource
Inputs the information to locate spaces.
Description

The time, the baseSpace, and each space in spaces all follow the same specifics as the corresponding inputs to the LocateSpace function.

The baseSpace and all of the XrSpace handles in the spaces array must be valid and share the same parent XrSession.

If the time is invalid, the LocateSpaces must return ERROR_TIME_INVALID.

The spaceCount must be a positive number, i.e. the array spaces must not be empty. Otherwise, the runtime must return ERROR_VALIDATION_FAILURE.

Valid Usage (Implicit)
  • type must be TYPE_SPACES_LOCATE_INFO
  • next must be NULL or a valid pointer to the next structure in a structure chain
  • baseSpace must be a valid XrSpace handle
  • spaces must be a pointer to an array of spaceCount valid XrSpace handles
  • The spaceCount parameter must be greater than 0
  • Both of baseSpace and the elements of spaces must have been created, allocated, or retrieved from the same XrSession
See Also

LocateSpaces, LocateSpacesKHR

Layout


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

      public long baseSpace()
      identifies the underlying space in which to locate spaces.
    • time

      public long time()
      the time for which the location is requested.
    • spaceCount

      public int spaceCount()
      a uint32_t specifying the count of elements in the spaces array.
    • spaces

      public org.lwjgl.PointerBuffer spaces()
      an array of valid XrSpace handles to be located.
    • 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(org.lwjgl.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, org.lwjgl.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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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 org.lwjgl.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, org.lwjgl.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