EBGeometry 1.0
|
Axis-aligned bounding box as bounding volume. More...
#include <EBGeometry_BoundingVolumes.hpp>
Public Types | |
using | Vec3 = Vec3T< T > |
Alias which cuts down on typing. | |
Public Member Functions | |
AABBT () noexcept | |
Default constructor (does nothing) | |
AABBT (const Vec3T< T > &a_lo, const Vec3T< T > &a_hi) noexcept | |
Full constructor taking the low/high corners of the bounding box. | |
AABBT (const AABBT &a_other) noexcept | |
Copy constructor of another bounding box. | |
AABBT (const std::vector< AABBT< T > > &a_others) noexcept | |
Constructor which creates an AABB which encloses a set of other AABBs. | |
template<class P > | |
AABBT (const std::vector< Vec3T< P > > &a_points) noexcept | |
Template constructor (since mixed precision allowed) which creates an AABB that encloses a set of 3D points. | |
virtual | ~AABBT () noexcept |
Destructor (does nothing) | |
AABBT & | operator= (const AABBT< T > &a_other)=default |
Copy assignment. | |
template<class P > | |
void | define (const std::vector< Vec3T< P > > &a_points) noexcept |
Define function (since mixed precision allowed) which sets this AABB such that it encloses a set of 3D points. | |
bool | intersects (const AABBT &a_other) const noexcept |
Check if this AABB intersects another AABB. | |
Vec3T< T > & | getLowCorner () noexcept |
Get the modifiable lower-left corner of the AABB. | |
const Vec3T< T > & | getLowCorner () const noexcept |
Get the immutable lower-left corner of the AABB. | |
Vec3T< T > & | getHighCorner () noexcept |
Get the modifiable upper-right corner of the AABB. | |
const Vec3T< T > & | getHighCorner () const noexcept |
Get the immutable upper-right corner of the AABB. | |
Vec3 | getCentroid () const noexcept |
Get bounding volume centroid. | |
T | getOverlappingVolume (const AABBT< T > &a_other) const noexcept |
Compute the overlapping volume between this AABB and another AABB. | |
T | getDistance (const Vec3 &a_x0) const noexcept |
Get the distance to this AABB (points inside the bounding box have a zero distance) | |
T | getVolume () const noexcept |
Compute the bounding box volume. | |
T | getArea () const noexcept |
Compute the bounding box area. | |
Protected Attributes | |
Vec3 | m_loCorner |
Lower-left corner of bounding box. | |
Vec3 | m_hiCorner |
Upper-right corner of bounding box. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const AABBT< T > &aabb) |
For outputting a vector to an output stream. | |
Axis-aligned bounding box as bounding volume.
This class represents a Cartesian box that encloses a set of 3D points.
|
inlinenoexcept |
Full constructor taking the low/high corners of the bounding box.
[in] | a_lo | Low corner |
[in] | a_hi | High |
Copy constructor of another bounding box.
[in] | a_other | Other bounding box |
|
inlinenoexcept |
Constructor which creates an AABB which encloses a set of other AABBs.
[in] | a_others | Other bounding boxes |
|
inlinenoexcept |
Template constructor (since mixed precision allowed) which creates an AABB that encloses a set of 3D points.
[in] | a_points | Set of 3D points |
|
inlinenoexcept |
Define function (since mixed precision allowed) which sets this AABB such that it encloses a set of 3D points.
[in] | a_points | Set of 3D points |
|
inlinenoexcept |
Get the distance to this AABB (points inside the bounding box have a zero distance)
[in] | a_x0 | 3D point |
|
inlinenoexcept |
Compute the overlapping volume between this AABB and another AABB.
[in] | a_other | The other AABB |
Check if this AABB intersects another AABB.
[in] | a_other | The other AABB |
|
default |
Copy assignment.
[in] | a_other | Other bounding box |