GuavaScenePose

Added in 1.0.0-alpha05

public final class GuavaScenePose


Summary

Public methods

static final @NonNull ListenableFuture<@NonNull HitTestResult>
hitTestAsync(
    @NonNull ScenePose receiver,
    @NonNull Session session,
    @NonNull Vector3 origin,
    @NonNull Vector3 direction
)

Creates a HitTestResult from the specified origin in the specified direction into the scene.

static final @NonNull ListenableFuture<@NonNull HitTestResult>
hitTestAsync(
    @NonNull ScenePose receiver,
    @NonNull Session session,
    @NonNull Vector3 origin,
    @NonNull Vector3 direction,
    int hitTestFilter
)

Creates a HitTestResult from the specified origin in the specified direction into the scene.

Public methods

public static final @NonNull ListenableFuture<@NonNull HitTestResulthitTestAsync(
    @NonNull ScenePose receiver,
    @NonNull Session session,
    @NonNull Vector3 origin,
    @NonNull Vector3 direction
)

Creates a HitTestResult from the specified origin in the specified direction into the scene.

Parameters
@NonNull Session session

The session the ScenePose is in.

@NonNull Vector3 origin

The translation of the origin of the hit test relative to this ScenePose.

@NonNull Vector3 direction

The direction for the hit test ray from the origin.

Returns
@NonNull ListenableFuture<@NonNull HitTestResult>

a ListenableFuture. The HitResult describes if it hit something and where relative to this ScenePose. Listeners will be called on the main thread if Runnable::run is supplied.

public static final @NonNull ListenableFuture<@NonNull HitTestResulthitTestAsync(
    @NonNull ScenePose receiver,
    @NonNull Session session,
    @NonNull Vector3 origin,
    @NonNull Vector3 direction,
    int hitTestFilter
)

Creates a HitTestResult from the specified origin in the specified direction into the scene.

Parameters
@NonNull Session session

The session the ScenePose is in.

@NonNull Vector3 origin

The translation of the origin of the hit test relative to this ScenePose.

@NonNull Vector3 direction

The direction for the hit test ray from the origin

int hitTestFilter

Filter for which scenes to hit test. Hitting other scenes is only allowed for apps with the com.android.extensions.xr.ACCESS_XR_OVERLAY_SPACE permission.

Returns
@NonNull ListenableFuture<@NonNull HitTestResult>

a ListenableFuture. The HitResult describes if it hit something and where relative to this ScenePose. Listeners will be called on the main thread if Runnable::run is supplied.