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

Vertical capped cylinder shape with height \( h \) and radius \( r \). More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 VerticalCappedCylinder ()=default
 Default constructor.
 
 VerticalCappedCylinder (ScalarType h_, ScalarType r_)
 Construct a new Vertical Capped 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 capped cylinder.
 
ScalarType r {TScalar(0.2)}
 Radius of the capped cylinder.
 

Detailed Description

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

Vertical capped cylinder shape with height \( h \) and radius \( r \).

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ VerticalCappedCylinder()

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

Construct a new Vertical Capped Cylinder object.

Parameters
h_Height of the capped cylinder
r_Radius of the capped cylinder

Member Function Documentation

◆ Eval()

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

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