Package org.lwjgl.ovr

Class OVRPosef

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class OVRPosef
    extends Struct
    implements NativeResource
    Position and orientation together.

    Member documentation

    • Orientation – the pose orientation
    • Position – the pose position

    Layout

    
     struct ovrPosef {
         ovrQuatf Orientation;
         ovrVector3f Position;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ORIENTATION, POSITION

        The struct member offsets.
    • Constructor Detail

      • OVRPosef

        public OVRPosef​(java.nio.ByteBuffer container)
        Creates a OVRPosef 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • Orientation

        public OVRQuatf Orientation()
        Returns a OVRQuatf view of the Orientation field.
      • Orientation

        public OVRPosef Orientation​(java.util.function.Consumer<OVRQuatf> consumer)
        Passes the Orientation field to the specified Consumer.
      • Position

        public OVRPosef Position​(java.util.function.Consumer<OVRVector3f> consumer)
        Passes the Position field to the specified Consumer.
      • set

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

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

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

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

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

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

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

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

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

        public static OVRPosef callocStack()
        Returns a new OVRPosef instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static OVRPosef mallocStack​(MemoryStack stack)
        Returns a new OVRPosef instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static OVRPosef.Buffer callocStack​(int capacity)
        Returns a new OVRPosef.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static OVRPosef.Buffer callocStack​(int capacity,
                                                  MemoryStack stack)
        Returns a new OVRPosef.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nOrientation

        public static void nOrientation​(long struct,
                                        OVRQuatf value)
        Unsafe version of Orientation.
      • nPosition

        public static void nPosition​(long struct,
                                     OVRVector3f value)
        Unsafe version of Position.