Class XrSpaceVelocities

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

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

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

Valid Usage (Implicit)
See Also

XrSpaceLocations, XrSpaceVelocityData, LocateSpaces

Layout


 struct XrSpaceVelocities {
     XrStructureType type();
     void * next();
     uint32_t velocityCount();
     XrSpaceVelocityData * velocities();
 }
  • 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.
    • VELOCITYCOUNT

      public static final int VELOCITYCOUNT
      The struct member offsets.
    • VELOCITIES

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

    • XrSpaceVelocities

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

      public int velocityCount()
      a uint32_t specifying the count of elements in the velocities array.
    • velocities

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

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

      public XrSpaceVelocities type$Default()
      Sets the TYPE_SPACE_VELOCITIES value to the type() field.
    • next

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

      public XrSpaceVelocities velocities(XrSpaceVelocityData.Buffer value)
      Sets the address of the specified XrSpaceVelocityData.Buffer to the velocities() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nvelocityCount(long struct)
      Unsafe version of velocityCount().
    • nvelocities

      public static XrSpaceVelocityData.Buffer nvelocities(long struct)
      Unsafe version of velocities().
    • 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.
    • nvelocityCount

      public static void nvelocityCount(long struct, int value)
      Sets the specified value to the velocityCount field of the specified struct.
    • nvelocities

      public static void nvelocities(long struct, XrSpaceVelocityData.Buffer value)
      Unsafe version of velocities.
    • validate

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