![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
A box class describing the minimum and maximum coordinate of a 3d-box.
The default constructor.
Murl.Math.Box new()
Constructor uniting two given boxes.
Murl.Math.Box new(Murl.Math.Box b1, Murl.Math.Box b2)
b1 | The first box. |
b2 | The second box. |
Constructor taking a sphere. The box is only approximated and slightly larger than it needs to be.
Murl.Math.Box new(Murl.Math.Sphere sphere)
sphere | The sphere to enclose. |
Constructor taking a single coordinate.
Murl.Math.Box new(Murl.Math.Vector point)
point | The coordinate for minimum and maximum. |
Constructor taking minimum and maximum coordinates.
Murl.Math.Box new(Murl.Math.Vector min, Murl.Math.Vector max)
min | The minimum coordinate. |
max | The maximum coordinate. |
Constructor taking the three points of a triangle.
Murl.Math.Box new(Murl.Math.Vector a, Murl.Math.Vector b, Murl.Math.Vector c)
a | The first triangle coordinate. |
b | The second triangle coordinate. |
c | The third triangle coordinate. |
Clear the box
Clear()
Set the coordinates from a box.
Set(Murl.Math.Box other)
other | The box to copy from. |
Set the coordinates by uniting two given boxes.
Set(Murl.Math.Box b1, Murl.Math.Box b2)
b1 | The first box. |
b2 | The second box. |
Set the coordinates by a sphere. The box is only approximated and slightly larger than it needs to be.
Set(Murl.Math.Sphere sphere)
sphere | The sphere to enclose. |
Set the coordinates to a single coordinate.
Set(Murl.Math.Vector point)
point | The coordinate for minimum and maximum. |
Set the minimum and maximum coordinates.
Set(Murl.Math.Vector min, Murl.Math.Vector max)
min | The minimum coordinate. |
max | The maximum coordinate. |
Set the coordinates by the three points of a triangle.
Set(Murl.Math.Vector a, Murl.Math.Vector b, Murl.Math.Vector c)
a | The first triangle coordinate. |
b | The second triangle coordinate. |
c | The third triangle coordinate. |
Set the minimum coordinate.
SetMinimum(Murl.Math.Vector min)
min | The minimum coordinate. |
Set the maximum coordinate.
SetMaximum(Murl.Math.Vector max)
max | The maximum coordinate. |
Get the minimum coordinate.
Murl.Math.Vector GetMinimum()
Get the maximum coordinate.
Murl.Math.Vector GetMaximum()
Unite this box with another box.
Unite(Murl.Math.Box other)
other | The other box to unite. |
Include a point in this box.
Include(Murl.Math.Vector point)
point | The point to include. |
Check if a given box is intersecting this box.
Boolean IsIntersecting(Murl.Math.Box other)
other | The other box to check. |
Check if a the box is empty. A box is only empty when created with the default constructor, explicitly cleared by calling Clear(), or duplicated from another empty box or sphere. As soon as a single point is included, the box is considered "not empty".
Boolean IsEmpty()
Get the flags.
Integer GetFlags()
Get the string representation of the object.
String ToString()
Converts the object content to a string in a reasonable format.