EBGeometry  1.0
Public Member Functions | List of all members
ImplicitFunction< T > Class Template Referenceabstract

Abstract representation of an implicit function function (not necessarily signed distance). More...

#include <EBGeometry_ImplicitFunction.hpp>

Inheritance diagram for ImplicitFunction< T >:
Inheritance graph
[legend]

Public Member Functions

 ImplicitFunction ()=default
 Disallowed, use the full constructor.
 
virtual ~ImplicitFunction ()=default
 Destructor (does nothing)
 
virtual T value (const Vec3T< T > &a_point) const noexcept=0
 Value function. Points are outside the object if value > 0.0 and inside if value < 0.0. More...
 
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...
 

Detailed Description

template<class T>
class ImplicitFunction< T >

Abstract representation of an implicit function function (not necessarily signed distance).

The value function must be implemented by subclasses.

Member Function Documentation

◆ approximateBoundingVolumeOctree()

template<class T >
template<class BV >
BV ImplicitFunction< T >::approximateBoundingVolumeOctree ( const Vec3T< T > &  a_initialLowCorner,
const Vec3T< T > &  a_initialHighCorner,
const unsigned int  a_maxTreeDepth,
const T &  a_safety = 0.0 
) const
inlinenoexcept

Compute an approximation to the bounding volume for the implicit surface, using octrees.

This routine will try to compute a bonding using octree subdivision of the implicit function. This routine will characterize a cubic region in space as being 'inside', 'outside', or intersected by computing the value function at the center of the cube. If the value function is larger than the extents of the cube, we assume that there is no intersection inside the cube. The success of this algorithm therefore relies on the implicit function also being a signed distance function, or at the very least not being horrendously far from being an SDF. If octree subdivision fails, this will return the maximally representable bounding volume.

Parameters
[in]a_initialLowCornerInitial low corner.
[in]a_initialHighCornerInitial high corner.
[in]a_maxTreeDepthMaximum permitted octree depth.
[in]a_safetySafety factor when determining intersection. a_safety=1 sets safety factor to cube width, a_safety=2 sets twice the cube width, etc.
Note
The bounding volume type BV MUST have a constructor BV(std::vector<Vec3T<T>>).

◆ operator()()

template<class T >
T ImplicitFunction< T >::operator() ( const Vec3T< T > &  a_point) const
noexcept

Alternative signature for the value function.

Parameters
[in]a_point3D point.

◆ value()

template<class T >
virtual T ImplicitFunction< T >::value ( const Vec3T< T > &  a_point) const
pure virtualnoexcept

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