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

Rounded cylinder shape with height \( h \), radius \( \text{ra} \) and rounding radius \( \text{rb} \). More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 RoundedCylinder ()=default
 Default constructor.
 
 RoundedCylinder (ScalarType h_, ScalarType ra_, ScalarType rb_)
 Construct a new Rounded Cylinder object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > const &p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

ScalarType h {TScalar(1)}
 Height of the rounded cylinder.
 
ScalarType ra {TScalar(0.2)}
 Radius of the rounded cylinder.
 
ScalarType rb {TScalar(0.05)}
 Rounding radius at edges.
 

Detailed Description

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

Rounded cylinder shape with height \( h \), radius \( \text{ra} \) and rounding radius \( \text{rb} \).

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ RoundedCylinder()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::RoundedCylinder< TScalar >::RoundedCylinder ( ScalarType h_,
ScalarType ra_,
ScalarType rb_ )
inlineexplicit

Construct a new Rounded Cylinder object.

Parameters
h_Height of the rounded cylinder
ra_Radius of the rounded cylinder
rb_Rounding radius at edges

Member Function Documentation

◆ Eval()

template<common::CArithmetic TScalar>
PBAT_HOST_DEVICE ScalarType pbat::geometry::sdf::RoundedCylinder< 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 rounded cylinder (negative inside, positive outside)

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