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

Grid-like repetition operation along the axes. More...

#include <UnaryNode.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 Repeat ()=default
 Default constructor.
 
 Repeat (ScalarType s_, Vec3< ScalarType > const &l_)
 Construct a new Repeat 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

ScalarType s {TScalar(1)}
 Uniform repetition spacing.
 
Vec3< ScalarTypel
 Half number of repetitions along each axis.
 

Detailed Description

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

Grid-like repetition operation along the axes.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ Repeat()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::Repeat< TScalar >::Repeat ( ScalarType s_,
Vec3< ScalarType > const & l_ )
inlineexplicit

Construct a new Repeat object.

Parameters
s_Uniform repetition spacing
l_Half number of repetitions along each axis

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
template<class FSdf>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::Repeat< 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 repeated shape

Member Data Documentation

◆ l

template<common::CArithmetic TScalar>
Vec3<ScalarType> pbat::geometry::sdf::Repeat< TScalar >::l
Initial value:
{
TScalar(5),
TScalar(5),
TScalar(5)}

Half number of repetitions along each axis.


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