HitResult


public final class HitResult


Defines an intersection between a ray and estimated real-world geometry.

Can be obtained from Interaction.hitTest.

Summary

Public methods

final @NonNull AnchorCreateResult

Creates an Anchor that is attached to this trackable, using the given initial hitPose in the world coordinate space.

boolean
equals(Object other)
final float

the distance from the camera to the hit location, in meters.

final @NonNull Pose

the Pose of the intersection between a ray and the Trackable.

final @NonNull Trackable<@NonNull Trackable.State>

the Trackable that was hit.

int

Public methods

createAnchor

Added in 1.0.0-alpha04
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 PlaneTrackingMode is set to Disabled.

equals

public boolean equals(Object other)

getDistance

Added in 1.0.0-alpha04
public final float getDistance()

the distance from the camera to the hit location, in meters.

getHitPose

Added in 1.0.0-alpha04
public final @NonNull Pose getHitPose()

the Pose of the intersection between a ray and the Trackable.

getTrackable

Added in 1.0.0-alpha04
public final @NonNull Trackable<@NonNull Trackable.StategetTrackable()

the Trackable that was hit.

hashCode

public int hashCode()