OpenXrPerceptionManager


public final class OpenXrPerceptionManager


Implementation of the perception capabilities of a runtime using OpenXR.

Summary

Public methods

@NonNull Anchor

Defines a tracked location in the physical world.

@NonNull List<@NonNull UUID>

Retrieves all the UUID instances from Anchor objects that have been persisted.

@NonNull Collection<@NonNull Trackable>

Returns the list of all known trackables.

@NonNull List<@NonNull HitResult>

Performs a ray cast in the direction of the given ray in the latest camera view.

@NonNull Anchor

Loads an Anchor from local storage.

@NonNull Anchor
loadAnchorFromNativePointer(long nativePointer)

Loads an Anchor from a native pointer.

void

Deletes a persisted Anchor from local storage.

final void
update(long xrTime)

Updates the perception manager.

Public methods

createAnchor

Added in 1.0.0-alpha01
public @NonNull Anchor createAnchor(@NonNull Pose pose)

Defines a tracked location in the physical world.

getPersistedAnchorUuids

Added in 1.0.0-alpha01
public @NonNull List<@NonNull UUIDgetPersistedAnchorUuids()

Retrieves all the UUID instances from Anchor objects that have been persisted.

getTrackables

Added in 1.0.0-alpha01
public @NonNull Collection<@NonNull TrackablegetTrackables()

Returns the list of all known trackables.

hitTest

Added in 1.0.0-alpha01
public @NonNull List<@NonNull HitResulthitTest(@NonNull Ray ray)

Performs a ray cast in the direction of the given ray in the latest camera view.

loadAnchor

Added in 1.0.0-alpha01
public @NonNull Anchor loadAnchor(@NonNull UUID uuid)

Loads an Anchor from local storage.

loadAnchorFromNativePointer

Added in 1.0.0-alpha01
public @NonNull Anchor loadAnchorFromNativePointer(long nativePointer)

Loads an Anchor from a native pointer.

unpersistAnchor

Added in 1.0.0-alpha01
public void unpersistAnchor(@NonNull UUID uuid)

Deletes a persisted Anchor from local storage.

update

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

Updates the perception manager.

Parameters
long xrTime

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