EBGeometry  1.0
Public Types | Public Member Functions | Protected Attributes | List of all members
FastSmoothUnionIF< T, P, BV, K > Class Template Reference

Implicit function smoothed union using BVHs. More...

#include <EBGeometry_CSG.hpp>

Inheritance diagram for FastSmoothUnionIF< T, P, BV, K >:
Inheritance graph
[legend]
Collaboration diagram for FastSmoothUnionIF< T, P, BV, K >:
Collaboration graph
[legend]

Public Types

using Root = typename EBGeometry::BVH::LinearBVH< T, P, BV, K >
 Alias for linear BVH type.
 
using Node = typename Root::LinearNode
 Alias for linear BVH node.
 
- Public Types inherited from FastUnionIF< T, P, BV, K >
using Root = typename EBGeometry::BVH::LinearBVH< T, P, BV, K >
 Alias for linear BVH type.
 
using Node = typename Root::LinearNode
 Alias for linear BVH node.
 

Public Member Functions

 FastSmoothUnionIF ()=delete
 Disallowed, use the full constructor.
 
 FastSmoothUnionIF (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
 Full constructor - constructs bounding volumes in place. More...
 
virtual ~FastSmoothUnionIF ()=default
 Destructor (does nothing)
 
virtual T value (const Vec3T< T > &a_point) const noexcept override
 Value function. More...
 
- Public Member Functions inherited from FastUnionIF< T, P, BV, K >
 FastUnionIF ()=delete
 Disallowed, use the full constructor.
 
 FastUnionIF (const std::vector< std::pair< std::shared_ptr< const P >, BV >> &a_primsAndBVs) noexcept
 Full constructor - constructs bounding volumes in place. More...
 
 FastUnionIF (const std::vector< std::shared_ptr< P >> &a_primitives, const std::vector< BV > &a_boundingVolumes) noexcept
 Full constructor - constructs bounding volumes in place. More...
 
virtual ~FastUnionIF ()=default
 Destructor (does nothing)
 
const BV & getBoundingVolume () const noexcept
 Get the bounding volume.
 
- Public Member Functions inherited from ImplicitFunction< T >
 ImplicitFunction ()=default
 Disallowed, use the full constructor.
 
virtual ~ImplicitFunction ()=default
 Destructor (does nothing)
 
operator() (const Vec3T< T > &a_point) const noexcept
 Alternative signature for the value function. More...
 
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 noexcept
 Compute an approximation to the bounding volume for the implicit surface, using octrees. More...
 

Protected Attributes

m_smoothLen
 Smoothing length.
 
std::function< T(const T &, const T &, const T &)> m_smoothMin
 Smooth min operator.
 
- Protected Attributes inherited from FastUnionIF< T, P, BV, K >
std::shared_ptr< EBGeometry::BVH::LinearBVH< T, P, BV, K > > m_bvh
 Root node for linearized BVH tree.
 

Additional Inherited Members

- Protected Member Functions inherited from FastUnionIF< T, P, BV, K >
void buildTree (const std::vector< std::pair< std::shared_ptr< const P >, BV >> &a_primsAndBVs, const BVH::Build a_build=BVH::Build::TopDown) noexcept
 Build BVH tree for the input objects. More...
 

Detailed Description

template<class T, class P, class BV, size_t K>
class FastSmoothUnionIF< T, P, BV, K >

Implicit function smoothed union using BVHs.

Note
If the BVH-enabled union is to make sense, the primitives must be distance fields (I think). There's a static_assert to make sure of that.

Constructor & Destructor Documentation

◆ FastSmoothUnionIF()

template<class T , class P , class BV , size_t K>
FastSmoothUnionIF< T, P, BV, K >::FastSmoothUnionIF ( 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

Full constructor - constructs bounding volumes in place.

Parameters
[in]a_distanceFunctionsSigned distance functions.
[in]a_boundingVolumesBounding volumes for the distance fields.
[in]a_smoothLenSmoothing length
[in]a_smoothMinHow to compute the smooth minimum.

Member Function Documentation

◆ value()

template<class T , class P , class BV , size_t K>
virtual T FastSmoothUnionIF< T, P, BV, K >::value ( const Vec3T< T > &  a_point) const
overridevirtualnoexcept

Value function.

Parameters
[in]a_point3D point.

Reimplemented from FastUnionIF< T, P, BV, K >.


The documentation for this class was generated from the following file: