EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
EBGeometry::DifferenceIF< T > Class Template Reference

Implicit function whose interior is the set difference A \ B. More...

#include <EBGeometry_CSG.hpp>

Inheritance diagram for EBGeometry::DifferenceIF< T >:
Inheritance graph
[legend]
Collaboration diagram for EBGeometry::DifferenceIF< T >:
Collaboration graph
[legend]

Public Member Functions

 DifferenceIF ()=delete
 Disallowed, use the full constructor.
 
 DifferenceIF (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunctionA, const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunctionB) noexcept
 Constructs A \ B from two implicit functions.
 
 DifferenceIF (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunctionA, const std::vector< std::shared_ptr< ImplicitFunction< T > > > &a_implicitFunctionsB) noexcept
 Constructs A \ union(Bs) from A and a list of subtrahends.
 
 ~DifferenceIF () override=default
 Destructor.
 
value (const Vec3T< T > &a_point) const noexcept override
 Evaluates the signed distance at a_point.
 
- Public Member Functions inherited from EBGeometry::ImplicitFunction< T >
 ImplicitFunction ()=default
 Default constructor.
 
virtual ~ImplicitFunction ()=default
 Default destructor.
 
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< ImplicitFunction< T > > m_implicitFunctionA
 Minuend implicit function.
 
std::shared_ptr< ImplicitFunction< T > > m_implicitFunctionB
 Subtrahend implicit function (may wrap a union of multiple subtrahends).
 

Detailed Description

template<class T>
class EBGeometry::DifferenceIF< T >

Implicit function whose interior is the set difference A \ B.

A point is inside DifferenceIF if and only if it is inside A and outside B. The value function returns max(A(x), -B(x)).

Template Parameters
TFloating-point precision.

Constructor & Destructor Documentation

◆ DifferenceIF() [1/2]

template<class T >
EBGeometry::DifferenceIF< T >::DifferenceIF ( const std::shared_ptr< ImplicitFunction< T > > &  a_implicitFunctionA,
const std::shared_ptr< ImplicitFunction< T > > &  a_implicitFunctionB 
)
noexcept

Constructs A \ B from two implicit functions.

Parameters
[in]a_implicitFunctionAMinuend (must not be null).
[in]a_implicitFunctionBSubtrahend (must not be null).

◆ DifferenceIF() [2/2]

template<class T >
EBGeometry::DifferenceIF< T >::DifferenceIF ( const std::shared_ptr< ImplicitFunction< T > > &  a_implicitFunctionA,
const std::vector< std::shared_ptr< ImplicitFunction< T > > > &  a_implicitFunctionsB 
)
noexcept

Constructs A \ union(Bs) from A and a list of subtrahends.

Parameters
[in]a_implicitFunctionAMinuend (must not be null).
[in]a_implicitFunctionsBSubtrahends (must be non-empty; no null entries).

Member Function Documentation

◆ value()

template<class T >
T EBGeometry::DifferenceIF< T >::value ( const Vec3T< T > &  a_point) const
overridevirtualnoexcept

Evaluates the signed distance at a_point.

Returns max(A(x), -B(x)). Negative when inside A and outside B.

Parameters
[in]a_point3D query point.
Returns
Signed distance representing A \ B.

Implements EBGeometry::ImplicitFunction< T >.


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