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

Vertical round cone shape with height \( h \), radii \( \text{r}^1, \text{r}^2 \) at endpoints. More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 VerticalRoundCone ()=default
 Default constructor.
 
 VerticalRoundCone (ScalarType h_, ScalarType r1_, ScalarType r2_)
 Construct a new Vertical Round Cone 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 round cone.
 
ScalarType r1 {TScalar(0.2)}
 Radius at the bottom of the round cone.
 
ScalarType r2 {TScalar(0.4)}
 Radius at the top of the round cone.
 

Detailed Description

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

Vertical round cone shape with height \( h \), radii \( \text{r}^1, \text{r}^2 \) at endpoints.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ VerticalRoundCone()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::VerticalRoundCone< TScalar >::VerticalRoundCone ( ScalarType h_,
ScalarType r1_,
ScalarType r2_ )
inlineexplicit

Construct a new Vertical Round Cone object.

Parameters
h_Height of the round cone
r1_Radius at the bottom of the round cone
r2_Radius at the top of the round cone

Member Function Documentation

◆ Eval()

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

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