Class XrPosef

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrPosef extends Struct<XrPosef> implements NativeResource

 struct XrPosef {
     {@link XrQuaternionf XrQuaternionf} orientation;
     {@link XrVector3f XrVector3f} position;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ORIENTATION
      The struct member offsets.
    • POSITION

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

    • XrPosef

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

      public XrQuaternionf orientation()
      Returns:
      a XrQuaternionf view of the orientation field.
    • position$

      public XrVector3f position$()
      Returns:
      a XrVector3f view of the position field.
    • orientation

      public XrPosef orientation(XrQuaternionf value)
      Copies the specified XrQuaternionf to the orientation field.
    • orientation

      public XrPosef orientation(Consumer<XrQuaternionf> consumer)
      Passes the orientation field to the specified Consumer.
    • position$

      public XrPosef position$(XrVector3f value)
      Copies the specified XrVector3f to the position field.
    • position$

      public XrPosef position$(Consumer<XrVector3f> consumer)
      Passes the position field to the specified Consumer.
    • set

      public XrPosef set(XrQuaternionf orientation, XrVector3f position$)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrQuaternionf norientation(long struct)
      Unsafe version of orientation().
    • nposition$

      public static XrVector3f nposition$(long struct)
      Unsafe version of position$().
    • norientation

      public static void norientation(long struct, XrQuaternionf value)
      Unsafe version of orientation.
    • nposition$

      public static void nposition$(long struct, XrVector3f value)
      Unsafe version of position$.