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 |
open operator Boolean |
|
open Int |
hashCode() |
Public properties |
|
|---|---|
Float |
the distance from the camera to the hit location, in meters. |
Pose |
the |
Trackable<Trackable.State> |
the |
Public functions
createAnchor
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 |
Public properties
distance
val distance: Float
the distance from the camera to the hit location, in meters.
hitPose
val hitPose: Pose
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
val trackable: Trackable<Trackable.State>
the Trackable that was hit.