Ray
A ray that starts at an origin and goes in one direction. Use it for picking, for example to find which objects are under the mouse pointer.
The ray is mutable and not thread-safe. Use each instance from one thread only.
The constructor stores the given vectors by reference (it does not copy them); sharing a vector with another object means later mutations are visible through every alias. Use set or clone when you need independent storage.
Constructors
Properties
Functions
Transforms this ray by the 4x4 matrix matrix4.
Returns the squared distance of closest approach between this ray and point.
Returns the distance from this ray's origin to plane, or null if the ray does not intersect the plane.
Returns the distance of closest approach between this ray and point.
Returns true if this ray intersects box.
Returns true if this ray intersects plane.
Returns true if this ray intersects sphere.