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.NativeResource
Tracking 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
–HeadPose
tracking 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 withovrInputState
for complete hand controller information.HandStatusFlags[2]
–HandPoses
status 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
, orSpecifyTrackingOrigin
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 callsRecenterTrackingOrigin
orSpecifyTrackingOrigin
, 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
HandPoses[2]; unsigned int HandStatusFlags[2];ovrPosef
CalibratedOrigin; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OVRTrackingState.Buffer
An array ofOVRTrackingState
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CALIBRATEDORIGIN
HANDPOSES
HANDSTATUSFLAGS
HEADPOSEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STATUSFLAGS
The struct member offsets.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRTrackingState
callocStack(org.lwjgl.system.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.static OVRTrackingState.Buffer
create(long address, int capacity)
Create aOVRTrackingState.Buffer
instance at the specified memory.static OVRTrackingState
createSafe(long address)
static OVRTrackingState.Buffer
createSafe(long address, int capacity)
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, org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingState.Buffer
instance allocated on the specifiedMemoryStack
.static OVRTrackingState
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
.static OVRPosef
nCalibratedOrigin(long struct)
Unsafe version ofCalibratedOrigin()
.static OVRPoseStatef.Buffer
nHandPoses(long struct)
Unsafe version ofHandPoses()
.static OVRPoseStatef
nHandPoses(long struct, int index)
Unsafe version ofHandPoses
.static java.nio.IntBuffer
nHandStatusFlags(long struct)
Unsafe version ofHandStatusFlags()
.static int
nHandStatusFlags(long struct, int index)
Unsafe version ofHandStatusFlags
.static OVRPoseStatef
nHeadPose(long struct)
Unsafe version ofHeadPose()
.static int
nStatusFlags(long struct)
Unsafe version ofStatusFlags()
.int
sizeof()
int
StatusFlags()
Returns the value of theStatusFlags
field.
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.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.
-
createSafe
@Nullable public static OVRTrackingState createSafe(long address)
-
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
-
createSafe
@Nullable public static OVRTrackingState.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingState
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static OVRTrackingState callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
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()
.
-
-