Murl Engine Lua Addon API  Version 1.0 beta
Murl.Math.Ray

A ray class.


Table members

Functions


Murl.Math.Ray.new()

The default constructor. This creates a ray starting at (0/0/0) and pointing towards the positive Z axis.

Murl.Math.Ray new()

Returns
Murl.Math.Ray

Murl.Math.Ray.new(origin, direction)

Constructor taking origin and direction vectors.

Murl.Math.Ray new(Murl.Math.Vector origin, Murl.Math.Vector direction)

Parameters
originThe ray origin.
directionThe ray direction.
Returns
Murl.Math.Ray


Methods


Set(other)

Copy the content of a source ray to the ray instance.

Set(Murl.Math.Ray other)

Parameters
otherThe ray to copy from.

Set(origin, direction)

Set a ray from given origin and direction vectors.

Set(Murl.Math.Vector origin, Murl.Math.Vector direction)

Parameters
originThe ray origin.
directionThe ray direction.

SetOrigin(origin)

Set the ray origin.

SetOrigin(Murl.Math.Vector origin)

Parameters
originThe ray origin.

GetOrigin()

Get the ray origin.

Murl.Math.Vector GetOrigin()

Returns
Murl.Math.Vector The ray origin.

SetDirection(direction)

Set the ray direction.

SetDirection(Murl.Math.Vector direction)

Parameters
directionThe ray direction.

GetDirection()

Get the ray direction.

Murl.Math.Vector GetDirection()

Returns
Murl.Math.Vector The ray direction.