|
Public Member Functions |
| EMMA_EXPORT | Box3f () |
| | Default constructor - leaves box totally empty.
|
| EMMA_EXPORT | Box3f (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) |
| | Constructor given bounds.
|
| EMMA_EXPORT | Box3f (const Fusion::Vec3f &_min, const Fusion::Vec3f &_max) |
| | Constructor given minimum and maximum points.
|
| EMMA_EXPORT | ~Box3f () |
| EMMA_EXPORT const Fusion::Vec3f & | getMin () const |
| | Returns the min and max points.
|
| EMMA_EXPORT const Fusion::Vec3f & | getMax () const |
| EMMA_EXPORT Fusion::Vec3f & | getMin () |
| EMMA_EXPORT Fusion::Vec3f & | getMax () |
| EMMA_EXPORT Fusion::Vec3f | getCenter () const |
| | Returns the center of a box.
|
| EMMA_EXPORT void | extendBy (const Fusion::Vec3f &pt) |
| | Extends Box3f (if necessary) to contain given 3D point.
|
| EMMA_EXPORT void | extendBy (const Box3f &bb) |
| | Extends Box3f (if necessary) to contain given Box3f.
|
| EMMA_EXPORT bool | intersect (const Fusion::Vec3f &pt) const |
| | Returns TRUE if intersection of given point and Box3f is not empty.
|
| EMMA_EXPORT bool | intersect (const Box3f &bb) const |
| | Returns TRUE if intersection of given Box3f and Box3f is not empty.
|
| EMMA_EXPORT bool | outside (const Matrix &MVP, int &cullBits) const |
| | Returns TRUE if bounding box is completely outside the view-volume defined by the model+view+projection matrix given.
|
| EMMA_EXPORT void | setBounds (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) |
| | Common get and set functions.
|
| EMMA_EXPORT void | setBounds (const Fusion::Vec3f &_min, const Fusion::Vec3f &_max) |
| EMMA_EXPORT void | getBounds (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const |
| EMMA_EXPORT void | getBounds (Fusion::Vec3f &_min, Fusion::Vec3f &_max) const |
| EMMA_EXPORT Fusion::Vec3f | getClosestPoint (const Fusion::Vec3f &point) |
| | Returns the closest point on the box to the given point.
|
| EMMA_EXPORT void | getOrigin (float &originX, float &originY, float &originZ) const |
| | Returns origin (minimum point) of box.
|
| EMMA_EXPORT void | getSize (float &sizeX, float &sizeY, float &sizeZ) const |
| | Returns size of box.
|
| EMMA_EXPORT void | makeEmpty () |
| | Sets Box3f to contain nothing.
|
| EMMA_EXPORT bool | isEmpty () const |
| | Checks if the box is empty (degenerate) note that this relies on boxes being completely degenerate if they are degenerate at all.
|
| EMMA_EXPORT bool | hasVolume () const |
| | Checks if the box has volume; i.e.
|
| EMMA_EXPORT void | getSpan (const Fusion::Vec3f &direction, float &dMin, float &dMax) const |
| | Finds the extent of a box along a particular direction.
|
| EMMA_EXPORT void | transform (const Matrix &m) |
| | Transforms Box3f by matrix, enlarging Box3f to contain result.
|
| EMMA_EXPORT float | getVolume () const |
| | Gives the volume of the box (0 for an empty box).
|
Friends |
| FUSION_EXPORT friend int | operator== (const Box3f &b1, const Box3f &b2) |
| | Equality comparisons.
|
| FUSION_EXPORT friend int | operator!= (const Box3f &b1, const Box3f &b2) |