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

Infinite cylinder. More...

#include <Primitive.h>

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

Public Types

using ScalarType = TScalar
 Scalar type.
 

Public Member Functions

 InfiniteCylinder ()=default
 Default constructor.
 
 InfiniteCylinder (Vec3< ScalarType > const &c_)
 Construct a new Infinite Cylinder object.
 
PBAT_HOST_DEVICE ScalarType Eval (Vec3< ScalarType > const &p) const
 Evaluate the signed distance function at a point.
 

Public Attributes

Vec3< ScalarTypec
 Center of the cylinder (on the axis) in c(0), c(1) and radius in c(2)
 

Detailed Description

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

Infinite cylinder.

Template Parameters
TScalarScalar type

Constructor & Destructor Documentation

◆ InfiniteCylinder()

template<common::CArithmetic TScalar>
pbat::geometry::sdf::InfiniteCylinder< TScalar >::InfiniteCylinder ( Vec3< ScalarType > const & c_)
inlineexplicit

Construct a new Infinite Cylinder object.

Parameters
c_Center of the cylinder (on the axis) in c(0), c(1) and radius in c(2)

Member Function Documentation

◆ Eval()

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

Member Data Documentation

◆ c

template<common::CArithmetic TScalar>
Vec3<ScalarType> pbat::geometry::sdf::InfiniteCylinder< TScalar >::c
Initial value:
{
TScalar(0),
TScalar(0),
TScalar(0.5)}

Center of the cylinder (on the axis) in c(0), c(1) and radius in c(2)


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