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

Implicit function that tiles a base function periodically within a finite repetition count. More...

#include <EBGeometry_CSG.hpp>

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

Public Member Functions

 FiniteRepetitionIF ()=delete
 Disallowed, use the full constructor.
 
 FiniteRepetitionIF (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_period, const Vec3T< T > &a_repeatLo, const Vec3T< T > &a_repeatHi) noexcept
 Constructs the periodically tiled implicit function.
 
 ~FiniteRepetitionIF () override=default
 Destructor.
 
value (const Vec3T< T > &a_point) const noexcept override
 Evaluates the signed distance at a_point by folding into the nearest tile.
 
- 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

Vec3T< T > m_period
 Tile period in each coordinate direction.
 
Vec3T< T > m_repeatHi
 Repetition count for increasing coordinate directions.
 
Vec3T< T > m_repeatLo
 Repetition count for decreasing coordinate directions.
 
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
 Base implicit function to tile.
 

Detailed Description

template<class T>
class EBGeometry::FiniteRepetitionIF< T >

Implicit function that tiles a base function periodically within a finite repetition count.

The query point is folded into the nearest tile before evaluating the base function. Outside the repetition range, the nearest boundary tile is evaluated.

Template Parameters
TFloating-point precision.

Constructor & Destructor Documentation

◆ FiniteRepetitionIF()

template<class T >
EBGeometry::FiniteRepetitionIF< T >::FiniteRepetitionIF ( const std::shared_ptr< ImplicitFunction< T > > &  a_implicitFunction,
const Vec3T< T > &  a_period,
const Vec3T< T > &  a_repeatLo,
const Vec3T< T > &  a_repeatHi 
)
noexcept

Constructs the periodically tiled implicit function.

Parameters
[in]a_implicitFunctionBase function to tile (must not be null).
[in]a_periodTile period per coordinate direction (all components must be > 0).
[in]a_repeatLoRepetition count for decreasing coordinates (integer values).
[in]a_repeatHiRepetition count for increasing coordinates (integer values).

Member Function Documentation

◆ value()

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

Evaluates the signed distance at a_point by folding into the nearest tile.

Parameters
[in]a_point3D query point.
Returns
Signed distance from the folded point to the base implicit function.

Implements EBGeometry::ImplicitFunction< T >.


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