|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
BVH-accelerated 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 | |
| BVHUnionIF ()=delete | |
| Disallowed, use the full constructor. | |
| BVHUnionIF (const std::vector< std::pair< std::shared_ptr< const P >, BV > > &a_primsAndBVs) | |
| Constructs the BVH-accelerated union from pre-paired primitives and bounding volumes. | |
| BVHUnionIF (const std::vector< std::shared_ptr< P > > &a_primitives, const std::vector< BV > &a_boundingVolumes) | |
| Constructs the BVH-accelerated union from separate primitive and bounding-volume lists. | |
| ~BVHUnionIF () override=default | |
| Destructor. | |
| T | value (const Vec3T< T > &a_point) const noexcept override |
| Evaluates the 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. | |
BVH-accelerated union of implicit functions.
Wraps a PackedBVH over the input primitives. At query time the BVH culls primitives whose bounding volume lies further than the current best distance, giving sub-linear cost on large scenes. Interior semantics are identical to UnionIF.
| T | Floating-point precision. |
| P | Primitive type; must derive from ImplicitFunction<T>. |
| BV | Bounding volume type (e.g. AABBT<T>). |
| K | BVH branching factor. |
| EBGeometry::BVHUnionIF< T, P, BV, K >::BVHUnionIF | ( | const std::vector< std::pair< std::shared_ptr< const P >, BV > > & | a_primsAndBVs | ) |
Constructs the BVH-accelerated union from pre-paired primitives and bounding volumes.
| [in] | a_primsAndBVs | Primitives and their bounding volumes (must be non-empty; no null primitives). |
| EBGeometry::BVHUnionIF< T, P, BV, K >::BVHUnionIF | ( | const std::vector< std::shared_ptr< P > > & | a_primitives, |
| const std::vector< BV > & | a_boundingVolumes | ||
| ) |
Constructs the BVH-accelerated union from separate primitive and bounding-volume lists.
| [in] | a_primitives | Input primitives (must be non-empty; same length as a_boundingVolumes; no nulls). |
| [in] | a_boundingVolumes | Bounding volumes for each primitive. |
|
inlineprotectednoexcept |
|
noexcept |
Returns the axis-aligned bounding box enclosing all primitives.
|
overridevirtualnoexcept |
Evaluates the signed distance at a_point using BVH traversal.
Returns the minimum value over all primitives not pruned by the BVH. Negative when inside the union.
| [in] | a_point | 3D query point. |
Implements EBGeometry::ImplicitFunction< T >.