|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Signed distance field for an axis-aligned box (AABB). More...
#include <EBGeometry_AnalyticDistanceFunctions.hpp>


Public Member Functions | |
| BoxSDF ()=default | |
| Default constructor. Constructs a unit cube centered at the origin: [-0.5, 0.5]^3. | |
| BoxSDF (const Vec3T< T > &a_loCorner, const Vec3T< T > &a_hiCorner) noexcept | |
| Full constructor. | |
| BoxSDF (const BoxSDF &)=default | |
| Copy constructor. | |
| BoxSDF (BoxSDF &&)=default | |
| Move constructor. | |
| BoxSDF & | operator= (const BoxSDF &)=default |
| Copy assignment. | |
| BoxSDF & | operator= (BoxSDF &&)=default |
| Move assignment. | |
| ~BoxSDF () override=default | |
| Destructor. | |
| const Vec3T< T > & | getLowCorner () const noexcept |
| Get lower-left corner. | |
| Vec3T< T > & | getLowCorner () noexcept |
| Get lower-left corner. | |
| const Vec3T< T > & | getHighCorner () const noexcept |
| Get upper-right corner. | |
| Vec3T< T > & | getHighCorner () noexcept |
| Get upper-right corner. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept override |
| Signed distance function for the axis-aligned box. | |
Public Member Functions inherited from EBGeometry::SignedDistanceFunction< T > | |
| SignedDistanceFunction ()=default | |
| Default constructor. | |
| ~SignedDistanceFunction () override=default | |
| Destructor. | |
| T | value (const Vec3T< T > &a_point) const noexcept final |
| Implementation of ImplicitFunction::value; delegates to signedDistance(). | |
| virtual Vec3T< T > | normal (const Vec3T< T > &a_point, const T &a_delta) const noexcept |
| Compute the outward normal using central finite differences. | |
Public Member Functions inherited from EBGeometry::ImplicitFunction< T > | |
| ImplicitFunction ()=default | |
| Default constructor. | |
| virtual | ~ImplicitFunction ()=default |
| Default destructor. | |
| T | operator() (const Vec3T< T > &a_point) const noexcept |
| Call operator — alternative signature for the value function. | |
| template<class BV > | |
| BV | approximateBoundingVolumeOctree (const Vec3T< T > &a_initialLowCorner, const Vec3T< T > &a_initialHighCorner, const unsigned int a_maxTreeDepth, const T &a_safety=0.0) const |
| Compute an approximation to the bounding volume for the implicit surface using octree subdivision. | |
Protected Attributes | |
| Vec3T< T > | m_loCorner = Vec3T<T>(T(-0.5), T(-0.5), T(-0.5)) |
| Low box corner. | |
| Vec3T< T > | m_hiCorner = Vec3T<T>(T(0.5), T(0.5), T(0.5)) |
| High box corner. | |
Signed distance field for an axis-aligned box (AABB).
The box is defined by its lower and upper corners m_loCorner and m_hiCorner. It is axis-aligned (faces are perpendicular to the coordinate axes). The SDF is negative inside and positive outside. Side lengths are m_hiCorner[i] - m_loCorner[i] per axis. By default the box is the unit cube [-0.5, 0.5]^3 centered at the origin.
| T | Floating-point precision. |
|
inlinenoexcept |
Full constructor.
| [in] | a_loCorner | Lower corner (minimum x, y, z). |
| [in] | a_hiCorner | Upper corner (maximum x, y, z). Each component must be strictly greater than the corresponding component of a_loCorner. |
|
inlinenoexcept |
Get upper-right corner.
|
inlinenoexcept |
Get upper-right corner.
|
inlinenoexcept |
Get lower-left corner.
|
inlinenoexcept |
Get lower-left corner.
|
default |
Move assignment.
|
default |
Copy assignment.
|
inlineoverridevirtualnoexcept |
Signed distance function for the axis-aligned box.
| [in] | a_point | Position. |
Implements EBGeometry::SignedDistanceFunction< T >.