Package org.lwjgl.openvr
Class TrackedDevicePose
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<TrackedDevicePose>
org.lwjgl.openvr.TrackedDevicePose
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class TrackedDevicePose
extends org.lwjgl.system.Struct<TrackedDevicePose>
implements org.lwjgl.system.NativeResource
Describes a single pose for a tracked object.
Layout
struct TrackedDevicePose_t {
HmdMatrix34_t mDeviceToAbsoluteTracking;
HmdVector3_t vVelocity();
HmdVector3_t vAngularVelocity();
ETrackingResult eTrackingResult();
bool bPoseIsValid;
bool bDeviceIsConnected();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionTrackedDevicePose(ByteBuffer container) Creates aTrackedDevicePoseinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis indicates that there is a device connected for this spot in the pose array.bDeviceIsConnected(boolean value) Sets the specified value to thebDeviceIsConnected()field.booleanbPoseIsValid(boolean value) Sets the specified value to thebPoseIsValidfield.static TrackedDevicePosecalloc()Returns a newTrackedDevicePoseinstance allocated withmemCalloc.static TrackedDevicePose.Buffercalloc(int capacity) Returns a newTrackedDevicePose.Bufferinstance allocated withmemCalloc.static TrackedDevicePose.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static TrackedDevicePosecalloc(org.lwjgl.system.MemoryStack stack) Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static TrackedDevicePoseDeprecated.static TrackedDevicePose.BuffercallocStack(int capacity) Deprecated.static TrackedDevicePose.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static TrackedDevicePosecallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static TrackedDevicePosecreate()Returns a newTrackedDevicePoseinstance allocated withBufferUtils.static TrackedDevicePose.Buffercreate(int capacity) Returns a newTrackedDevicePose.Bufferinstance allocated withBufferUtils.static TrackedDevicePosecreate(long address) Returns a newTrackedDevicePoseinstance for the specified memory address.static TrackedDevicePose.Buffercreate(long address, int capacity) Create aTrackedDevicePose.Bufferinstance at the specified memory.static @Nullable TrackedDevicePosecreateSafe(long address) static @Nullable TrackedDevicePose.BuffercreateSafe(long address, int capacity) intone of:VR.ETrackingResult_TrackingResult_UninitializedVR.ETrackingResult_TrackingResult_Calibrating_InProgressVR.ETrackingResult_TrackingResult_Calibrating_OutOfRangeVR.ETrackingResult_TrackingResult_Running_OKVR.ETrackingResult_TrackingResult_Running_OutOfRangeVR.ETrackingResult_TrackingResult_Fallback_RotationOnlyeTrackingResult(int value) Sets the specified value to theeTrackingResult()field.static TrackedDevicePosemalloc()Returns a newTrackedDevicePoseinstance allocated withmemAlloc.static TrackedDevicePose.Buffermalloc(int capacity) Returns a newTrackedDevicePose.Bufferinstance allocated withmemAlloc.static TrackedDevicePose.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStack.static TrackedDevicePosemalloc(org.lwjgl.system.MemoryStack stack) Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStack.static TrackedDevicePoseDeprecated.static TrackedDevicePose.BuffermallocStack(int capacity) Deprecated.static TrackedDevicePose.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static TrackedDevicePosemallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.mDeviceToAbsoluteTracking(Consumer<HmdMatrix34> consumer) Passes themDeviceToAbsoluteTrackingfield to the specifiedConsumer.Copies the specifiedHmdMatrix34to themDeviceToAbsoluteTrackingfield.static booleannbDeviceIsConnected(long struct) Unsafe version ofbDeviceIsConnected().static voidnbDeviceIsConnected(long struct, boolean value) Unsafe version ofbDeviceIsConnected.static booleannbPoseIsValid(long struct) Unsafe version ofbPoseIsValid().static voidnbPoseIsValid(long struct, boolean value) Unsafe version ofbPoseIsValid.static intneTrackingResult(long struct) Unsafe version ofeTrackingResult().static voidneTrackingResult(long struct, int value) Unsafe version ofeTrackingResult.static HmdMatrix34nmDeviceToAbsoluteTracking(long struct) Unsafe version ofmDeviceToAbsoluteTracking().static voidnmDeviceToAbsoluteTracking(long struct, HmdMatrix34 value) Unsafe version ofmDeviceToAbsoluteTracking.static HmdVector3nvAngularVelocity(long struct) Unsafe version ofvAngularVelocity().static voidnvAngularVelocity(long struct, HmdVector3 value) Unsafe version ofvAngularVelocity.static HmdVector3nvVelocity(long struct) Unsafe version ofvVelocity().static voidnvVelocity(long struct, HmdVector3 value) Unsafe version ofvVelocity.set(HmdMatrix34 mDeviceToAbsoluteTracking, HmdVector3 vVelocity, HmdVector3 vAngularVelocity, int eTrackingResult, boolean bPoseIsValid, boolean bDeviceIsConnected) Initializes this struct with the specified values.set(TrackedDevicePose src) Copies the specified struct data to this struct.intsizeof()angular velocity in radians/svAngularVelocity(Consumer<HmdVector3> consumer) Passes thevAngularVelocity()field to the specifiedConsumer.vAngularVelocity(HmdVector3 value) Copies the specifiedHmdVector3to thevAngularVelocity()field.velocity in tracker space in m/svVelocity(Consumer<HmdVector3> consumer) Passes thevVelocity()field to the specifiedConsumer.vVelocity(HmdVector3 value) Copies the specifiedHmdVector3to thevVelocity()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MDEVICETOABSOLUTETRACKING
public static final int MDEVICETOABSOLUTETRACKINGThe struct member offsets. -
VVELOCITY
public static final int VVELOCITYThe struct member offsets. -
VANGULARVELOCITY
public static final int VANGULARVELOCITYThe struct member offsets. -
ETRACKINGRESULT
public static final int ETRACKINGRESULTThe struct member offsets. -
BPOSEISVALID
public static final int BPOSEISVALIDThe struct member offsets. -
BDEVICEISCONNECTED
public static final int BDEVICEISCONNECTEDThe struct member offsets.
-
-
Constructor Details
-
TrackedDevicePose
Creates aTrackedDevicePoseinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<TrackedDevicePose>
-
mDeviceToAbsoluteTracking
- Returns:
- a
HmdMatrix34view of themDeviceToAbsoluteTrackingfield.
-
vVelocity
velocity in tracker space in m/s -
vAngularVelocity
angular velocity in radians/s -
eTrackingResult
public int eTrackingResult()one of: -
bPoseIsValid
public boolean bPoseIsValid()- Returns:
- the value of the
bPoseIsValidfield.
-
bDeviceIsConnected
public boolean bDeviceIsConnected()This indicates that there is a device connected for this spot in the pose array. It could go from true to false if the user unplugs the device. -
mDeviceToAbsoluteTracking
Copies the specifiedHmdMatrix34to themDeviceToAbsoluteTrackingfield. -
mDeviceToAbsoluteTracking
Passes themDeviceToAbsoluteTrackingfield to the specifiedConsumer. -
vVelocity
Copies the specifiedHmdVector3to thevVelocity()field. -
vVelocity
Passes thevVelocity()field to the specifiedConsumer. -
vAngularVelocity
Copies the specifiedHmdVector3to thevAngularVelocity()field. -
vAngularVelocity
Passes thevAngularVelocity()field to the specifiedConsumer. -
eTrackingResult
Sets the specified value to theeTrackingResult()field. -
bPoseIsValid
Sets the specified value to thebPoseIsValidfield. -
bDeviceIsConnected
Sets the specified value to thebDeviceIsConnected()field. -
set
public TrackedDevicePose set(HmdMatrix34 mDeviceToAbsoluteTracking, HmdVector3 vVelocity, HmdVector3 vAngularVelocity, int eTrackingResult, boolean bPoseIsValid, boolean bDeviceIsConnected) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newTrackedDevicePoseinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newTrackedDevicePoseinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newTrackedDevicePoseinstance allocated withBufferUtils. -
create
Returns a newTrackedDevicePoseinstance for the specified memory address. -
createSafe
-
malloc
Returns a newTrackedDevicePose.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newTrackedDevicePose.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newTrackedDevicePose.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aTrackedDevicePose.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static TrackedDevicePose.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 TrackedDevicePose.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nmDeviceToAbsoluteTracking
Unsafe version ofmDeviceToAbsoluteTracking(). -
nvVelocity
Unsafe version ofvVelocity(). -
nvAngularVelocity
Unsafe version ofvAngularVelocity(). -
neTrackingResult
public static int neTrackingResult(long struct) Unsafe version ofeTrackingResult(). -
nbPoseIsValid
public static boolean nbPoseIsValid(long struct) Unsafe version ofbPoseIsValid(). -
nbDeviceIsConnected
public static boolean nbDeviceIsConnected(long struct) Unsafe version ofbDeviceIsConnected(). -
nmDeviceToAbsoluteTracking
Unsafe version ofmDeviceToAbsoluteTracking. -
nvVelocity
Unsafe version ofvVelocity. -
nvAngularVelocity
Unsafe version ofvAngularVelocity. -
neTrackingResult
public static void neTrackingResult(long struct, int value) Unsafe version ofeTrackingResult. -
nbPoseIsValid
public static void nbPoseIsValid(long struct, boolean value) Unsafe version ofbPoseIsValid. -
nbDeviceIsConnected
public static void nbDeviceIsConnected(long struct, boolean value) Unsafe version ofbDeviceIsConnected.
-