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

Cut hollow sphere shape with radius \( r \), cut height \( h \) and thickness \( t \). More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 CutHollowSphere ()=default
 Default constructor.
 
 CutHollowSphere (ScalarType r_, ScalarType h_, ScalarType t_)
 Construct a new Cut Hollow Sphere object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > const &p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

ScalarType r {TScalar(1)}
 Radius of the hollow sphere.
 
ScalarType h {TScalar(0.5)}
 Cut height.
 
ScalarType t {TScalar(0.1)}
 Thickness of the hollow sphere.
 

Detailed Description

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

Cut hollow sphere shape with radius \( r \), cut height \( h \) and thickness \( t \).

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ CutHollowSphere()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::CutHollowSphere< TScalar >::CutHollowSphere ( ScalarType r_,
ScalarType h_,
ScalarType t_ )
inlineexplicit

Construct a new Cut Hollow Sphere object.

Parameters
r_Radius of the hollow sphere
h_Cut height
t_Thickness of the hollow sphere

Member Function Documentation

◆ Eval()

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

Evaluate the signed distance function at a point.

Parameters
pPoint in 3D space
Returns
Signed distance to the cut hollow sphere (negative inside, positive outside)

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