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

Wave-like bumpiness operation along the axes. More...

#include <UnaryNode.h>

Inheritance diagram for pbat::geometry::sdf::Bump< TScalar >:
pbat::geometry::sdf::UnaryNode

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 Bump ()=default
 Default constructor.
 
 Bump (Vec3< ScalarType > const &f_, Vec3< ScalarType > const &g_)
 Construct a new Bump object.
 
template<class FSdf>
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > const &p, FSdf &&sdf) const
 Evaluate the signed distance function at a point.
 

Public Attributes

Vec3< ScalarTypef {TScalar(1), TScalar(1), TScalar(1)}
 Frequency along each axis.
 
Vec3< ScalarTypeg {TScalar(1), TScalar(1), TScalar(1)}
 Amplitude of the wave displacement.
 

Detailed Description

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

Wave-like bumpiness operation along the axes.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ Bump()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::Bump< TScalar >::Bump ( Vec3< ScalarType > const & f_,
Vec3< ScalarType > const & g_ )
inlineexplicit

Construct a new Bump object.

Parameters
f_Frequency along each axis
g_Amplitude of the wave displacement

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
template<class FSdf>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::Bump< TScalar >::Eval ( Vec3< ScalarType > const & p,
FSdf && sdf ) const
inline

Evaluate the signed distance function at a point.

Template Parameters
FSdfCallable type with signature ScalarType(Vec3<ScalarType> const&)
Parameters
p3 x 1 query point in 3D space
sdfInput SDF
Returns
Signed distance to the wave-displaced shape

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