HitResult


class HitResult


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

Can be obtained from Interaction.hitTest.

Summary

Public functions

AnchorCreateResult

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

open operator Boolean
equals(other: Any?)
open Int

Public properties

Float

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

Pose

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

Trackable<Trackable.State>

the Trackable that was hit.

Public functions

createAnchor

Added in 1.0.0-alpha04
fun createAnchor(): AnchorCreateResult

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

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

distance

Added in 1.0.0-alpha04
val distanceFloat

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

hitPose

Added in 1.0.0-alpha04
val hitPosePose

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

trackable

Added in 1.0.0-alpha04
val trackableTrackable<Trackable.State>

the Trackable that was hit.