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

A cylinder class describing a cylinder by its radius and length.


Table members

Functions


Murl.Math.Cylinder.new()

The default constructor.

Murl.Math.Cylinder new()

Returns
Murl.Math.Cylinder

Murl.Math.Cylinder.new(length, radius)

Constructor taking cylinder length and radius.

Murl.Math.Cylinder new(Number length, Number radius)

Parameters
lengthThe length of the cylinder.
radiusThe radius of the cylinder.
Returns
Murl.Math.Cylinder

Murl.Math.Cylinder.new(box)

Constructor taking a box.

Murl.Math.Cylinder new(Murl.Math.Box box)

Parameters
boxThe box.
Returns
Murl.Math.Cylinder


Methods


GetLength()

Get the length.

Number GetLength()

Returns
Number The length.

GetRadius()

Get the radius.

Number GetRadius()

Returns
Number The radius.

Set(box)

Set the cylinder by a box.

Set(Murl.Math.Box box)

Parameters
boxThe box.

Set(box, shearX, shearY)

Set the cylinder from a sheared box.

Set(Murl.Math.Box box, Number shearX, Number shearY)

Parameters
boxThe box.
shearXThe shear value in X direction.
shearYThe shear value in Y direction.

IsIntersecting(sphere)

Check if the cylinder is intersecting a sphere.

Boolean IsIntersecting(Murl.Math.Sphere sphere)

Parameters
sphereThe sphere to check.
Returns
Boolean true if the cylinder 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()