HitResult
public final class HitResult
Defines an intersection between a ray and estimated real-world geometry.
Can be obtained from hitTest. If the ray intersects a Plane that is being subsumed, the subsuming Plane will be returned.
Summary
Public methods |
|
|---|---|
final @NonNull AnchorCreateResult |
Creates an |
boolean |
|
final float |
the distance from the camera to the hit location, in meters. |
final @NonNull Pose |
the |
final @NonNull Trackable<@NonNull Trackable.State> |
the |
int |
hashCode() |
Public methods
createAnchor
public final @NonNull AnchorCreateResult createAnchor()
Creates an Anchor that is attached to this trackable, using the given initial hitPose in the world coordinate space.
| Throws | |
|---|---|
kotlin.IllegalStateException |
if |
getDistance
public final float getDistance()
the distance from the camera to the hit location, in meters.
getHitPose
public final @NonNull Pose getHitPose()
the Pose of the intersection between a ray and the Trackable in the world coordinate space. If the hit Trackable is a Plane, the hitPose will be parallel to the Pose of the Plane.
getTrackable
public final @NonNull Trackable<@NonNull Trackable.State> getTrackable()
the Trackable that was hit.