Class: Ray3

Ray3(origin, direction)

A 3D ray that is emitted from an origin into a direction.

Constructor

new Ray3(origin, direction)

Creates a new Ray3.
Parameters:
Name Type Description
origin Vector3 The origin of the ray.
direction Vector3 The direction of the ray. It should be a unit vector.
Source:

Methods

clone() → {Ray3}

Creates a clone of the ray.
Source:
Returns:
The cloned ray.
Type
Ray3

copy(ray) → {Ray3}

Copies the origin and the direction of another ray.
Parameters:
Name Type Description
ray Ray3 The ray to copy.
Source:
Returns:
The ray.
Type
Ray3

equals(ray) → {Boolean}

Compares the origin and the direction to another ray.
Parameters:
Name Type Description
ray Ray3 The ray to compare to.
Source:
Returns:
A value indicating whether the rays are equal.
Type
Boolean