Package org.lwjgl.ovr

Class OVRPoseStatef

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

    public class OVRPoseStatef
    extends Struct
    implements NativeResource
    A full pose (rigid body) configuration with first and second derivatives.

    Body refers to any object for which ovrPoseStatef is providing data. It can be the HMD, Touch controller, sensor or something else. The context depends on the usage of the struct.

    Member documentation

    • ThePose – position and orientation
    • AngularVelocity – angular velocity in radians per second
    • LinearVelocity – velocity in meters per second
    • AngularAcceleration – angular acceleration in radians per second per second
    • LinearAcceleration – acceleration in meters per second per second
    • TimeInSeconds – absolute time that this pose refers to. See GetTimeInSeconds

    Layout

    
     struct ovrPoseStatef {
         ovrPosef ThePose;
         ovrVector3f AngularVelocity;
         ovrVector3f LinearVelocity;
         ovrVector3f AngularAcceleration;
         ovrVector3f LinearAcceleration;
         char[4];
         double TimeInSeconds;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • THEPOSE, ANGULARVELOCITY, LINEARVELOCITY, ANGULARACCELERATION, LINEARACCELERATION, TIMEINSECONDS

        The struct member offsets.
    • Constructor Detail

      • OVRPoseStatef

        public OVRPoseStatef​(java.nio.ByteBuffer container)
        Creates a OVRPoseStatef 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
      • ThePose

        public OVRPosef ThePose()
        Returns a OVRPosef view of the ThePose field.
      • AngularVelocity

        public OVRVector3f AngularVelocity()
        Returns a OVRVector3f view of the AngularVelocity field.
      • LinearVelocity

        public OVRVector3f LinearVelocity()
        Returns a OVRVector3f view of the LinearVelocity field.
      • AngularAcceleration

        public OVRVector3f AngularAcceleration()
        Returns a OVRVector3f view of the AngularAcceleration field.
      • LinearAcceleration

        public OVRVector3f LinearAcceleration()
        Returns a OVRVector3f view of the LinearAcceleration field.
      • TimeInSeconds

        public double TimeInSeconds()
        Returns the value of the TimeInSeconds field.
      • malloc

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

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

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

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

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

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

        public static OVRPoseStatef mallocStack()
        Returns a new OVRPoseStatef instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static OVRPosef nThePose​(long struct)
        Unsafe version of ThePose().
      • nTimeInSeconds

        public static double nTimeInSeconds​(long struct)
        Unsafe version of TimeInSeconds().