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,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class OVRTrackingState extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceTracking state at a given absolute time (describes predicted HMD pose etc). Returned byGetTrackingState.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[2]– 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[2]–HandPosesstatus flags described byovrStatusBits.CalibratedOrigin– the pose of the origin captured during calibration.Like all other poses here, this is expressed in the space set by
RecenterTrackingOrigin, orSpecifyTrackingOriginand 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 callsRecenterTrackingOriginorSpecifyTrackingOrigin, 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;ovrPoseStatefHandPoses[2]; unsigned int HandStatusFlags[2];ovrPosefCalibratedOrigin; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOVRTrackingState.BufferAn array ofOVRTrackingStatestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCALIBRATEDORIGIN
HANDPOSES
HANDSTATUSFLAGS
HEADPOSEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTATUSFLAGSThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTrackingStatecallocStack(org.lwjgl.system.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.static OVRTrackingState.Buffercreate(long address, int capacity)Create aOVRTrackingState.Bufferinstance at the specified memory.static OVRTrackingStatecreateSafe(long address)static OVRTrackingState.BuffercreateSafe(long address, int capacity)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, org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStack.static OVRTrackingStatemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.static OVRPosefnCalibratedOrigin(long struct)Unsafe version ofCalibratedOrigin().static OVRPoseStatef.BuffernHandPoses(long struct)Unsafe version ofHandPoses().static OVRPoseStatefnHandPoses(long struct, int index)Unsafe version ofHandPoses.static java.nio.IntBuffernHandStatusFlags(long struct)Unsafe version ofHandStatusFlags().static intnHandStatusFlags(long struct, int index)Unsafe version ofHandStatusFlags.static OVRPoseStatefnHeadPose(long struct)Unsafe version ofHeadPose().static intnStatusFlags(long struct)Unsafe version ofStatusFlags().intsizeof()intStatusFlags()Returns the value of theStatusFlagsfield.
-
-
-
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()
- Specified by:
sizeofin classorg.lwjgl.system.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.
-
createSafe
@Nullable public static OVRTrackingState createSafe(long address)
-
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
-
createSafe
@Nullable public static OVRTrackingState.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static OVRTrackingState callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
nHeadPose
public static OVRPoseStatef nHeadPose(long struct)
Unsafe version ofHeadPose().
-
nStatusFlags
public static int nStatusFlags(long struct)
Unsafe version ofStatusFlags().
-
nHandPoses
public static OVRPoseStatef.Buffer nHandPoses(long struct)
Unsafe version ofHandPoses().
-
nHandPoses
public static OVRPoseStatef nHandPoses(long struct, int index)
Unsafe version ofHandPoses.
-
nHandStatusFlags
public static java.nio.IntBuffer nHandStatusFlags(long struct)
Unsafe version ofHandStatusFlags().
-
nHandStatusFlags
public static int nHandStatusFlags(long struct, int index)Unsafe version ofHandStatusFlags.
-
nCalibratedOrigin
public static OVRPosef nCalibratedOrigin(long struct)
Unsafe version ofCalibratedOrigin().
-
-