Ray Values

The Ray class defines the characteristics of a ray in 3D space. A ray has two Point3 components, one defining a start position and the other a direction vector for the ray.



Returns a new ray with given position and direction vector.

as ray

Takes a scene object that has a target, such as a tape measure or a target camera and returns a ray from the object to the target. Returns undefined if the object has no target.


.pos : Float

.position : Float -- pos and position are synonyms

.dir : Point3 -- unit normalized direction vector



Creates a new copy of the ray value.

For example:

newRay = copy oldRay

The new value contains a copy of the input ray value, and is independent of the input ray value.