Package org.lwjgl.ovr
Class OVRTrackingState
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRTrackingState
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class OVRTrackingState extends Struct
Tracking state at a given absolute time (describes predicted HMD pose etc). Returned byOVR.ovr_GetTrackingState(long, double, boolean, org.lwjgl.ovr.OVRTrackingState).Member documentation
HeadPose– Predicted head pose (and derivatives) at the requested absolute time. The look-ahead interval is equal to(HeadPose.TimeInSeconds - RawSensorData.TimeInSeconds).StatusFlags–HeadPosetracking status described byovrStatusBits.HandPoses– The most recent calculated pose for each hand when hand controller tracking is present.HandPoses[ovrHand_Left]refers to the left hand andHandPoses[ovrHand_Right]to the right hand. These values can be combined withovrInputStatefor complete hand controller information.HandStatusFlags–HandPosesstatus flags described byovrStatusBits. OnlyOVR.ovrStatus_OrientationTrackedandOVR.ovrStatus_PositionTrackedare reported.CalibratedOrigin– the pose of the origin captured during calibration.Like all other poses here, this is expressed in the space set by
RecenterTrackingOrigin, and so will change every time that is called. This pose can be used to calculate where the calibrated origin lands in the new recentered space. If an application never callsRecenterTrackingOrigin, expect this value to be the identity pose and as such will point respective origin based onovrTrackingOriginrequested when callingGetTrackingState.
Layout
struct ovrTrackingState {ovrPoseStatefHeadPose; unsigned int StatusFlags;ovrPoseStatef[2] HandPoses; unsigned int[2] HandStatusFlags;ovrPosefCalibratedOrigin; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classOVRTrackingState.BufferAn array ofOVRTrackingStatestructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description OVRTrackingState(java.nio.ByteBuffer container)Creates aOVRTrackingStateinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description OVRPosefCalibratedOrigin()Returns aOVRPosefview of theCalibratedOriginfield.static OVRTrackingStatecalloc()Returns a newOVRTrackingStateinstance allocated withmemCalloc.static OVRTrackingState.Buffercalloc(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated withmemCalloc.static OVRTrackingStatecallocStack()Returns a newOVRTrackingStateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRTrackingState.BuffercallocStack(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static OVRTrackingState.BuffercallocStack(int capacity, MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTrackingStatecallocStack(MemoryStack stack)Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTrackingStatecreate()Returns a newOVRTrackingStateinstance allocated withBufferUtils.static OVRTrackingState.Buffercreate(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated withBufferUtils.static OVRTrackingStatecreate(long address)Returns a newOVRTrackingStateinstance for the specified memory address ornullif the address isNULL.static OVRTrackingState.Buffercreate(long address, int capacity)Create aOVRTrackingState.Bufferinstance at the specified memory.OVRPoseStatef.BufferHandPoses()Returns aOVRPoseStatef.Buffer view of theHandPosesfield.OVRPoseStatefHandPoses(int index)Returns aOVRPoseStatefview of the struct at the specified index of theHandPosesfield.java.nio.IntBufferHandStatusFlags()Returns aIntBufferview of theHandStatusFlagsfield.intHandStatusFlags(int index)Returns the value at the specified index of theHandStatusFlagsfield.OVRPoseStatefHeadPose()Returns aOVRPoseStatefview of theHeadPosefield.static OVRTrackingStatemalloc()Returns a newOVRTrackingStateinstance allocated withmemAlloc.static OVRTrackingState.Buffermalloc(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated withmemAlloc.static OVRTrackingStatemallocStack()Returns a newOVRTrackingStateinstance allocated on the thread-localMemoryStack.static OVRTrackingState.BuffermallocStack(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated on the thread-localMemoryStack.static OVRTrackingState.BuffermallocStack(int capacity, MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStack.static OVRTrackingStatemallocStack(MemoryStack stack)Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.intsizeof()Returns thesizeof(struct).intStatusFlags()Returns the value of theStatusFlagsfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
OVRTrackingState
public OVRTrackingState(java.nio.ByteBuffer container)
Creates aOVRTrackingStateinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
HeadPose
public OVRPoseStatef HeadPose()
Returns aOVRPoseStatefview of theHeadPosefield.
-
StatusFlags
public int StatusFlags()
Returns the value of theStatusFlagsfield.
-
HandPoses
public OVRPoseStatef.Buffer HandPoses()
Returns aOVRPoseStatef.Buffer view of theHandPosesfield.
-
HandPoses
public OVRPoseStatef HandPoses(int index)
Returns aOVRPoseStatefview of the struct at the specified index of theHandPosesfield.
-
HandStatusFlags
public java.nio.IntBuffer HandStatusFlags()
Returns aIntBufferview of theHandStatusFlagsfield.
-
HandStatusFlags
public int HandStatusFlags(int index)
Returns the value at the specified index of theHandStatusFlagsfield.
-
CalibratedOrigin
public OVRPosef CalibratedOrigin()
Returns aOVRPosefview of theCalibratedOriginfield.
-
malloc
public static OVRTrackingState malloc()
Returns a newOVRTrackingStateinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OVRTrackingState calloc()
Returns a newOVRTrackingStateinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OVRTrackingState create()
Returns a newOVRTrackingStateinstance allocated withBufferUtils.
-
create
public static OVRTrackingState create(long address)
Returns a newOVRTrackingStateinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static OVRTrackingState.Buffer malloc(int capacity)
Returns a newOVRTrackingState.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OVRTrackingState.Buffer calloc(int capacity)
Returns a newOVRTrackingState.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OVRTrackingState.Buffer create(int capacity)
Returns a newOVRTrackingState.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OVRTrackingState.Buffer create(long address, int capacity)
Create aOVRTrackingState.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static OVRTrackingState mallocStack()
Returns a newOVRTrackingStateinstance allocated on the thread-localMemoryStack.
-
callocStack
public static OVRTrackingState callocStack()
Returns a newOVRTrackingStateinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static OVRTrackingState mallocStack(MemoryStack stack)
Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRTrackingState callocStack(MemoryStack stack)
Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static OVRTrackingState.Buffer mallocStack(int capacity)
Returns a newOVRTrackingState.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static OVRTrackingState.Buffer callocStack(int capacity)
Returns a newOVRTrackingState.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static OVRTrackingState.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static OVRTrackingState.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-