Class XrSpaceVelocity

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrSpaceVelocity>
org.lwjgl.openxr.XrSpaceVelocity
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrSpaceVelocity extends org.lwjgl.system.Struct<XrSpaceVelocity> implements org.lwjgl.system.NativeResource
Contains info about a space.
Valid Usage (Implicit)
See Also

XrSpaceLocation, XrVector3f, LocateSpace

Layout


 struct XrSpaceVelocity {
     XrStructureType type();
     void * next();
     XrSpaceVelocityFlags velocityFlags();
     XrVector3f linearVelocity();
     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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrSpaceVelocity>
    • 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.
    • velocityFlags

      public long velocityFlags()
      a bitfield, with bit masks defined in XrSpaceVelocityFlagBits, to indicate which members contain valid data. If none of the bits are set, no other fields in this structure should be considered to be valid or meaningful.
    • linearVelocity

      public XrVector3f linearVelocity()
      the relative linear velocity of the origin of LocateSpace::space with respect to and expressed in the reference frame of LocateSpace::baseSpace, in units of meters per second.
    • angularVelocity

      public XrVector3f angularVelocity()
      the relative angular velocity of LocateSpace::space with respect to LocateSpace::baseSpace. The vector’s direction is expressed in the reference frame of LocateSpace::baseSpace and is parallel to the rotational axis of LocateSpace::space. The vector’s magnitude is the relative angular speed of LocateSpace::space in radians per second. The vector follows the right-hand rule for torque/rotation.
    • 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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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.