Package org.lwjgl.ovr

Class OVRPosef

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


    public class OVRPosef
    extends Struct
    Position and orientation together.

    Member documentation

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

    Layout

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

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • 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 the sizeof(struct).
        Specified by:
        sizeof in class Struct
      • Orientation

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

        public OVRPosef nset(long struct)
        Unsafe version of set.
      • 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 or null if the 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
      • 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