The IBoundingVolume interface. More...
#include "murl_graph_i_bounding_volume.h"
Inherits Murl::IStatisticsObject.
Inherited by Murl::Graph::BoundingVolume.
Public Member Functions | |
virtual Bool | Clear ()=0 |
Clear the bounding volume. More... | |
virtual Bool | SetLocalBounds (const Box &box)=0 |
Set the local bounding volume extent from a box. More... | |
virtual Bool | SetLocalBounds (const Vector &minExtent, const Vector &maxExtent)=0 |
Set the local bounding volume extent. More... | |
virtual Bool | SetLocalBounds (const Box &outerBox, const Box &innerBox)=0 |
Set the local bounding volume extent from an inner and outer box. More... | |
virtual Bool | SetLocalBounds (const Vector &minOuterExtent, const Vector &maxOuterExtent, const Vector &minInnerExtent, const Vector &maxInnerExtent)=0 |
Set the local bounding volume extent. More... | |
virtual Bool | SetLocalBounds (const Sphere &sphere)=0 |
Set the local bounding volume extent from a sphere. More... | |
virtual Bool | SetLocalBounds (const Vector &sphereCenter, Real sphereRadius)=0 |
Set the local bounding volume extent. More... | |
virtual Bool | UniteLocalBounds (const IBoundingVolume *other)=0 |
Unite the local bounding volume with a given other one. More... | |
virtual Bool | UniteLocalBounds (const IBoundingVolume *other, const Matrix &baseTransform, const Vector &baseScale)=0 |
Unite the local bounding volume with a given other one using an additional transformation. More... | |
virtual const Sphere & | GetLocalSphere () const =0 |
Get the bounding sphere in object space. More... | |
virtual const Sphere & | GetWorldSphere () const =0 |
Get the bounding sphere in world space. More... | |
virtual Sphere | CalculateWorldSphereRelativeToBase (const Matrix &baseTransform, const Vector &baseScale) const =0 |
Calculate the bounding sphere relative to a given base transform and scale. More... | |
virtual Sphere | CalculateWorldSphereRelativeToView (const Matrix &viewTransform, const Vector &viewScale) const =0 |
Calculate the bounding sphere relative to a given view transform and scale. More... | |
virtual const Box & | GetOuterLocalBox () const =0 |
Get the outer bounding box in object space. More... | |
virtual const Box & | GetOuterWorldBox () const =0 |
Get the outer bounding box in world space. More... | |
virtual Box | CalculateOuterWorldBoxRelativeToBase (const Matrix &baseTransform, const Vector &baseScale) const =0 |
Calculate the outer bounding box relative to a given base transform and scale. More... | |
virtual Box | CalculateOuterWorldBoxRelativeToView (const Matrix &viewTransform, const Vector &viewScale) const =0 |
Calculate the outer bounding box relative to a given view transform and scale. More... | |
virtual const Box & | GetInnerLocalBox () const =0 |
Get the inner bounding box in object space. More... | |
virtual const Box & | GetInnerWorldBox () const =0 |
Get the inner bounding box in world space. More... | |
virtual Box | CalculateInnerWorldBoxRelativeToBase (const Matrix &baseTransform, const Vector &baseScale) const =0 |
Calculate the inner bounding box relative to a given base transform and scale. More... | |
virtual Box | CalculateInnerWorldBoxRelativeToView (const Matrix &viewTransform, const Vector &viewScale) const =0 |
Calculate the inner bounding box relative to a given view transform and scale. More... | |
virtual Bool | SetWorldTransform (const Matrix &worldTransform)=0 |
Set the bounding volume's current world transform matrix. More... | |
virtual Bool | ClearWorldTransform ()=0 |
Clear the bounding volume's current world transform matrix. More... | |
virtual const Matrix & | GetWorldTransform () const =0 |
Get the bounding volume's current world transform matrix. More... | |
virtual Bool | SetWorldScaleFactor (const Vector &worldScaleFactor)=0 |
Set the bounding volume's current world scale factor. More... | |
virtual Bool | ClearWorldScaleFactor ()=0 |
Reset the bounding volume's current world scale factor to 1. More... | |
virtual const Vector & | GetWorldScaleFactor () const =0 |
Get the bounding volume's current world scale factor. More... | |
virtual Bool | IsIntersecting (const IBoundingVolume *other) const =0 |
Check if the bounding volume intersects another one. More... | |
virtual Bool | IsEmpty () const =0 |
Check if the bounding volume is empty. More... | |
virtual Bool | HasInnerBox () const =0 |
Check if the bounding volume has an inner box. More... | |
Detailed Description
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.
Member Function Documentation
◆ Clear()
|
pure virtual |
Clear the bounding volume.
This method clears the bounding value by setting all of its internal values to zero.
- Returns
- true if successful.
◆ SetLocalBounds() [1/6]
Set the local bounding volume extent from a box.
- Parameters
-
box The local bounding box.
- Returns
- true if successful.
◆ SetLocalBounds() [2/6]
|
pure virtual |
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.
- Parameters
-
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.
- Returns
- true if successful.
◆ SetLocalBounds() [3/6]
|
pure virtual |
Set the local bounding volume extent from an inner and outer box.
- Parameters
-
outerBox The local outer bounding box. innerBox The local inner bounding box.
- Returns
- true if successful.
◆ SetLocalBounds() [4/6]
|
pure virtual |
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.
- Parameters
-
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.
- Returns
- true if successful.
◆ SetLocalBounds() [5/6]
Set the local bounding volume extent from a sphere.
- Parameters
-
sphere The local bounding sphere.
- Returns
- true if successful.
◆ SetLocalBounds() [6/6]
|
pure virtual |
Set the local bounding volume extent.
This method sets the bounding volume to enclose the sphere represented by the given sphere center and radius.
- Parameters
-
sphereCenter The bounding sphere center. sphereRadius The bounding sphere radius.
- Returns
- true if successful.
◆ UniteLocalBounds() [1/2]
|
pure virtual |
Unite the local bounding volume with a given other one.
- Parameters
-
other The other bounding volume to unite with.
- Returns
- true if successful.
◆ UniteLocalBounds() [2/2]
|
pure virtual |
Unite the local bounding volume with a given other one using an additional transformation.
- Parameters
-
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.
- Returns
- true if successful.
◆ GetLocalSphere()
|
pure virtual |
Get the bounding sphere in object space.
- Returns
- A constant reference to the local object space bounding sphere.
◆ GetWorldSphere()
|
pure virtual |
Get the bounding sphere in world space.
- Returns
- A constant reference to the world space bounding sphere.
◆ CalculateWorldSphereRelativeToBase()
|
pure virtual |
Calculate the bounding sphere relative to a given base transform and scale.
- Parameters
-
baseTransform The base transform to use. baseScale The base scale factor to use.
- Returns
- The calculated sphere.
◆ CalculateWorldSphereRelativeToView()
|
pure virtual |
Calculate the bounding sphere relative to a given view transform and scale.
- Parameters
-
viewTransform The view transform to use. viewScale The view scale factor to use.
- Returns
- The calculated sphere.
◆ GetOuterLocalBox()
|
pure virtual |
Get the outer bounding box in object space.
- Returns
- A constant reference to the local object space outer bounding box.
◆ GetOuterWorldBox()
|
pure virtual |
Get the outer bounding box in world space.
- Returns
- A constant reference to the world space outer bounding box.
◆ CalculateOuterWorldBoxRelativeToBase()
|
pure virtual |
Calculate the outer bounding box relative to a given base transform and scale.
- Parameters
-
baseTransform The base transform to use. baseScale The base scale factor to use.
- Returns
- The calculated box.
◆ CalculateOuterWorldBoxRelativeToView()
|
pure virtual |
Calculate the outer bounding box relative to a given view transform and scale.
- Parameters
-
viewTransform The view transform to use. viewScale The view scale factor to use.
- Returns
- The calculated box.
◆ GetInnerLocalBox()
|
pure virtual |
Get the inner bounding box in object space.
- Returns
- A constant reference to the local object space inner bounding box.
◆ GetInnerWorldBox()
|
pure virtual |
Get the inner bounding box in world space.
- Returns
- A constant reference to the world space inner bounding box.
◆ CalculateInnerWorldBoxRelativeToBase()
|
pure virtual |
Calculate the inner bounding box relative to a given base transform and scale.
- Parameters
-
baseTransform The base transform to use. baseScale The base scale factor to use.
- Returns
- The calculated box.
◆ CalculateInnerWorldBoxRelativeToView()
|
pure virtual |
Calculate the inner bounding box relative to a given view transform and scale.
- Parameters
-
viewTransform The view transform to use. viewScale The view scale factor to use.
- Returns
- The calculated box.
◆ SetWorldTransform()
|
pure virtual |
Set the bounding volume's current world transform matrix.
- Parameters
-
worldTransform The world transform matrix.
- Returns
- true if successful.
◆ ClearWorldTransform()
|
pure virtual |
Clear the bounding volume's current world transform matrix.
- Returns
- true if successful.
◆ GetWorldTransform()
|
pure virtual |
Get the bounding volume's current world transform matrix.
- Returns
- The world transform matrix.
◆ SetWorldScaleFactor()
|
pure virtual |
Set the bounding volume's current world scale factor.
- Parameters
-
worldScaleFactor The world scale factor in X, Y and Z direction.
- Returns
- true if successful.
◆ ClearWorldScaleFactor()
|
pure virtual |
Reset the bounding volume's current world scale factor to 1.
- Returns
- true if successful.
◆ GetWorldScaleFactor()
|
pure virtual |
Get the bounding volume's current world scale factor.
- Returns
- The world scale factor in X, Y and Z direction.
◆ IsIntersecting()
|
pure virtual |
Check if the bounding volume intersects another one.
- Parameters
-
other The bounding volume to check against.
- Returns
- true if both volumes are intersecting.
◆ IsEmpty()
|
pure virtual |
Check if the bounding volume is empty.
- Returns
- true if the volume is empty.
◆ HasInnerBox()
|
pure virtual |
Check if the bounding volume has an inner box.
- Returns
- true if the volume has an inner box.
The documentation for this interface was generated from the following file:
- murl_graph_i_bounding_volume.h