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.Layout
struct ovrTrackingState {ovrPoseStatefHeadPose(); unsigned intStatusFlags();ovrPoseStatefHandPoses()[2]; unsigned intHandStatusFlags()[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 Deprecated Methods Modifier and Type Method Description OVRPosefCalibratedOrigin()the pose of the origin captured during calibration.static OVRTrackingStatecalloc()Returns a newOVRTrackingStateinstance allocated withmemCalloc.static OVRTrackingState.Buffercalloc(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated withmemCalloc.static OVRTrackingState.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTrackingStatecalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OVRTrackingStatecallocStack()Deprecated.static OVRTrackingState.BuffercallocStack(int capacity)Deprecated.static OVRTrackingState.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRTrackingStatecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()The most recent calculated pose for each hand when hand controller tracking is present.OVRPoseStatefHandPoses(int index)The most recent calculated pose for each hand when hand controller tracking is present.java.nio.IntBufferHandStatusFlags()HandPosesstatus flags described byovrStatusBits.intHandStatusFlags(int index)HandPosesstatus flags described byovrStatusBits.OVRPoseStatefHeadPose()Predicted head pose (and derivatives) at the requested absolute time.static OVRTrackingStatemalloc()Returns a newOVRTrackingStateinstance allocated withmemAlloc.static OVRTrackingState.Buffermalloc(int capacity)Returns a newOVRTrackingState.Bufferinstance allocated withmemAlloc.static OVRTrackingState.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingState.Bufferinstance allocated on the specifiedMemoryStack.static OVRTrackingStatemalloc(org.lwjgl.system.MemoryStack stack)Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.static OVRTrackingStatemallocStack()Deprecated.static OVRTrackingState.BuffermallocStack(int capacity)Deprecated.static OVRTrackingState.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static OVRTrackingStatemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()HeadPosetracking status described byovrStatusBits.
-
-
-
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()
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()
HeadPosetracking status described byovrStatusBits.
-
HandPoses
public OVRPoseStatef.Buffer 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 andHandPoses[ovrHand_Right]to the right hand. These values can be combined withovrInputStatefor complete hand controller information.
-
HandStatusFlags
public java.nio.IntBuffer HandStatusFlags() public int HandStatusFlags(int index)
HandPosesstatus flags described byovrStatusBits.
-
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, 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.
-
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
@Deprecated public static OVRTrackingState mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRTrackingState callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRTrackingState mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static OVRTrackingState callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static OVRTrackingState.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static OVRTrackingState.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(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. Usemalloc(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. Usecalloc(int, MemoryStack)instead.
-
malloc
public static OVRTrackingState malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOVRTrackingStateinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OVRTrackingState calloc(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
-
malloc
public static OVRTrackingState.Buffer malloc(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
-
calloc
public static OVRTrackingState.Buffer calloc(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().
-
-