HitResult


class HitResult


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.

See also
createAnchor

Summary

Public functions

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

Returns a string representation of HitResult for debugging.

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

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Returns a string representation of HitResult for debugging.

Note: Not intended for production use.

Public properties

distance

Added in 1.0.0-beta02
val distanceFloat

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

hitPose

Added in 1.0.0-beta02
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.

The hit Trackable may also be an instance of Anchorable. If so, an anchor representing the hit position can be created from the Anchorable

trackable

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

the Trackable that was hit