EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Classes | Functions
EBGeometry::BoundingVolumes Namespace Reference

Namespace encapsulating bounding volume types for use with bounding volume hierarchies. More...

Classes

class  AABBT
 Axis-aligned bounding box (AABB) enclosing a set of 3D points. More...
 

Functions

template<class T >
bool intersects (const AABBT< T > &a_u, const AABBT< T > &a_v) noexcept
 Test whether two axis-aligned bounding boxes overlap.
 
template<class T >
T getOverlappingVolume (const AABBT< T > &a_u, const AABBT< T > &a_v) noexcept
 Compute the overlapping volume between two axis-aligned bounding boxes.
 
template<class T >
std::ostream & operator<< (std::ostream &a_os, const AABBT< T > &a_aabb)
 Print a bounding box as (low corner, high corner).
 

Detailed Description

Namespace encapsulating bounding volume types for use with bounding volume hierarchies.

Function Documentation

◆ getOverlappingVolume()

template<class T >
T EBGeometry::BoundingVolumes::getOverlappingVolume ( const AABBT< T > &  a_u,
const AABBT< T > &  a_v 
)
noexcept

Compute the overlapping volume between two axis-aligned bounding boxes.

Template Parameters
TFloating-point precision.
Parameters
[in]a_uOne bounding box.
[in]a_vThe other bounding box.
Returns
Overlap volume; zero if the boxes do not intersect.

◆ intersects()

template<class T >
bool EBGeometry::BoundingVolumes::intersects ( const AABBT< T > &  a_u,
const AABBT< T > &  a_v 
)
noexcept

Test whether two axis-aligned bounding boxes overlap.

Template Parameters
TFloating-point precision.
Parameters
[in]a_uOne bounding box.
[in]a_vThe other bounding box.
Returns
True if the boxes intersect, false otherwise. Boxes that only touch do not intersect.

◆ operator<<()

template<class T >
std::ostream & EBGeometry::BoundingVolumes::operator<< ( std::ostream &  a_os,
const AABBT< T > &  a_aabb 
)
inline

Print a bounding box as (low corner, high corner).

Template Parameters
TFloating-point precision.
Parameters
[in,out]a_osOutput stream.
[in]a_aabbBounding box to print.
Returns
Reference to the output stream after insertion.