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::UnionIF< T > Class Template Reference

Implicit function whose interior is the union of all input function interiors. More...

#include <EBGeometry_CSG.hpp>

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

Public Member Functions

 UnionIF ()=delete
 Disallowed, use the full constructor.
 
 UnionIF (const std::vector< std::shared_ptr< ImplicitFunction< T > > > &a_implicitFunctions)
 Constructs the union of the given implicit functions.
 
 ~UnionIF () 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::vector< std::shared_ptr< const ImplicitFunction< T > > > m_implicitFunctions
 Stored implicit functions.
 

Detailed Description

template<class T>
class EBGeometry::UnionIF< T >

Implicit function whose interior is the union of all input function interiors.

A point is inside UnionIF if and only if it is inside at least one stored function. The value at any point is the minimum over all stored functions; a negative value indicates membership in the union.

Template Parameters
TFloating-point precision.

Constructor & Destructor Documentation

◆ UnionIF()

template<class T >
EBGeometry::UnionIF< T >::UnionIF ( const std::vector< std::shared_ptr< ImplicitFunction< T > > > &  a_implicitFunctions)

Constructs the union of the given implicit functions.

Parameters
[in]a_implicitFunctionsList of implicit functions (must be non-empty; no null entries).

Member Function Documentation

◆ value()

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

Evaluates the signed distance at a_point.

Returns the minimum over all stored functions. Negative when inside the union.

Parameters
[in]a_point3D query point.
Returns
Minimum signed distance value among all stored functions.

Implements EBGeometry::ImplicitFunction< T >.


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