|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
BVH-accelerated smooth union of implicit functions. More...
#include <EBGeometry_CSG.hpp>


Public Types | |
| using | Root = EBGeometry::BVH::PackedBVH< T, P, K > |
| Alias for the flat BVH type. | |
| using | Node = typename Root::Node |
| Alias for a BVH node. | |
Public Member Functions | |
| BVHSmoothUnionIF ()=delete | |
| Disallowed, use the full constructor. | |
| BVHSmoothUnionIF (const std::vector< std::shared_ptr< P > > &a_distanceFunctions, const std::vector< BV > &a_boundingVolumes, const T a_smoothLen, const std::function< T(const T &, const T &, const T &)> a_smoothMin=SmoothMin< T >) noexcept | |
| Constructs the BVH-accelerated smooth union. | |
| ~BVHSmoothUnionIF () override=default | |
| Destructor. | |
| T | value (const Vec3T< T > &a_point) const noexcept override |
| Evaluates the smoothly blended signed distance at a_point using BVH traversal. | |
| const EBGeometry::BoundingVolumes::AABBT< T > & | getBoundingVolume () const noexcept |
| Returns the axis-aligned bounding box enclosing all primitives. | |
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 Member Functions | |
| void | buildTree (const std::vector< std::pair< std::shared_ptr< const P >, BV > > &a_primsAndBVs, const BVH::Build a_build=BVH::Build::SAH) noexcept |
| Builds the internal BVH from primitive/BV pairs. | |
Protected Attributes | |
| std::shared_ptr< EBGeometry::BVH::PackedBVH< T, P, K > > | m_bvh |
| Flat BVH over all input primitives. | |
| T | m_smoothLen |
| Smoothing length. | |
| std::function< T(const T &, const T &, const T &)> | m_smoothMin |
| Smooth-minimum operator. | |
BVH-accelerated smooth union of implicit functions.
Uses the BVH to locate the two nearest primitives and applies a smooth-minimum operator to their values, yielding C1 (or better) blending across nearby surfaces. Query cost is sub-linear in the number of primitives.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| BV | Bounding volume type (e.g. AABBT<T>). |
| K | BVH branching factor. |
|
noexcept |
Constructs the BVH-accelerated smooth union.
| [in] | a_distanceFunctions | Input implicit functions (must be non-empty; no null entries). |
| [in] | a_boundingVolumes | Bounding volumes for each function (same length as a_distanceFunctions). |
| [in] | a_smoothLen | Smoothing length (must be > 0). |
| [in] | a_smoothMin | Smooth-minimum operator; defaults to SmoothMin<T>. |
|
inlineprotectednoexcept |
|
noexcept |
Returns the axis-aligned bounding box enclosing all primitives.
|
overridevirtualnoexcept |
Evaluates the smoothly blended signed distance at a_point using BVH traversal.
Finds the two nearest primitives via BVH and applies the stored smooth-minimum. Negative when inside the smooth union.
| [in] | a_point | 3D query point. |
Implements EBGeometry::ImplicitFunction< T >.