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. |
Methods
clone() → {Ray3}
Creates a clone of the ray.
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. |
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. |
Returns:
A value indicating whether the rays are equal.
- Type
- Boolean