HitTestResult


class HitTestResult


Specifies an intersection between a ray and the Scene.

This can be obtained by running ScenePose.hitTest and related methods.

Summary

Nested types

Public constructors

HitTestResult(
    hitPosition: Vector3,
    surfaceNormal: Vector3?,
    surfaceType: Int,
    distance: Float
)

Public functions

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

Public properties

Float

the distance from the origin to the hit location.

Vector3

the Vector3 position of the intersection between a ray and the Scene.

Vector3?

The normal of the surface of the Entity or surface that was hit, or null if the normal could not be computed.

Int

the HitTestResult.SurfaceType that was hit.

Public constructors

HitTestResult

Added in 1.0.0-alpha09
HitTestResult(
    hitPosition: Vector3,
    surfaceNormal: Vector3?,
    surfaceType: Int,
    distance: Float
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

Public properties

distance

Added in 1.0.0-alpha09
val distanceFloat

the distance from the origin to the hit location.

hitPosition

Added in 1.0.0-alpha09
val hitPositionVector3

the Vector3 position of the intersection between a ray and the Scene.

surfaceNormal

Added in 1.0.0-alpha09
val surfaceNormalVector3?

The normal of the surface of the Entity or surface that was hit, or null if the normal could not be computed.

surfaceType

Added in 1.0.0-alpha09
val surfaceTypeInt

the HitTestResult.SurfaceType that was hit.