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::SmoothMaxOp< T > Struct Template Reference

Quadratic polynomial smooth maximum 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 maximum.
 

Detailed Description

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

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

Approximates max(a, b) within the overlap region |a - b| < s; coincides exactly with max(a, b) outside that region. Symmetric counterpart to SmoothMinOp; used for CSG intersections and differences.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ operator()()

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

Evaluate the polynomial smooth maximum.

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

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