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.Member documentation
vVelocity– velocity in tracker space in m/svAngularVelocity– angular velocity in radians/seTrackingResult– one of: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.
Layout
struct TrackedDevicePose_t {HmdMatrix34_tmDeviceToAbsoluteTracking;HmdVector3_tvVelocity;HmdVector3_tvAngularVelocity; ETrackingResult eTrackingResult; bool bPoseIsValid; bool bDeviceIsConnected; }
-
-
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 Modifier and Type Method Description booleanbDeviceIsConnected()Returns the value of thebDeviceIsConnectedfield.TrackedDevicePosebDeviceIsConnected(boolean value)Sets the specified value to thebDeviceIsConnectedfield.booleanbPoseIsValid()Returns the value of thebPoseIsValidfield.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 TrackedDevicePosecallocStack()Returns a newTrackedDevicePoseinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static TrackedDevicePose.BuffercallocStack(int capacity)Returns a newTrackedDevicePose.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static TrackedDevicePose.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static TrackedDevicePosecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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()Returns the value of theeTrackingResultfield.TrackedDevicePoseeTrackingResult(int value)Sets the specified value to theeTrackingResultfield.static TrackedDevicePosemalloc()Returns a newTrackedDevicePoseinstance allocated withmemAlloc.static TrackedDevicePose.Buffermalloc(int capacity)Returns a newTrackedDevicePose.Bufferinstance allocated withmemAlloc.static TrackedDevicePosemallocStack()Returns a newTrackedDevicePoseinstance allocated on the thread-localMemoryStack.static TrackedDevicePose.BuffermallocStack(int capacity)Returns a newTrackedDevicePose.Bufferinstance allocated on the thread-localMemoryStack.static TrackedDevicePose.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newTrackedDevicePose.Bufferinstance allocated on the specifiedMemoryStack.static TrackedDevicePosemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStack.HmdMatrix34mDeviceToAbsoluteTracking()Returns aHmdMatrix34view of themDeviceToAbsoluteTrackingfield.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()Returns aHmdVector3view of thevAngularVelocityfield.TrackedDevicePosevAngularVelocity(java.util.function.Consumer<HmdVector3> consumer)Passes thevAngularVelocityfield to the specifiedConsumer.TrackedDevicePosevAngularVelocity(HmdVector3 value)Copies the specifiedHmdVector3to thevAngularVelocityfield.HmdVector3vVelocity()Returns aHmdVector3view of thevVelocityfield.TrackedDevicePosevVelocity(java.util.function.Consumer<HmdVector3> consumer)Passes thevVelocityfield to the specifiedConsumer.TrackedDevicePosevVelocity(HmdVector3 value)Copies the specifiedHmdVector3to thevVelocityfield.
-
-
-
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 aHmdMatrix34view of themDeviceToAbsoluteTrackingfield.
-
vVelocity
public HmdVector3 vVelocity()
Returns aHmdVector3view of thevVelocityfield.
-
vAngularVelocity
public HmdVector3 vAngularVelocity()
Returns aHmdVector3view of thevAngularVelocityfield.
-
eTrackingResult
public int eTrackingResult()
Returns the value of theeTrackingResultfield.
-
bPoseIsValid
public boolean bPoseIsValid()
Returns the value of thebPoseIsValidfield.
-
bDeviceIsConnected
public boolean bDeviceIsConnected()
Returns the value of thebDeviceIsConnectedfield.
-
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 thevVelocityfield.
-
vVelocity
public TrackedDevicePose vVelocity(java.util.function.Consumer<HmdVector3> consumer)
Passes thevVelocityfield to the specifiedConsumer.
-
vAngularVelocity
public TrackedDevicePose vAngularVelocity(HmdVector3 value)
Copies the specifiedHmdVector3to thevAngularVelocityfield.
-
vAngularVelocity
public TrackedDevicePose vAngularVelocity(java.util.function.Consumer<HmdVector3> consumer)
Passes thevAngularVelocityfield to the specifiedConsumer.
-
eTrackingResult
public TrackedDevicePose eTrackingResult(int value)
Sets the specified value to theeTrackingResultfield.
-
bPoseIsValid
public TrackedDevicePose bPoseIsValid(boolean value)
Sets the specified value to thebPoseIsValidfield.
-
bDeviceIsConnected
public TrackedDevicePose bDeviceIsConnected(boolean value)
Sets the specified value to thebDeviceIsConnectedfield.
-
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
public static TrackedDevicePose mallocStack()
Returns a newTrackedDevicePoseinstance allocated on the thread-localMemoryStack.
-
callocStack
public static TrackedDevicePose callocStack()
Returns a newTrackedDevicePoseinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static TrackedDevicePose mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newTrackedDevicePoseinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static TrackedDevicePose callocStack(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
-
mallocStack
public static TrackedDevicePose.Buffer mallocStack(int capacity)
Returns a newTrackedDevicePose.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static TrackedDevicePose.Buffer callocStack(int capacity)
Returns a newTrackedDevicePose.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static TrackedDevicePose.Buffer mallocStack(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
-
callocStack
public static TrackedDevicePose.Buffer callocStack(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.
-
-