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

Capped torus centered in \( (0,0,0) \) with parameters sc, ra, rb. More...

#include <Primitive.h>

Inheritance diagram for pbat::geometry::sdf::CappedTorus< TScalar >:
pbat::geometry::sdf::Primitive

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 CappedTorus ()=default
 Default constructor.
 
 CappedTorus (Vec2< ScalarType > const &sc_, ScalarType ra_, ScalarType rb_)
 Construct a new Capped Torus object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

Vec2< ScalarTypesc {TScalar(0.833), TScalar(-0.545)}
 Sin/Cos.
 
ScalarType ra {1.0}
 Radius 1.
 
ScalarType rb {0.2}
 Radius 2.
 

Detailed Description

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

Capped torus centered in \( (0,0,0) \) with parameters sc, ra, rb.

Note
I don't know what the parameters mean.
Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ CappedTorus()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::CappedTorus< TScalar >::CappedTorus ( Vec2< ScalarType > const & sc_,
ScalarType ra_,
ScalarType rb_ )
inlineexplicit

Construct a new Capped Torus object.

Parameters
sc_Probably minor+major radius
ra_Unknown
rb_Unknown

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::CappedTorus< TScalar >::Eval ( Vec3< ScalarType > p) const
inline

Evaluate the signed distance function at a point.

Parameters
pPoint in 3D space
Returns
Signed distance to the capped torus (negative inside, positive outside)

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