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

#include <Union.hpp>

+ Inheritance diagram for Shapes::Union:
+ Collaboration diagram for Shapes::Union:

Public Member Functions

bool contains (std::shared_ptr< Shapes::Shape > const &shape) const noexcept
 
void add (std::shared_ptr< Shapes::Shape > const &shape)
 
void remove (std::shared_ptr< Shapes::Shape > const &shape)
 
void calculate_dist (Utils::Vector3d const &pos, double &dist, Utils::Vector3d &vec) const override
 Calculate the minimum of all distances and the corresponding distance vector for a given position and any contained shape.
 
bool is_inside (Utils::Vector3d const &pos) const override
 
- Public Member Functions inherited from Shapes::Shape
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

Definition at line 34 of file shapes/include/shapes/Union.hpp.

Member Function Documentation

◆ add()

void Shapes::Union::add ( std::shared_ptr< Shapes::Shape > const &  shape)
inline

Definition at line 40 of file shapes/include/shapes/Union.hpp.

◆ calculate_dist()

void Shapes::Union::calculate_dist ( Utils::Vector3d const &  pos,
double &  dist,
Utils::Vector3d vec 
) const
inlineoverridevirtual

Calculate the minimum of all distances and the corresponding distance vector for a given position and any contained shape.

Parameters
[in]posPosition from which to get the nearest distance.
[out]distNearest distance to the shape. Negative if inside the shape, zero if in direct contact with the shape.
[out]vecVector to nearest point on the shape.

Implements Shapes::Shape.

Definition at line 56 of file shapes/include/shapes/Union.hpp.

◆ contains()

bool Shapes::Union::contains ( std::shared_ptr< Shapes::Shape > const &  shape) const
inlinenoexcept

Definition at line 36 of file shapes/include/shapes/Union.hpp.

◆ is_inside()

bool Shapes::Union::is_inside ( Utils::Vector3d const &  pos) const
inlineoverridevirtual

Reimplemented from Shapes::Shape.

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

◆ remove()

void Shapes::Union::remove ( std::shared_ptr< Shapes::Shape > const &  shape)
inline

Definition at line 44 of file shapes/include/shapes/Union.hpp.


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