Class XrSpaceVelocity

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrSpaceVelocity extends Struct<XrSpaceVelocity> implements NativeResource

 struct XrSpaceVelocity {
     XrStructureType type;
     void * next;
     XrSpaceVelocityFlags velocityFlags;
     {@link XrVector3f XrVector3f} linearVelocity;
     {@link XrVector3f XrVector3f} angularVelocity;
 }
  • 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.
    • VELOCITYFLAGS

      public static final int VELOCITYFLAGS
      The struct member offsets.
    • LINEARVELOCITY

      public static final int LINEARVELOCITY
      The struct member offsets.
    • ANGULARVELOCITY

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

    • XrSpaceVelocity

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

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

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

      public long velocityFlags()
      Returns:
      the value of the velocityFlags field.
    • linearVelocity

      public XrVector3f linearVelocity()
      Returns:
      a XrVector3f view of the linearVelocity field.
    • angularVelocity

      public XrVector3f angularVelocity()
      Returns:
      a XrVector3f view of the angularVelocity field.
    • type

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

      public XrSpaceVelocity type$Default()
      Sets the TYPE_SPACE_VELOCITY value to the type field.
    • next

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

      public XrSpaceVelocity velocityFlags(long value)
      Sets the specified value to the velocityFlags field.
    • linearVelocity

      public XrSpaceVelocity linearVelocity(XrVector3f value)
      Copies the specified XrVector3f to the linearVelocity field.
    • linearVelocity

      public XrSpaceVelocity linearVelocity(Consumer<XrVector3f> consumer)
      Passes the linearVelocity field to the specified Consumer.
    • angularVelocity

      public XrSpaceVelocity angularVelocity(XrVector3f value)
      Copies the specified XrVector3f to the angularVelocity field.
    • angularVelocity

      public XrSpaceVelocity angularVelocity(Consumer<XrVector3f> consumer)
      Passes the angularVelocity field to the specified Consumer.
    • set

      public XrSpaceVelocity set(int type, long next, long velocityFlags, XrVector3f linearVelocity, XrVector3f angularVelocity)
      Initializes this struct with the specified values.
    • set

      public XrSpaceVelocity set(XrSpaceVelocity src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nvelocityFlags(long struct)
      Unsafe version of velocityFlags().
    • nlinearVelocity

      public static XrVector3f nlinearVelocity(long struct)
      Unsafe version of linearVelocity().
    • nangularVelocity

      public static XrVector3f nangularVelocity(long struct)
      Unsafe version of angularVelocity().
    • 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.
    • nvelocityFlags

      public static void nvelocityFlags(long struct, long value)
      Unsafe version of velocityFlags.
    • nlinearVelocity

      public static void nlinearVelocity(long struct, XrVector3f value)
      Unsafe version of linearVelocity.
    • nangularVelocity

      public static void nangularVelocity(long struct, XrVector3f value)
      Unsafe version of angularVelocity.