|
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. | |
| 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 |
| Signed distance function for the axis-aligned box. | |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| The shape's axis-aligned bounding box. | |
Static Public Attributes | |
| static constexpr DistanceQuality | distanceQuality = DistanceQuality::Exact |
| How far signedDistance() can be trusted as a distance: the Euclidean distance to the surface. | |
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 |
The shape's axis-aligned bounding box.
The box itself.
|
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.
|
inlinenoexcept |
Signed distance function for the axis-aligned box.
| [in] | a_point | Position. |