![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IBoundingVolume interface.
This interface represents a simple bounding volume in 3D space that encloses the outer bounds of some geometry, which are used for e.g. visibility determination (a.k.a. culling), and optionally provides an "inner" volume that is used for alignment purposes.
Clear the bounding volume. This method clears the bounding value by setting all of its internal values to zero.
Boolean Clear()
Set the local bounding volume extent from a box.
Boolean SetLocalBounds(Murl.Math.Box box)
box | The local bounding box. |
Set the local bounding volume extent from an inner and outer box.
Boolean SetLocalBounds(Murl.Math.Box outerBox, Murl.Math.Box innerBox)
outerBox | The local outer bounding box. |
innerBox | The local inner bounding box. |
Set the local bounding volume extent from a sphere.
Boolean SetLocalBounds(Murl.Math.Sphere sphere)
sphere | The local bounding sphere. |
Set the local bounding volume extent. This method sets the bounding volume to enclose the sphere represented by the given sphere center and radius.
Boolean SetLocalBounds(Murl.Math.Vector sphereCenter, Number sphereRadius)
sphereCenter | The bounding sphere center. |
sphereRadius | The bounding sphere radius. |
Set the local bounding volume extent. This method sets the bounding volume to enclose the given minimum and maximum values in local 3D (object) space.
Boolean SetLocalBounds(Murl.Math.Vector minExtent, Murl.Math.Vector maxExtent)
minExtent | A vector containing minimum X, Y and Z values of a bounding box. |
maxExtent | A vector containing maximum X, Y and Z values of a bounding box. |
Set the local bounding volume extent. This method sets the bounding volume to enclose the given minimum and maximum values in local 3D (object) space, for both an inner and outer box.
Boolean SetLocalBounds(Murl.Math.Vector minOuterExtent, Murl.Math.Vector maxOuterExtent, Murl.Math.Vector minInnerExtent, Murl.Math.Vector maxInnerExtent)
minOuterExtent | A vector containing minimum values of the outer bounding box. |
maxOuterExtent | A vector containing maximum values of the outer bounding box. |
minInnerExtent | A vector containing minimum values of the inner bounding box. |
maxInnerExtent | A vector containing maximum values of the inner bounding box. |
Unite the local bounding volume with a given other one.
Boolean UniteLocalBounds(Murl.Graph.IBoundingVolume other)
other | The other bounding volume to unite with. |
Unite the local bounding volume with a given other one using an additional transformation.
Boolean UniteLocalBounds(Murl.Graph.IBoundingVolume other, Murl.Math.Matrix baseTransform, Murl.Math.Vector baseScale)
other | The other bounding volume to unite with. |
baseTransform | The transform to apply to the other volume. |
baseScale | The scale factor to apply to the other volume. |
Get the bounding sphere in object space.
Murl.Math.Sphere GetLocalSphere()
Get the bounding sphere in world space.
Murl.Math.Sphere GetWorldSphere()
Calculate the bounding sphere relative to a given base transform and scale.
Murl.Math.Sphere CalculateWorldSphereRelativeToBase(Murl.Math.Matrix baseTransform, Murl.Math.Vector baseScale)
baseTransform | The base transform to use. |
baseScale | The base scale factor to use. |
Calculate the bounding sphere relative to a given view transform and scale.
Murl.Math.Sphere CalculateWorldSphereRelativeToView(Murl.Math.Matrix viewTransform, Murl.Math.Vector viewScale)
viewTransform | The view transform to use. |
viewScale | The view scale factor to use. |
Get the outer bounding box in object space.
Murl.Math.Box GetOuterLocalBox()
Get the outer bounding box in world space.
Murl.Math.Box GetOuterWorldBox()
Calculate the outer bounding box relative to a given base transform and scale.
Murl.Math.Box CalculateOuterWorldBoxRelativeToBase(Murl.Math.Matrix baseTransform, Murl.Math.Vector baseScale)
baseTransform | The base transform to use. |
baseScale | The base scale factor to use. |
Calculate the outer bounding box relative to a given view transform and scale.
Murl.Math.Box CalculateOuterWorldBoxRelativeToView(Murl.Math.Matrix viewTransform, Murl.Math.Vector viewScale)
viewTransform | The view transform to use. |
viewScale | The view scale factor to use. |
Get the inner bounding box in object space.
Murl.Math.Box GetInnerLocalBox()
Get the inner bounding box in world space.
Murl.Math.Box GetInnerWorldBox()
Calculate the inner bounding box relative to a given base transform and scale.
Murl.Math.Box CalculateInnerWorldBoxRelativeToBase(Murl.Math.Matrix baseTransform, Murl.Math.Vector baseScale)
baseTransform | The base transform to use. |
baseScale | The base scale factor to use. |
Calculate the inner bounding box relative to a given view transform and scale.
Murl.Math.Box CalculateInnerWorldBoxRelativeToView(Murl.Math.Matrix viewTransform, Murl.Math.Vector viewScale)
viewTransform | The view transform to use. |
viewScale | The view scale factor to use. |
Set the bounding volume's current world transform matrix.
Boolean SetWorldTransform(Murl.Math.Matrix worldTransform)
worldTransform | The world transform matrix. |
Clear the bounding volume's current world transform matrix.
Boolean ClearWorldTransform()
Get the bounding volume's current world transform matrix.
Murl.Math.Matrix GetWorldTransform()
Set the bounding volume's current world scale factor.
Boolean SetWorldScaleFactor(Murl.Math.Vector worldScaleFactor)
worldScaleFactor | The world scale factor in X, Y and Z direction. |
Reset the bounding volume's current world scale factor to 1.
Boolean ClearWorldScaleFactor()
Get the bounding volume's current world scale factor.
Murl.Math.Vector GetWorldScaleFactor()
Check if the bounding volume intersects another one.
Boolean IsIntersecting(Murl.Graph.IBoundingVolume other)
other | The bounding volume to check against. |
Check if the bounding volume is empty.
Boolean IsEmpty()
Check if the bounding volume has an inner box.
Boolean HasInnerBox()