Class XrSpaceLocationData

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

public class XrSpaceLocationData extends org.lwjgl.system.Struct<XrSpaceLocationData> implements org.lwjgl.system.NativeResource
Returns the data of a space.
Description

This is a single element of the array in XrSpaceLocations::locations, and is used to return the pose and location flags for a single space with respect to the specified base space from a call to LocateSpaces. It does not accept chained structures to allow for easier use in dynamically allocated container datatypes. Chained structures are possible with the XrSpaceLocations that describes an array of these elements.

See Also

XrPosef, XrSpaceLocations

Layout


 struct XrSpaceLocationData {
     XrSpaceLocationFlags locationFlags();
     XrPosef pose();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • LOCATIONFLAGS

      public static final int LOCATIONFLAGS
      The struct member offsets.
    • POSE

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

    • XrSpaceLocationData

      public XrSpaceLocationData(ByteBuffer container)
      Creates a XrSpaceLocationData 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<XrSpaceLocationData>
    • locationFlags

      public long locationFlags()
      a bitfield, with bit masks defined in XrSpaceLocationFlagBits. It behaves the same as XrSpaceLocation::locationFlags.
    • pose

      public XrPosef pose()
      an XrPosef that behaves the same as XrSpaceLocation::pose.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nlocationFlags(long struct)
      Unsafe version of locationFlags().
    • npose

      public static XrPosef npose(long struct)
      Unsafe version of pose().