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
–HeadPose
tracking 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 withovrInputState
for complete hand controller information.HandStatusFlags
–HandPoses
status flags described byovrStatusBits
. OnlyOVR.ovrStatus_OrientationTracked
andOVR.ovrStatus_PositionTracked
are 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 onovrTrackingOrigin
requested when callingGetTrackingState
.
Layout
struct ovrTrackingState {
ovrPoseStatef
HeadPose; unsigned int StatusFlags;ovrPoseStatef
[2] HandPoses; unsigned int[2] HandStatusFlags;ovrPosef
CalibratedOrigin; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
OVRTrackingState.Buffer
An array ofOVRTrackingState
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aOVRTrackingState
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description OVRPosef
CalibratedOrigin()
Returns aOVRPosef
view of theCalibratedOrigin
field.static OVRTrackingState
calloc()
Returns a newOVRTrackingState
instance allocated withmemCalloc
.static OVRTrackingState.Buffer
calloc(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withmemCalloc
.static OVRTrackingState
callocStack()
Returns a newOVRTrackingState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRTrackingState.Buffer
callocStack(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static OVRTrackingState.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newOVRTrackingState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRTrackingState
callocStack(MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRTrackingState
create()
Returns a newOVRTrackingState
instance allocated withBufferUtils
.static OVRTrackingState.Buffer
create(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withBufferUtils
.static OVRTrackingState
create(long address)
Returns a newOVRTrackingState
instance for the specified memory address ornull
if the address isNULL
.static OVRTrackingState.Buffer
create(long address, int capacity)
Create aOVRTrackingState.Buffer
instance at the specified memory.OVRPoseStatef.Buffer
HandPoses()
Returns aOVRPoseStatef
.Buffer view of theHandPoses
field.OVRPoseStatef
HandPoses(int index)
Returns aOVRPoseStatef
view of the struct at the specified index of theHandPoses
field.java.nio.IntBuffer
HandStatusFlags()
Returns aIntBuffer
view of theHandStatusFlags
field.int
HandStatusFlags(int index)
Returns the value at the specified index of theHandStatusFlags
field.OVRPoseStatef
HeadPose()
Returns aOVRPoseStatef
view of theHeadPose
field.static OVRTrackingState
malloc()
Returns a newOVRTrackingState
instance allocated withmemAlloc
.static OVRTrackingState.Buffer
malloc(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withmemAlloc
.static OVRTrackingState
mallocStack()
Returns a newOVRTrackingState
instance allocated on the thread-localMemoryStack
.static OVRTrackingState.Buffer
mallocStack(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated on the thread-localMemoryStack
.static OVRTrackingState.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newOVRTrackingState.Buffer
instance allocated on the specifiedMemoryStack
.static OVRTrackingState
mallocStack(MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
.int
sizeof()
Returns thesizeof(struct)
.int
StatusFlags()
Returns the value of theStatusFlags
field.-
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 aOVRTrackingState
instance at the current position of the specifiedByteBuffer
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 thesizeof(struct)
.
-
HeadPose
public OVRPoseStatef HeadPose()
Returns aOVRPoseStatef
view of theHeadPose
field.
-
StatusFlags
public int StatusFlags()
Returns the value of theStatusFlags
field.
-
HandPoses
public OVRPoseStatef.Buffer HandPoses()
Returns aOVRPoseStatef
.Buffer view of theHandPoses
field.
-
HandPoses
public OVRPoseStatef HandPoses(int index)
Returns aOVRPoseStatef
view of the struct at the specified index of theHandPoses
field.
-
HandStatusFlags
public java.nio.IntBuffer HandStatusFlags()
Returns aIntBuffer
view of theHandStatusFlags
field.
-
HandStatusFlags
public int HandStatusFlags(int index)
Returns the value at the specified index of theHandStatusFlags
field.
-
CalibratedOrigin
public OVRPosef CalibratedOrigin()
Returns aOVRPosef
view of theCalibratedOrigin
field.
-
malloc
public static OVRTrackingState malloc()
Returns a newOVRTrackingState
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OVRTrackingState calloc()
Returns a newOVRTrackingState
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OVRTrackingState create()
Returns a newOVRTrackingState
instance allocated withBufferUtils
.
-
create
public static OVRTrackingState create(long address)
Returns a newOVRTrackingState
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static OVRTrackingState.Buffer malloc(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OVRTrackingState.Buffer calloc(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRTrackingState.Buffer create(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OVRTrackingState.Buffer create(long address, int capacity)
Create aOVRTrackingState.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static OVRTrackingState mallocStack()
Returns a newOVRTrackingState
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static OVRTrackingState callocStack()
Returns a newOVRTrackingState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static OVRTrackingState mallocStack(MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRTrackingState callocStack(MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static OVRTrackingState.Buffer callocStack(int capacity)
Returns a newOVRTrackingState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static OVRTrackingState.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newOVRTrackingState.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-