HitTestResult
public final 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 static class HitTestResult.SurfaceType |
Public constructors |
|---|
HitTestResult( |
Public methods |
|
|---|---|
boolean |
|
final @FloatRange(from = 0.0) float |
the distance from the origin to the hit location. |
final @NonNull Vector3 |
the |
final Vector3 |
The normal of the surface of the Entity or surface that was hit, or null if the normal could not be computed. |
final int |
the |
int |
hashCode() |
Public constructors
HitTestResult
public HitTestResult(
@NonNull Vector3 hitPosition,
Vector3 surfaceNormal,
int surfaceType,
float distance
)
Public methods
getDistance
public final @FloatRange(from = 0.0) float getDistance()
the distance from the origin to the hit location.
getHitPosition
public final @NonNull Vector3 getHitPosition()
the Vector3 position of the intersection between a ray and the Scene.
getSurfaceNormal
public final Vector3 getSurfaceNormal()
The normal of the surface of the Entity or surface that was hit, or null if the normal could not be computed.
getSurfaceType
public final int getSurfaceType()
the HitTestResult.SurfaceType that was hit.