The direction of the ray. This must be normalized (with direction.normalize()) for the methods to operate properly.
The origin of the ray.
Creates a new Ray with identical origin and direction to this one.
Gets the squared distance of the closest approach between this ray and the provided point.
The point to compute the squared distance to.
Gets the squared distance between this ray and a line segment expressed as a pair of points v0 and v1.
The start of the line segment.
The end of the line segment.
If this is provided, it receives the point on this ray that is closest to the segment.
if this is provided, it receives the point on the line segment that is closest to this ray.
Get the distance from this ray's origin to the plane, or null if this ray doesn't intersect the plane.
The plane to get the distance to.
Gets the distance of the closest approach between this ray and the provided point.
The point to compute the distance to.
Intersect this ray with the triangle expressed with the triplet of points a, b and c, returning the intersection point or null if there is no intersection.
The first point making up the triangle.
The second point making up the triangle.
The third point making up the triangle.
Whether to use backface culling.
The result will be copied into this Vector3.
Return true if this ray intersects with the box.
The box to intersect with.
Return true if this ray intersects with the plane.
The plane to intersect with.
Return true if this ray intersects with the sphere.
The sphere to intersect with.
Shift the origin of this ray along its direction by the given distance (from the current origin).
The distance along the ray to move the origin.
Creates a new Ray.