|
Blobalizer
|
A generic 3D axis-aligned bounding box defined by its minimum and maximum points. More...
#include <BoundingBox.h>
Public Types | |
| typedef Magnum::Math::Vector< size, float > | PointType |
| The type of points that make up this box. | |
Public Member Functions | |
| BoundingBox () | |
| Constructs a new empty bounding box. | |
| BoundingBox (const PointType &p) | |
| Creates a new bounding box contained the given point with zero size. | |
| BoundingBox (const PointType &min, const PointType &max) | |
| Creates a new minimal bounding box containing the two points. The given minimum point has to be smaller than the maximum. | |
| bool | operator== (const BoundingBox &other) const |
| Compares this bounding box to another and checks if they are equal. | |
| bool | operator!= (const BoundingBox &other) const |
| Compares this bounding box to another and checks if they are not equal. | |
| PointType | center () const |
| Returns the center of this bounding box. The result of this method on an undefined bounding box will be NaN. | |
| void | reset () |
| Resets this bounding box to an undefined state. | |
| PointType | size () const |
| Returns the size of this bounding box. The result of this method on an undefined bounding box will be -Inf. | |
| PointType | extends () const |
| Returns the extends of this bounding box, this equal to half the size or the distance from the center to a corner. The result of this method on an undefined bounding box will be -Inf. | |
| void | expandBy (const PointType &p) |
| Minimally expand this box to encompass the given point. | |
| void | expandBy (const BoundingBox &other) |
| Minimally expand this box to encompass the given bounding box. | |
| bool | contains (const PointType &p) const |
| Checks if the given point is contained within this bounding box. | |
Public Attributes | |
| PointType | min |
| Component-wise minimum. | |
| PointType | max |
| Component-wise maximum. | |
A generic 3D axis-aligned bounding box defined by its minimum and maximum points.
| T | the type of component |
| size | the dimension of this box |
| typedef Magnum::Math::Vector<size, float> BoundingBox< size, T >::PointType |
The type of points that make up this box.
|
inline |
Constructs a new empty bounding box.
|
inline |
Creates a new bounding box contained the given point with zero size.
| p | The point defining the location of the bounding box. |
|
inline |
Creates a new minimal bounding box containing the two points. The given minimum point has to be smaller than the maximum.
| min | the minimum bound of the box. |
| max | the maximum bound of the box. |
|
inline |
Returns the center of this bounding box. The result of this method on an undefined bounding box will be NaN.
|
inline |
Checks if the given point is contained within this bounding box.
| p | the point to check |
|
inline |
Minimally expand this box to encompass the given bounding box.
| p | the bounding box to add to this box. |
|
inline |
Minimally expand this box to encompass the given point.
| p | the point to add to this box. |
|
inline |
Returns the extends of this bounding box, this equal to half the size or the distance from the center to a corner. The result of this method on an undefined bounding box will be -Inf.
|
inline |
Compares this bounding box to another and checks if they are not equal.
|
inline |
Compares this bounding box to another and checks if they are equal.
|
inline |
Resets this bounding box to an undefined state.
|
inline |
Returns the size of this bounding box. The result of this method on an undefined bounding box will be -Inf.
| PointType BoundingBox< size, T >::max |
Component-wise maximum.
| PointType BoundingBox< size, T >::min |
Component-wise minimum.