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

A cone class describing a cone by its angle and length.


Table members

Functions


Murl.Math.Cone.new()

The default constructor.

Murl.Math.Cone new()

Returns
Murl.Math.Cone

Murl.Math.Cone.new(length, angle)

Constructor taking cone length and angle.

Murl.Math.Cone new(Number length, Number angle)

Parameters
lengthThe length of the cone.
angleThe angle of the cone.
Returns
Murl.Math.Cone

Murl.Math.Cone.new(frustum)

Constructor taking a frustum.

Murl.Math.Cone new(Murl.Math.Frustum frustum)

Parameters
frustumThe frustum.
Returns
Murl.Math.Cone


Methods


GetLength()

Get the length.

Number GetLength()

Returns
Number The length.

GetAngle()

Get the angle.

Number GetAngle()

Returns
Number The angle.

Set(frustum)

Set the cone by a frustum.

Set(Murl.Math.Frustum frustum)

Parameters
frustumThe frustum.

IsIntersecting(sphere)

Check if the cone is intersecting a sphere.

Boolean IsIntersecting(Murl.Math.Sphere sphere)

Parameters
sphereThe sphere to check.
Returns
Boolean true if the cone is intersecting the sphere.

ToString()

Get the string representation of the object.

String ToString()

Returns
String The string representation of the object.


Metamethods


The tostring operator

Converts the object content to a string in a reasonable format.

Returns
ToString()