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.

Constructors

ray <pos_point3> <dir_point3>

Returns a new ray with given position and direction vector.

<node> as ray

Takes a scene object that has a target, such as a Tape Helper, a Target Camera or Target Light and returns a ray from the object to the target.

Returns undefined if the object has no target.

Properties

<ray>.pos: Float
<ray>.position: Float --pos and position are synonyms
<ray>.dir: Point3 --unit normalized direction vector

Operators

<ray> == <ray>
<ray> != <ray>

Available in 3ds Max 2018 and higher: Standard comparisons.

Methods

copy <ray>

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.