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

Quadratic polynomial smooth minimum for blending two signed-distance values. More...

#include <EBGeometry_Blend.hpp>

Public Member Functions

T operator() (const T &a, const T &b, const T &s) const noexcept
 Evaluate the polynomial smooth minimum.
 

Detailed Description

template<class T>
struct EBGeometry::SmoothMinOp< T >

Quadratic polynomial smooth minimum for blending two signed-distance values.

Approximates min(a, b) within the overlap region |a - b| < s; coincides exactly with min(a, b) outside that region. Cheaper to evaluate than ExpMinOp and the default choice for CSG unions. A trivially copyable function object, so it can be stored in a BVHSmoothUnion and evaluated on a device.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ operator()()

template<class T >
T EBGeometry::SmoothMinOp< T >::operator() ( const T &  a,
const T &  b,
const T &  s 
) const
inlinenoexcept

Evaluate the polynomial smooth minimum.

Parameters
[in]aFirst value.
[in]bSecond value.
[in]sSmoothing length (must be > 0). Controls the blend region width.
Returns
Polynomial-blended approximation of min(a, b).

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