HitResult


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 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 in the world coordinate space

Trackable<Trackable.State>

the Trackable that was hit

Public functions

createAnchor

Added in 1.0.0-alpha12
fun createAnchor(): AnchorCreateResult

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

Returns
AnchorCreateResult

an AnchorCreateResult with the result of the anchor creation

equals

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

hashCode

open fun hashCode(): Int

Public properties

distance

Added in 1.0.0-alpha12
val distanceFloat

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

hitPose

Added in 1.0.0-alpha12
val hitPosePose

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.

trackable

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

the Trackable that was hit