|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Signed distance function for a DCEL mesh. Does not use BVHs. More...
#include <EBGeometry_MeshDistanceFunctions.hpp>


Public Types | |
| using | Mesh = EBGeometry::DCEL::MeshT< T, Meta > |
| Alias for DCEL mesh type. | |
Public Member Functions | |
| FlatMeshSDF ()=delete | |
| Disallowed constructor. | |
| FlatMeshSDF (const std::shared_ptr< Mesh > &a_mesh) noexcept | |
| Full constructor. | |
| ~FlatMeshSDF () override=default | |
| Destructor. | |
| FlatMeshSDF (const FlatMeshSDF &a_other)=default | |
| Copy constructor. | |
| FlatMeshSDF & | operator= (const FlatMeshSDF &a_other)=default |
| Copy assignment operator. | |
| FlatMeshSDF (FlatMeshSDF &&a_other) noexcept=default | |
| Move constructor. | |
| FlatMeshSDF & | operator= (FlatMeshSDF &&a_other) noexcept=default |
| Move assignment operator. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept override |
| Compute the signed distance from a_point to the mesh. | |
| const std::shared_ptr< Mesh > | getMesh () const noexcept |
| Get the underlying DCEL mesh. | |
| template<class BV > | |
| BV | computeBoundingVolume () const |
| Compute the axis-aligned bounding volume enclosing the mesh. | |
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 | |
| std::shared_ptr< Mesh > | m_mesh |
| DCEL mesh. | |
Signed distance function for a DCEL mesh. Does not use BVHs.
Iterates over every face of the mesh on every query — O(N) per call. Suitable only for very small meshes or debugging.
|
noexcept |
Full constructor.
| [in] | a_mesh | Input mesh |
|
default |
Copy constructor.
Explicitly defaulted for documentation purposes: FlatMeshSDF's only member (m_mesh) is a shared_ptr, so the implicitly-generated copy is a cheap, correct handle-copy.
| [in] | a_other | Other instance to copy. |
|
defaultnoexcept |
Move constructor.
Explicitly defaulted: the user-declared destructor above would otherwise suppress the implicitly-generated move constructor.
| [in,out] | a_other | Other instance to move from. |
| BV EBGeometry::FlatMeshSDF< T, Meta >::computeBoundingVolume | ( | ) | const |
Compute the axis-aligned bounding volume enclosing the mesh.
| BV | Bounding-volume type to construct (e.g. AABBT<T>). |
|
noexcept |
Get the underlying DCEL mesh.
|
default |
Copy assignment operator.
| [in] | a_other | Other instance to copy. |
|
defaultnoexcept |
Move assignment operator.
| [in,out] | a_other | Other instance to move from. |
|
overridevirtualnoexcept |
Compute the signed distance from a_point to the mesh.
| [in] | a_point | Query point. |
Implements EBGeometry::SignedDistanceFunction< T >.