|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Abstract representation of a signed distance function. More...
#include <EBGeometry_SignedDistanceFunction.hpp>


Public Member Functions | |
| 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 T | signedDistance (const Vec3T< T > &a_point) const noexcept=0 |
| Pure virtual signed distance function to be implemented by subclasses. | |
| 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. | |
Abstract representation of a signed distance function.
Users can put whatever they like in here, e.g. analytic functions, DCEL meshes, or DCEL meshes stored in a full TreeBVH or a PackedBVH. The signedDistance function must be implemented by the user. When computing it, the user can apply transformation operators (rotations, scaling, translations) by calling transformPoint on the input coordinate.
| T | Floating-point precision. |
|
inlinevirtualnoexcept |
Compute the outward normal using central finite differences.
Approximates the gradient of the signed distance function at a_point using step size a_delta, then normalizes the result.
| [in] | a_point | 3D query point. |
| [in] | a_delta | Finite-difference step size. Must be strictly positive. |
|
pure virtualnoexcept |
Pure virtual signed distance function to be implemented by subclasses.
| [in] | a_point | 3D query point. |
Implemented in EBGeometry::PlaneSDF< T >, EBGeometry::SphereSDF< T >, EBGeometry::BoxSDF< T >, EBGeometry::TorusSDF< T >, EBGeometry::CylinderSDF< T >, EBGeometry::InfiniteCylinderSDF< T >, EBGeometry::CapsuleSDF< T >, EBGeometry::InfiniteConeSDF< T >, EBGeometry::ConeSDF< T >, EBGeometry::RoundedBoxSDF< T >, EBGeometry::PerlinSDF< T >, EBGeometry::RoundedCylinderSDF< T >, EBGeometry::FlatMeshSDF< T, Meta >, EBGeometry::MeshSDF< T, Meta, K >, and EBGeometry::TriMeshSDF< T, Meta, K, W, StoragePolicy >.
|
finalvirtualnoexcept |
Implementation of ImplicitFunction::value; delegates to signedDistance().
| [in] | a_point | 3D query point. |
Implements EBGeometry::ImplicitFunction< T >.