public final class OpenXrAnchor implements ExportableAnchor


Wraps the native XrSpace with the Anchor interface.

Summary

Public methods

void

Detaches this anchor from its Trackable.

@NonNull IBinder
long
@NonNull Anchor.PersistenceState

The PersistenceState for this anchor.

@NonNull Pose

The location of the anchor in the world coordinate space.

@NonNull TrackingState

The current state of the pose of this anchor.

UUID

The UUID that identifies this Anchor if it is persisted.

void

Sends a request to persist this anchor.

void
update(long xrTime)

Updates the entity retrieving its state at xrTime.

Public methods

detach

Added in 1.0.0-alpha01
public void detach()

Detaches this anchor from its Trackable. After detaching, the anchor will not be updated anymore and cannot be reattached to another trackable.

getAnchorToken

Added in 1.0.0-alpha01
public @NonNull IBinder getAnchorToken()

getNativePointer

Added in 1.0.0-alpha01
public long getNativePointer()

getPersistenceState

Added in 1.0.0-alpha01
public @NonNull Anchor.PersistenceState getPersistenceState()

The PersistenceState for this anchor.

getPose

Added in 1.0.0-alpha01
public @NonNull Pose getPose()

The location of the anchor in the world coordinate space.

getTrackingState

Added in 1.0.0-alpha01
public @NonNull TrackingState getTrackingState()

The current state of the pose of this anchor.

getUuid

Added in 1.0.0-alpha01
public UUID getUuid()

The UUID that identifies this Anchor if it is persisted.

persist

Added in 1.0.0-alpha01
public void persist()

Sends a request to persist this anchor. The value of persistenceState will be updated based on the progress of this operation. The value of uuid will be set if the operation is successful.

update

Added in 1.0.0-alpha01
public void update(long xrTime)

Updates the entity retrieving its state at xrTime.

Parameters
long xrTime

the number of nanoseconds since the start of the OpenXR epoch.