|
| BoundingBox () |
| Creates an invalid bounding box. More...
|
|
| BoundingBox (const Box3 &box) |
| Creates an invalid bounding box. More...
|
|
| BoundingBox (const Vector3 &lower, const Vector3 &higher) |
| Creates a new bounding box by two given corners. More...
|
|
| BoundingBox (const Vectors3 &points) |
| Creates a new bounding box enclosing a given set of 3D points. More...
|
|
| BoundingBox (const Vector3 *points, const unsigned int number) |
| Creates a new bounding box enclosing a given set of 3D points. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, Vector3 &position, Scalar &distance) const |
| Returns the front intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, Vector3 &position, Scalar &distance, Vector3 &normal) const |
| Returns the front intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, Vector3 &position, Scalar &distance, Vector3 &normal, Vector2 &textureCoordinate) const |
| Returns the front intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance) const |
| Returns whether a given ray has an intersection with this box. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance, Vector3 &normal) const |
| Returns whether a given ray has an intersection with this box. More...
|
|
bool | positiveFrontIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance, Vector3 &normal, Vector2 &textureCoordinate) const |
| Returns the front intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, Vector3 &position, Scalar &distance) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, Vector3 &position, Scalar &distance, Vector3 &normal) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, Vector3 &position, Scalar &distance, Vector3 &normal, Vector2 &textureCoordinate) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance, Vector3 &normal) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
bool | positiveBackIntersection (const Line3 &ray, const HomogenousMatrix4 &transformation, const HomogenousMatrix4 &invertedTransformation, Vector3 &position, Scalar &distance, Vector3 &normal, Vector2 &textureCoordinate) const |
| Returns the back intersection point between a given ray and this box whenever the distance is positive. More...
|
|
| BoxT3 ()=default |
| Creates an invalid bounding box. More...
|
|
| BoxT3 (const VectorT3< Scalar > &lower, const VectorT3< Scalar > &higher) |
| Creates a new bounding box by two given corners. More...
|
|
| BoxT3 (const VectorsT3< Scalar > &points) |
| Creates a new bounding box enclosing a given set of 3D points. More...
|
|
| BoxT3 (const VectorT3< Scalar > *points, const size_t number) |
| Creates a new bounding box enclosing a given set of 3D points. More...
|
|
| BoxT3 (const VectorT3< Scalar > ¢er, const Scalar xSize, const Scalar ySize, const Scalar zSize) |
| Creates a new bounding box with defined dimensions centered at a given 3D location. More...
|
|
VectorT3< Scalar > | center () const |
| Returns the center of the box. More...
|
|
Scalar | sqrDiagonal () const |
| Returns the square diagonal of this box. More...
|
|
Scalar | diagonal () const |
| Returns the diagonal of this box. More...
|
|
Scalar | xDimension () const |
| Returns the dimension in x axis, which could e.g. More...
|
|
Scalar | yDimension () const |
| Returns the dimension in y axis, which could e.g. More...
|
|
Scalar | zDimension () const |
| Returns the dimension in z axis, which could e.g. More...
|
|
VectorT3< Scalar > | dimension () const |
| Returns the dimension of this box for all three axis. More...
|
|
bool | isPoint (VectorT3< Scalar > *point=nullptr) const |
| Returns whether this box defines one single point only. More...
|
|
bool | isPlanar (PlaneT3< Scalar > &plane) const |
| Returns whether this box is planar aligned to one axis. More...
|
|
const VectorT3< Scalar > & | lower () const |
| Returns the lower corner of the box. More...
|
|
const VectorT3< Scalar > & | higher () const |
| Returns the higher corner of the box. More...
|
|
bool | isInside (const VectorT3< Scalar > &point, const Scalar eps=Scalar(0)) const |
| Returns whether a given point is inside this bounding box. More...
|
|
bool | isOnSurface (const VectorT3< Scalar > &point, const Scalar epsilon=NumericT< Scalar >::eps()) const |
| Returns whether a given point lies on the surface of this box. More...
|
|
bool | hasIntersection (const LineT3< Scalar > &ray) const |
| Returns whether a given ray has an intersection with this box. More...
|
|
bool | hasIntersection (const LineT3< Scalar > &ray, const Scalar epsPerDistance) const |
| Returns whether a given ray has an intersection with this box while applying a distance-dependent epsilon threshold. More...
|
|
bool | hasIntersection (const LineT3< Scalar > &ray, const HomogenousMatrixT4< Scalar > &box_T_ray) const |
| Returns whether a given ray has an intersection with this box. More...
|
|
unsigned int | corners (VectorT3< Scalar > *corners) const |
| Returns the corner positions of this box. More...
|
|
BoxT3< Scalar > | expanded (const VectorT3< Scalar > &offsets) const |
| Returns an expanded box of this box. More...
|
|
BoxT3< Scalar > & | expand (const VectorT3< Scalar > &offsets) |
| Expands this box. More...
|
|
void | clear () |
| Clears and resets the bounding box to an invalid box. More...
|
|
bool | isEqual (const BoxT3< Scalar > &box, const Scalar epsilon=NumericT< Scalar >::eps()) const |
| Returns whether two box objects are equal up to an epsilon. More...
|
|
bool | isValid () const |
| Returns whether the bounding box is valid. More...
|
|
BoxT3< Scalar > | operator* (const Scalar factor) const |
| Returns an enlarged bounding box of this one. More...
|
|
BoxT3< Scalar > | operator* (const HomogenousMatrixT4< Scalar > &world_T_box) const |
| Returns the (axis-aligned) world bounding box for a given transformation between the box and world. More...
|
|
BoxT3< Scalar > & | operator*= (const Scalar factor) |
| Enlarges the bounding box by a given factor in each dimension. More...
|
|
BoxT3< Scalar > & | operator*= (const HomogenousMatrixT4< Scalar > &world_T_box) |
| Transforms this bounding box with a given transformation so that the this bounding box is defined in world afterwards. More...
|
|
BoxT3< Scalar > & | operator+= (const VectorT3< Scalar > &point) |
| Adds a new point to this bounding box and updates it's dimension. More...
|
|
BoxT3< Scalar > & | operator+= (const BoxT3< Scalar > &right) |
| Joins to bounding boxes. More...
|
|
BoxT3< Scalar > | operator+ (const BoxT3< Scalar > &right) const |
| Returns the union of two bounding boxes. More...
|
|
bool | operator== (const BoxT3< Scalar > &right) const |
| Returns whether two boxes are identical. More...
|
|
bool | operator!= (const BoxT3< Scalar > &right) const |
| Returns whether two boxes are not identical. More...
|
|
| operator bool () const |
| Returns whether this box is not a default box. More...
|
|
This class implements a 3D bounding box.