HitResult


public final 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.

See also
createAnchor

Summary

Public methods

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

final @NonNull Trackable<@NonNull Trackable.State>

the Trackable that was hit

int

Public methods

equals

public boolean equals(Object other)

getDistance

Added in 1.0.0-alpha15
public final float getDistance()

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

getHitPose

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

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.

getTrackable

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

the Trackable that was hit

hashCode

public int hashCode()