Class XrSpaceLocations

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

public class XrSpaceLocations extends org.lwjgl.system.Struct<XrSpaceLocations> implements org.lwjgl.system.NativeResource
Returns an array of space locations.
Description

The XrSpaceLocations structure contains an array of space locations in the member locations, to be used as output for LocateSpaces. The application must allocate this array to be populated with the function output. The locationCount value must be the same as XrSpacesLocateInfo::spaceCount, otherwise, the LocateSpaces function must return ERROR_VALIDATION_FAILURE.

Valid Usage (Implicit)
See Also

XrSpaceLocationData, LocateSpaces, LocateSpacesKHR

Layout


 struct XrSpaceLocations {
     XrStructureType type();
     void * next();
     uint32_t locationCount();
     XrSpaceLocationData * locations();
 }
  • 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.
    • LOCATIONCOUNT

      public static final int LOCATIONCOUNT
      The struct member offsets.
    • LOCATIONS

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

    • XrSpaceLocations

      public XrSpaceLocations(ByteBuffer container)
      Creates a XrSpaceLocations 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<XrSpaceLocations>
    • 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, such as XrSpaceVelocities.
    • locationCount

      public int locationCount()
      a uint32_t specifying the count of elements in the locations array.
    • locations

      public XrSpaceLocationData.Buffer locations()
      an array of XrSpaceLocations for the runtime to populate with the locations of the specified spaces in the XrSpacesLocateInfo::baseSpace at the specified XrSpacesLocateInfo::time.
    • type

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

      public XrSpaceLocations type$Default()
      Sets the TYPE_SPACE_LOCATIONS value to the type() field.
    • next

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

      public XrSpaceLocations next(XrSpaceVelocities value)
      Prepends the specified XrSpaceVelocities value to the next chain.
    • next

      Prepends the specified XrSpaceVelocitiesKHR value to the next chain.
    • locations

      public XrSpaceLocations locations(XrSpaceLocationData.Buffer value)
      Sets the address of the specified XrSpaceLocationData.Buffer to the locations() field.
    • set

      public XrSpaceLocations set(int type, long next, XrSpaceLocationData.Buffer locations)
      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 XrSpaceLocations malloc()
      Returns a new XrSpaceLocations instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nlocationCount(long struct)
      Unsafe version of locationCount().
    • nlocations

      public static XrSpaceLocationData.Buffer nlocations(long struct)
      Unsafe version of locations().
    • 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.
    • nlocationCount

      public static void nlocationCount(long struct, int value)
      Sets the specified value to the locationCount field of the specified struct.
    • nlocations

      public static void nlocations(long struct, XrSpaceLocationData.Buffer value)
      Unsafe version of locations.
    • validate

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