Top Constructors Methods
org.lwjgl.openvr

public Class VRSpatialAnchors

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nVRSpatialAnchors_CreateSpatialAnchorFromDescriptor(long pchDescriptor, long pHandleOut)

Unsafe version of: CreateSpatialAnchorFromDescriptor

public static int
nVRSpatialAnchors_CreateSpatialAnchorFromPose(int unDeviceIndex, int eOrigin, long pPose, long pHandleOut)

Unsafe version of: CreateSpatialAnchorFromPose

public static int
nVRSpatialAnchors_GetSpatialAnchorDescriptor(int unHandle, long pchDescriptorOut, long punDescriptorBufferLenInOut)

Unsafe version of: GetSpatialAnchorDescriptor

public static int
nVRSpatialAnchors_GetSpatialAnchorPose(int unHandle, int eOrigin, long pPoseOut)

Unsafe version of: GetSpatialAnchorPose

public static int
VRSpatialAnchors_CreateSpatialAnchorFromDescriptor(ByteBuffer pchDescriptor, IntBuffer pHandleOut)

Returns a handle for an spatial anchor described by "descriptor".

public static int
VRSpatialAnchors_CreateSpatialAnchorFromDescriptor(CharSequence pchDescriptor, IntBuffer pHandleOut)

Returns a handle for an spatial anchor described by "descriptor".

public static int
VRSpatialAnchors_CreateSpatialAnchorFromPose(int unDeviceIndex, int eOrigin, SpatialAnchorPose pPose, IntBuffer pHandleOut)

Returns a handle for an new spatial anchor at pPose.

public static int

Returns:

true if the descriptor fits into the buffer, else false. Buffer size should be at least k_unMaxSpatialAnchorDescriptorSize
VRSpatialAnchors_GetSpatialAnchorDescriptor
(int unHandle, ByteBuffer pchDescriptorOut, IntBuffer punDescriptorBufferLenInOut)

Get the descriptor for a given handle.

public static int
VRSpatialAnchors_GetSpatialAnchorPose(int unHandle, int eOrigin, SpatialAnchorPose pPoseOut)

Get the pose for a given handle.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

VRSpatialAnchorsback to summary
protected VRSpatialAnchors()

Method Detail

nVRSpatialAnchors_CreateSpatialAnchorFromDescriptorback to summary
public static int nVRSpatialAnchors_CreateSpatialAnchorFromDescriptor(long pchDescriptor, long pHandleOut)

Unsafe version of: CreateSpatialAnchorFromDescriptor

nVRSpatialAnchors_CreateSpatialAnchorFromPoseback to summary
public static int nVRSpatialAnchors_CreateSpatialAnchorFromPose(int unDeviceIndex, int eOrigin, long pPose, long pHandleOut)

Unsafe version of: CreateSpatialAnchorFromPose

nVRSpatialAnchors_GetSpatialAnchorDescriptorback to summary
public static int nVRSpatialAnchors_GetSpatialAnchorDescriptor(int unHandle, long pchDescriptorOut, long punDescriptorBufferLenInOut)

Unsafe version of: GetSpatialAnchorDescriptor

nVRSpatialAnchors_GetSpatialAnchorPoseback to summary
public static int nVRSpatialAnchors_GetSpatialAnchorPose(int unHandle, int eOrigin, long pPoseOut)

Unsafe version of: GetSpatialAnchorPose

VRSpatialAnchors_CreateSpatialAnchorFromDescriptorback to summary
public static int VRSpatialAnchors_CreateSpatialAnchorFromDescriptor(ByteBuffer pchDescriptor, IntBuffer pHandleOut)

Returns a handle for an spatial anchor described by "descriptor". On success, pHandle will contain a handle valid for this session. Caller can wait for an event or occasionally poll GetSpatialAnchorPose to find the virtual coordinate associated with this anchor.

Annotations
@NativeType:EVRSpatialAnchorError
VRSpatialAnchors_CreateSpatialAnchorFromDescriptorback to summary
public static int VRSpatialAnchors_CreateSpatialAnchorFromDescriptor(CharSequence pchDescriptor, IntBuffer pHandleOut)

Returns a handle for an spatial anchor described by "descriptor". On success, pHandle will contain a handle valid for this session. Caller can wait for an event or occasionally poll GetSpatialAnchorPose to find the virtual coordinate associated with this anchor.

Annotations
@NativeType:EVRSpatialAnchorError
VRSpatialAnchors_CreateSpatialAnchorFromPoseback to summary
public static int VRSpatialAnchors_CreateSpatialAnchorFromPose(int unDeviceIndex, int eOrigin, SpatialAnchorPose pPose, IntBuffer pHandleOut)

Returns a handle for an new spatial anchor at pPose.

On success, pHandle will contain a handle valid for this session. Caller can wait for an event or occasionally poll GetSpatialAnchorDescriptor to find the permanent descriptor for this pose. The result of GetSpatialAnchorPose may evolve from this initial position if the driver chooses to update it. The anchor will be associated with the driver that provides unDeviceIndex, and the driver may use that specific device as a hint for how to best create the anchor. The eOrigin must match whatever tracking origin you are working in (seated/standing/raw).

This should be called when the user is close to (and ideally looking at/interacting with) the target physical location. At that moment, the driver will have the most information about how to recover that physical point in the future, and the quality of the anchor (when the descriptor is re-used) will be highest. The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the original pose location for highest fidelity.

Annotations
@NativeType:EVRSpatialAnchorError
VRSpatialAnchors_GetSpatialAnchorDescriptorback to summary
public static int VRSpatialAnchors_GetSpatialAnchorDescriptor(int unHandle, ByteBuffer pchDescriptorOut, IntBuffer punDescriptorBufferLenInOut)

Get the descriptor for a given handle.

This will be empty for handles where the driver has not yet built a descriptor. It will be the application-supplied descriptor for previously saved anchors that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor() already in this session, it will be the descriptor provided by the driver.

Returns:int

true if the descriptor fits into the buffer, else false. Buffer size should be at least k_unMaxSpatialAnchorDescriptorSize

Annotations
@NativeType:EVRSpatialAnchorError
VRSpatialAnchors_GetSpatialAnchorPoseback to summary
public static int VRSpatialAnchors_GetSpatialAnchorPose(int unHandle, int eOrigin, SpatialAnchorPose pPoseOut)

Get the pose for a given handle.

This is intended to be cheap enough to call every frame (or fairly often) so that the driver can refine this position when it has more information available.

Annotations
@NativeType:EVRSpatialAnchorError