IRockyVicinityPair Struct Reference
Last update: 08.07.2024
IRockyVicinityPair Struct Reference
#include <rocky_vicinity_pair_api.hpp>
Public Member Functions | |
ROCKY_FUNCTIONS IRockyParticle | get_home_particle () const |
ROCKY_FUNCTIONS IRockyParticle | get_near_particle () const |
ROCKY_FUNCTIONS IRockyGeometryTriangle | get_near_triangle () const |
ROCKY_FUNCTIONS bool | is_particle_particle () const |
ROCKY_FUNCTIONS bool | is_particle_triangle () const |
ROCKY_FUNCTIONS double | get_distance () const |
ROCKY_FUNCTIONS double | get_squared_distance () const |
Detailed Description
The IRockyVicinityPair
class models the vicinity between two distinct simulation entities (particles or triangles) and provide methods to allow the computation of vicinity conditions depending on the custom model that one is implementing.
Member Function Documentation
◆ get_distance()
ROCKY_FUNCTIONS double IRockyVicinityPair::get_distance | ( | ) | const |
- Returns
- The distance between the centroids of the two entities in the vicinity.
◆ get_home_particle()
ROCKY_FUNCTIONS IRockyParticle IRockyVicinityPair::get_home_particle | ( | ) | const |
- Returns
- An
IRockyParticle
object representing the home particle. This object gives access to several instantaneous properties associated to that particle.
◆ get_near_particle()
ROCKY_FUNCTIONS IRockyParticle IRockyVicinityPair::get_near_particle | ( | ) | const |
- Returns
- An
IRockyParticle
object representing the near particle. This object gives access to several instantaneous properties associated to that particle.
◆ get_near_triangle()
ROCKY_FUNCTIONS IRockyGeometryTriangle IRockyVicinityPair::get_near_triangle | ( | ) | const |
- Returns
- An
IRockyGeometryTriangle
object representing the near triangle. This object gives access to several instantaneous properties associated to that triangle.
◆ get_squared_distance()
ROCKY_FUNCTIONS double IRockyVicinityPair::get_squared_distance | ( | ) | const |
- Attention
- This method performs better than
IRockyVicinityPair
because it don't require a computational costly computation of a square root of the squared distance between entities centroids.
- Returns
- The squared distance between the centroids of the two entities in the vicinity.
◆ is_particle_particle()
ROCKY_FUNCTIONS bool IRockyVicinityPair::is_particle_particle | ( | ) | const |
- Returns
- True if the pair represents a particle-to-particle vicinity, false otherwise.
◆ is_particle_triangle()
ROCKY_FUNCTIONS bool IRockyVicinityPair::is_particle_triangle | ( | ) | const |
- Returns
- True if the pair represents a particle-to-triangle vicinity, false otherwise.