Optional
origin: Vec3The starting point of the ray. The constructor takes a reference of this parameter. Defaults to the origin (0, 0, 0).
Optional
direction: Vec3The direction of the ray. The constructor takes a reference of this parameter. Defaults to a direction down the world negative Z axis (0, 0, -1).
The direction of the ray.
The starting point of the ray.
Creates a new Ray instance. The ray is infinite, starting at a given origin and pointing in a given direction.
Example