Package org.lwjgl.openvr
Class TrackedDevicePose
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.TrackedDevicePose
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class TrackedDevicePose extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes a single pose for a tracked object.Layout
struct TrackedDevicePose_t {HmdMatrix34_tmDeviceToAbsoluteTracking;HmdVector3_tvVelocity();HmdVector3_tvAngularVelocity(); ETrackingResulteTrackingResult(); bool bPoseIsValid; boolbDeviceIsConnected(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTrackedDevicePose.BufferAn array ofTrackedDevicePosestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBDEVICEISCONNECTED
BPOSEISVALID
ETRACKINGRESULT
MDEVICETOABSOLUTETRACKINGThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVANGULARVELOCITY
VVELOCITYThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description TrackedDevicePose(java.nio.ByteBuffer container)Creates aTrackedDevicePoseinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanbDeviceIsConnected()This indicates that there is a device connected for this spot in the pose array.TrackedDevicePosebDeviceIsConnected(boolean value)Sets the specified value to thebDeviceIsConnected()field.booleanbPoseIsValid()TrackedDevicePosebPoseIsValid(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 TrackedDevicePosecallocStack()Deprecated.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 TrackedDevicePosecreateSafe(long address)static TrackedDevicePose.BuffercreateSafe(long address, int capacity)inteTrackingResult()one of:VR.ETrackingResult_TrackingResult_UninitializedVR.ETrackingResult_TrackingResult_Calibrating_InProgressVR.ETrackingResult_TrackingResult_Calibrating_OutOfRangeVR.ETrackingResult_TrackingResult_Running_OKVR.ETrackingResult_TrackingResult_Running_OutOfRangeVR.ETrackingResult_TrackingResult_Fallback_RotationOnlyTrackedDevicePoseeTrackingResult(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 TrackedDevicePosemallocStack()Deprecated.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.HmdMatrix34mDeviceToAbsoluteTracking()TrackedDevicePosemDeviceToAbsoluteTracking(java.util.function.Consumer<HmdMatrix34> consumer)Passes themDeviceToAbsoluteTrackingfield to the specifiedConsumer.TrackedDevicePosemDeviceToAbsoluteTracking(HmdMatrix34 value)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.TrackedDevicePoseset(HmdMatrix34 mDeviceToAbsoluteTracking, HmdVector3 vVelocity, HmdVector3 vAngularVelocity, int eTrackingResult, boolean bPoseIsValid, boolean bDeviceIsConnected)Initializes this struct with the specified values.TrackedDevicePoseset(TrackedDevicePose src)Copies the specified struct data to this struct.intsizeof()HmdVector3vAngularVelocity()angular velocity in radians/sTrackedDevicePosevAngularVelocity(java.util.function.Consumer<HmdVector3> consumer)Passes thevAngularVelocity()field to the specifiedConsumer.TrackedDevicePosevAngularVelocity(HmdVector3 value)Copies the specifiedHmdVector3to thevAngularVelocity()field.HmdVector3vVelocity()velocity in tracker space in m/sTrackedDevicePosevVelocity(java.util.function.Consumer<HmdVector3> consumer)Passes thevVelocity()field to the specifiedConsumer.TrackedDevicePosevVelocity(HmdVector3 value)Copies the specifiedHmdVector3to thevVelocity()field.
-
-
-
Constructor Detail
-
TrackedDevicePose
public TrackedDevicePose(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
mDeviceToAbsoluteTracking
public HmdMatrix34 mDeviceToAbsoluteTracking()
- Returns:
- a
HmdMatrix34view of themDeviceToAbsoluteTrackingfield.
-
vVelocity
public HmdVector3 vVelocity()
velocity in tracker space in m/s
-
vAngularVelocity
public HmdVector3 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
public TrackedDevicePose mDeviceToAbsoluteTracking(HmdMatrix34 value)
Copies the specifiedHmdMatrix34to themDeviceToAbsoluteTrackingfield.
-
mDeviceToAbsoluteTracking
public TrackedDevicePose mDeviceToAbsoluteTracking(java.util.function.Consumer<HmdMatrix34> consumer)
Passes themDeviceToAbsoluteTrackingfield to the specifiedConsumer.
-
vVelocity
public TrackedDevicePose vVelocity(HmdVector3 value)
Copies the specifiedHmdVector3to thevVelocity()field.
-
vVelocity
public TrackedDevicePose vVelocity(java.util.function.Consumer<HmdVector3> consumer)
Passes thevVelocity()field to the specifiedConsumer.
-
vAngularVelocity
public TrackedDevicePose vAngularVelocity(HmdVector3 value)
Copies the specifiedHmdVector3to thevAngularVelocity()field.
-
vAngularVelocity
public TrackedDevicePose vAngularVelocity(java.util.function.Consumer<HmdVector3> consumer)
Passes thevAngularVelocity()field to the specifiedConsumer.
-
eTrackingResult
public TrackedDevicePose eTrackingResult(int value)
Sets the specified value to theeTrackingResult()field.
-
bPoseIsValid
public TrackedDevicePose bPoseIsValid(boolean value)
Sets the specified value to thebPoseIsValidfield.
-
bDeviceIsConnected
public TrackedDevicePose bDeviceIsConnected(boolean value)
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
public TrackedDevicePose set(TrackedDevicePose src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static TrackedDevicePose malloc()
Returns a newTrackedDevicePoseinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static TrackedDevicePose calloc()
Returns a newTrackedDevicePoseinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static TrackedDevicePose create()
Returns a newTrackedDevicePoseinstance allocated withBufferUtils.
-
create
public static TrackedDevicePose create(long address)
Returns a newTrackedDevicePoseinstance for the specified memory address.
-
createSafe
@Nullable public static TrackedDevicePose createSafe(long address)
-
malloc
public static TrackedDevicePose.Buffer malloc(int capacity)
Returns a newTrackedDevicePose.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static TrackedDevicePose.Buffer calloc(int capacity)
Returns a newTrackedDevicePose.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static TrackedDevicePose.Buffer create(int capacity)
Returns a newTrackedDevicePose.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static TrackedDevicePose.Buffer create(long address, int capacity)
Create aTrackedDevicePose.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static TrackedDevicePose.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static TrackedDevicePose mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static TrackedDevicePose callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static TrackedDevicePose mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static TrackedDevicePose callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static TrackedDevicePose.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static TrackedDevicePose.Buffer callocStack(int capacity)
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
public static TrackedDevicePose malloc(org.lwjgl.system.MemoryStack stack)
Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static TrackedDevicePose calloc(org.lwjgl.system.MemoryStack stack)
Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static TrackedDevicePose.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static TrackedDevicePose.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmDeviceToAbsoluteTracking
public static HmdMatrix34 nmDeviceToAbsoluteTracking(long struct)
Unsafe version ofmDeviceToAbsoluteTracking().
-
nvVelocity
public static HmdVector3 nvVelocity(long struct)
Unsafe version ofvVelocity().
-
nvAngularVelocity
public static HmdVector3 nvAngularVelocity(long struct)
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
public static void nmDeviceToAbsoluteTracking(long struct, HmdMatrix34 value)Unsafe version ofmDeviceToAbsoluteTracking.
-
nvVelocity
public static void nvVelocity(long struct, HmdVector3 value)Unsafe version ofvVelocity.
-
nvAngularVelocity
public static void nvAngularVelocity(long struct, HmdVector3 value)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.
-
-