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::Union< TScalar > Struct Template Reference

Union operation. More...

#include <BinaryNode.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

PBAT_HOST_DEVICE ScalarType Eval (ScalarType sd1, ScalarType sd2) const
 Evaluate the signed distance function of the union of two shapes.
 

Detailed Description

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

Union operation.

Template Parameters
TScalarScalar type

Member Function Documentation

◆ Eval()

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

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

Note
The union (as minimum) of 2 SDFs is not necessarily an SDF, especially as we go deeper in the interior of the union.
Parameters
sd1Signed distance to the first shape
sd2Signed distance to the second shape
Returns
Signed distance to the union of two shapes

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