Interaction

Added in 1.0.0-alpha04

public final class Interaction


Summary

Public methods

static final @NonNull List<@NonNull HitResult>
hitTest(@NonNull Session session, @NonNull Ray ray)

Performs a hit-test using the given ray.

Public methods

public static final @NonNull List<@NonNull HitResulthitTest(@NonNull Session session, @NonNull Ray ray)

Performs a hit-test using the given ray.

A hit-test is a method of calculating the intersection of a ray with objects tracked by the session. Conducting a hit-test results in a list of hit objects, in other words, a hit-test does not stop at the first object hit.

Returns
@NonNull List<@NonNull HitResult>

A list of HitResult objects, sorted by distance from the origin of the ray. The nearest hit is at the beginning of the list.

Throws
kotlin.IllegalStateException

if PlaneTrackingMode is set to Disabled.