Package org.lwjgl.ovr

Class OVRTrackingState

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

public class OVRTrackingState extends org.lwjgl.system.Struct<OVRTrackingState> implements org.lwjgl.system.NativeResource
Tracking state at a given absolute time (describes predicted HMD pose etc). Returned by GetTrackingState.

Layout


 struct ovrTrackingState {
     ovrPoseStatef HeadPose();
     unsigned int StatusFlags();
     ovrPoseStatef HandPoses()[2];
     unsigned int HandStatusFlags()[2];
     ovrPosef CalibratedOrigin();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int HEADPOSE
      The struct member offsets.
    • STATUSFLAGS

      public static final int STATUSFLAGS
      The struct member offsets.
    • HANDPOSES

      public static final int HANDPOSES
      The struct member offsets.
    • HANDSTATUSFLAGS

      public static final int HANDSTATUSFLAGS
      The struct member offsets.
    • CALIBRATEDORIGIN

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

    • OVRTrackingState

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

      public OVRPoseStatef HeadPose()
      Predicted head pose (and derivatives) at the requested absolute time. The look-ahead interval is equal to (HeadPose.TimeInSeconds - RawSensorData.TimeInSeconds).
    • StatusFlags

      public int StatusFlags()
      HeadPose tracking status described by ovrStatusBits.
    • HandPoses

      public OVRPoseStatef.Buffer HandPoses()
      The most recent calculated pose for each hand when hand controller tracking is present. HandPoses[ovrHand_Left] refers to the left hand and HandPoses[ovrHand_Right] to the right hand. These values can be combined with ovrInputState for complete hand controller information.
    • HandPoses

      public OVRPoseStatef HandPoses(int index)
      The most recent calculated pose for each hand when hand controller tracking is present. HandPoses[ovrHand_Left] refers to the left hand and HandPoses[ovrHand_Right] to the right hand. These values can be combined with ovrInputState for complete hand controller information.
    • HandStatusFlags

      public IntBuffer HandStatusFlags()
      HandPoses status flags described by ovrStatusBits.
    • HandStatusFlags

      public int HandStatusFlags(int index)
      HandPoses status flags described by ovrStatusBits.
    • CalibratedOrigin

      public OVRPosef CalibratedOrigin()
      the pose of the origin captured during calibration.

      Like all other poses here, this is expressed in the space set by RecenterTrackingOrigin, or SpecifyTrackingOrigin and so will change every time either of those functions are called. This pose can be used to calculate where the calibrated origin lands in the new recentered space. If an application never calls RecenterTrackingOrigin or SpecifyTrackingOrigin, expect this value to be the identity pose and as such will point respective origin based on ovrTrackingOrigin requested when calling GetTrackingState.

    • malloc

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static OVRTrackingState mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRTrackingState callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRTrackingState mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRTrackingState callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRTrackingState.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRTrackingState.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRTrackingState.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRTrackingState.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

      public static OVRTrackingState.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRTrackingState.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
    • nHeadPose

      public static OVRPoseStatef nHeadPose(long struct)
      Unsafe version of HeadPose().
    • nStatusFlags

      public static int nStatusFlags(long struct)
      Unsafe version of StatusFlags().
    • nHandPoses

      public static OVRPoseStatef.Buffer nHandPoses(long struct)
      Unsafe version of HandPoses().
    • nHandPoses

      public static OVRPoseStatef nHandPoses(long struct, int index)
      Unsafe version of HandPoses.
    • nHandStatusFlags

      public static IntBuffer nHandStatusFlags(long struct)
      Unsafe version of HandStatusFlags().
    • nHandStatusFlags

      public static int nHandStatusFlags(long struct, int index)
      Unsafe version of HandStatusFlags.
    • nCalibratedOrigin

      public static OVRPosef nCalibratedOrigin(long struct)
      Unsafe version of CalibratedOrigin().