PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::geometry::sdf::SmoothUnion< TScalar > Struct Template Reference

Smooth union operation. More...

#include <BinaryNode.h>

Inheritance diagram for pbat::geometry::sdf::SmoothUnion< TScalar >:
pbat::geometry::sdf::BinaryNode

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 SmoothUnion ()=default
 Default constructor.
 
 SmoothUnion (ScalarType k_)
 Construct a new Smooth Union object.
 
PBAT_HOST_DEVICE ScalarType Eval (ScalarType sd1, ScalarType sd2) const
 Evaluate the signed distance function of the smooth union of two shapes.
 

Public Attributes

ScalarType k {TScalar(0.25)}
 Smoothness factor.
 

Detailed Description

template<common::CArithmetic TScalar>
struct pbat::geometry::sdf::SmoothUnion< TScalar >

Smooth union operation.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ SmoothUnion()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::SmoothUnion< TScalar >::SmoothUnion ( ScalarType k_)
inlineexplicit

Construct a new Smooth Union object.

Parameters
k_Smoothness factor

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::SmoothUnion< TScalar >::Eval ( ScalarType sd1,
ScalarType sd2 ) const
inline

Evaluate the signed distance function of the smooth union of two shapes.

Parameters
sd1Signed distance to the first shape
sd2Signed distance to the second shape
Returns
Signed distance to the smooth union of two shapes

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