Class RayHit
- java.lang.Object
-
- com.google.ar.sceneform.collision.RayHit
-
- Direct Known Subclasses:
HitTestResult
public class RayHit extends java.lang.Object
Stores the results of ray intersection tests against various types of CollisionShape.
-
-
Constructor Summary
Constructors Constructor Description RayHit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getDistance()
Get the distance along the ray to the impact point on the surface of the collision shape.Vector3
getPoint()
Get the position in world-space where the ray hit the collision shape.void
reset()
void
set(RayHit other)
void
setDistance(float distance)
void
setPoint(Vector3 point)
-
-
-
Method Detail
-
setDistance
public void setDistance(float distance)
-
getDistance
public float getDistance()
Get the distance along the ray to the impact point on the surface of the collision shape.- Returns:
- distance along the ray that the hit occurred at
-
setPoint
public void setPoint(Vector3 point)
-
getPoint
public Vector3 getPoint()
Get the position in world-space where the ray hit the collision shape.- Returns:
- a new vector that represents the position in world-space that the hit occurred at
-
set
public void set(RayHit other)
-
reset
public void reset()
-
-