ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Shapes::HollowConicalFrustum Class Reference

Conical frustum shape with rounded corners and finite thickness. More...

#include <HollowConicalFrustum.hpp>

+ Inheritance diagram for Shapes::HollowConicalFrustum:
+ Collaboration diagram for Shapes::HollowConicalFrustum:

Public Member Functions

 HollowConicalFrustum (double const r1, double const r2, double const length, double const thickness, int const direction, double const central_angle, std::shared_ptr< Utils::CylindricalTransformationParameters > cyl_transform_params)
 
void set_r1 (double const radius)
 
void set_r2 (double const radius)
 
void set_length (double const length)
 
void set_thickness (double const thickness)
 
void set_direction (int const dir)
 
void set_central_angle (double const central_angle)
 
double radius1 () const
 Get radius 1 perpendicular to axis.
 
double radius2 () const
 Get radius 2 perpendicular to axis.
 
double length () const
 Get length of the frustum (without thickness).
 
double thickness () const
 Get thickness of the frustum.
 
int direction () const
 Get direction.
 
double central_angle () const
 Get central angle.
 
void calculate_dist (const Utils::Vector3d &pos, double &dist, Utils::Vector3d &vec) const override
 Calculate the distance vector and its norm between a given position and the cone.
 
- Public Member Functions inherited from Shapes::Shape
virtual bool is_inside (Utils::Vector3d const &pos) const
 Check whether the given point is inside the shape or not.
 
std::vector< int > rasterize (Utils::Vector3i const &grid_size, double grid_spacing, double grid_offset) const
 Rasterize a shape on a regular grid.
 
virtual ~Shape ()=default
 

Detailed Description

Conical frustum shape with rounded corners and finite thickness.

-------->r1
^ a      \
| x       \
| i        \
| s         \                       *pos
* center     \
|             \
|              \
|               \
|                \
----------------->r2

Definition at line 51 of file shapes/include/shapes/HollowConicalFrustum.hpp.

Constructor & Destructor Documentation

◆ HollowConicalFrustum()

Shapes::HollowConicalFrustum::HollowConicalFrustum ( double const  r1,
double const  r2,
double const  length,
double const  thickness,
int const  direction,
double const  central_angle,
std::shared_ptr< Utils::CylindricalTransformationParameters cyl_transform_params 
)
inline

Member Function Documentation

◆ calculate_dist()

void Shapes::HollowConicalFrustum::calculate_dist ( const Utils::Vector3d pos,
double &  dist,
Utils::Vector3d vec 
) const
overridevirtual

Calculate the distance vector and its norm between a given position and the cone.

Parameters
[in]posPosition for which distance to the cone is calculated.
[out]distDistance between cone and pos.
[out]vecDistance vector (dist = || vec ||).

Implements Shapes::Shape.

Definition at line 28 of file HollowConicalFrustum.cpp.

References Utils::basis_change(), Utils::transform_coordinate_cartesian_to_cylinder(), Utils::transform_coordinate_cylinder_to_cartesian(), and Utils::vector_product().

◆ central_angle()

double Shapes::HollowConicalFrustum::central_angle ( ) const
inline

Get central angle.

Definition at line 82 of file shapes/include/shapes/HollowConicalFrustum.hpp.

Referenced by set_central_angle().

◆ direction()

int Shapes::HollowConicalFrustum::direction ( ) const
inline

Get direction.

Definition at line 80 of file shapes/include/shapes/HollowConicalFrustum.hpp.

◆ length()

double Shapes::HollowConicalFrustum::length ( ) const
inline

Get length of the frustum (without thickness).

Definition at line 76 of file shapes/include/shapes/HollowConicalFrustum.hpp.

Referenced by set_length().

◆ radius1()

double Shapes::HollowConicalFrustum::radius1 ( ) const
inline

Get radius 1 perpendicular to axis.

Definition at line 72 of file shapes/include/shapes/HollowConicalFrustum.hpp.

◆ radius2()

double Shapes::HollowConicalFrustum::radius2 ( ) const
inline

Get radius 2 perpendicular to axis.

Definition at line 74 of file shapes/include/shapes/HollowConicalFrustum.hpp.

◆ set_central_angle()

void Shapes::HollowConicalFrustum::set_central_angle ( double const  central_angle)
inline

Definition at line 67 of file shapes/include/shapes/HollowConicalFrustum.hpp.

References central_angle().

◆ set_direction()

void Shapes::HollowConicalFrustum::set_direction ( int const  dir)
inline

◆ set_length()

void Shapes::HollowConicalFrustum::set_length ( double const  length)
inline

Definition at line 64 of file shapes/include/shapes/HollowConicalFrustum.hpp.

References length().

◆ set_r1()

void Shapes::HollowConicalFrustum::set_r1 ( double const  radius)
inline

◆ set_r2()

void Shapes::HollowConicalFrustum::set_r2 ( double const  radius)
inline

◆ set_thickness()

void Shapes::HollowConicalFrustum::set_thickness ( double const  thickness)
inline

Definition at line 65 of file shapes/include/shapes/HollowConicalFrustum.hpp.

References thickness().

◆ thickness()

double Shapes::HollowConicalFrustum::thickness ( ) const
inline

Get thickness of the frustum.

Definition at line 78 of file shapes/include/shapes/HollowConicalFrustum.hpp.

Referenced by set_thickness().


The documentation for this class was generated from the following files: