walberla::mesa_pd::collision_detection::AnalyticContactDetection Class Reference

Detailed Description

Collision detection functor which uses analytic functions.

Calculates and stores contact information between two particles. If a collision was successfully detected by the operator() contactPoint, contactNormal and penetrationDepth contain the contact information. If no collision was detected the values of these variables is undefined!

#include <AnalyticContactDetection.h>

+ Inheritance diagram for walberla::mesa_pd::collision_detection::AnalyticContactDetection:

Public Member Functions

virtual ~AnalyticContactDetection ()=default
 
size_tgetIdx1 ()
 
size_tgetIdx2 ()
 
Vec3getContactPoint ()
 
Vec3getContactNormal ()
 
real_tgetPenetrationDepth ()
 
const size_tgetIdx1 () const
 
const size_tgetIdx2 () const
 
const Vec3getContactPoint () const
 
const Vec3getContactNormal () const
 
const real_tgetPenetrationDepth () const
 
real_tgetContactThreshold ()
 
template<typename GEO1_T , typename GEO2_T , typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const GEO1_T &geo1, const GEO2_T &geo2, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::Sphere &geo1, const data::Sphere &geo2, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::Sphere &s, const data::Box &bx, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::Box &bx, const data::Sphere &s, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::Sphere &s, const data::CylindricalBoundary &cb, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::CylindricalBoundary &cb, const data::Sphere &s, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::Sphere &s, const data::HalfSpace &p, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::HalfSpace &p, const data::Sphere &s, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::HalfSpace &p0, const data::HalfSpace &p1, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::CylindricalBoundary &p0, const data::HalfSpace &p1, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::HalfSpace &p0, const data::CylindricalBoundary &p1, Accessor &ac)
 
template<typename Accessor >
bool operator() (const size_t idx1, const size_t idx2, const data::CylindricalBoundary &p0, const data::CylindricalBoundary &p1, Accessor &ac)
 

Protected Attributes

size_t idx1_ = std::numeric_limits<size_t>::max()
 
size_t idx2_ = std::numeric_limits<size_t>::max()
 
Vec3 contactPoint_ = Vec3()
 
Vec3 contactNormal_ = Vec3()
 
real_t penetrationDepth_ = real_t(0)
 
real_t contactThreshold_ = real_t(0.0)
 

Constructor & Destructor Documentation

◆ ~AnalyticContactDetection()

virtual walberla::mesa_pd::collision_detection::AnalyticContactDetection::~AnalyticContactDetection ( )
virtualdefault

Member Function Documentation

◆ getContactNormal() [1/2]

Vec3& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getContactNormal ( )
inline

◆ getContactNormal() [2/2]

const Vec3& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getContactNormal ( ) const
inline

◆ getContactPoint() [1/2]

Vec3& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getContactPoint ( )
inline

◆ getContactPoint() [2/2]

const Vec3& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getContactPoint ( ) const
inline

◆ getContactThreshold()

real_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getContactThreshold ( )
inline

◆ getIdx1() [1/2]

size_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getIdx1 ( )
inline

◆ getIdx1() [2/2]

const size_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getIdx1 ( ) const
inline

◆ getIdx2() [1/2]

size_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getIdx2 ( )
inline

◆ getIdx2() [2/2]

const size_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getIdx2 ( ) const
inline

◆ getPenetrationDepth() [1/2]

real_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getPenetrationDepth ( )
inline

◆ getPenetrationDepth() [2/2]

const real_t& walberla::mesa_pd::collision_detection::AnalyticContactDetection::getPenetrationDepth ( ) const
inline

◆ operator()() [1/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::Box bx,
const data::Sphere s,
Accessor &  ac 
)
inline

◆ operator()() [2/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::CylindricalBoundary cb,
const data::Sphere s,
Accessor &  ac 
)
inline

◆ operator()() [3/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::CylindricalBoundary p0,
const data::CylindricalBoundary p1,
Accessor &  ac 
)
inline

◆ operator()() [4/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::CylindricalBoundary p0,
const data::HalfSpace p1,
Accessor &  ac 
)
inline

◆ operator()() [5/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::HalfSpace p,
const data::Sphere s,
Accessor &  ac 
)
inline

◆ operator()() [6/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::HalfSpace p0,
const data::CylindricalBoundary p1,
Accessor &  ac 
)
inline

◆ operator()() [7/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::HalfSpace p0,
const data::HalfSpace p1,
Accessor &  ac 
)
inline

◆ operator()() [8/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::Sphere geo1,
const data::Sphere geo2,
Accessor &  ac 
)
inline

◆ operator()() [9/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::Sphere s,
const data::Box bx,
Accessor &  ac 
)
inline

◆ operator()() [10/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::Sphere s,
const data::CylindricalBoundary cb,
Accessor &  ac 
)
inline

◆ operator()() [11/12]

template<typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const data::Sphere s,
const data::HalfSpace p,
Accessor &  ac 
)
inline

◆ operator()() [12/12]

template<typename GEO1_T , typename GEO2_T , typename Accessor >
bool walberla::mesa_pd::collision_detection::AnalyticContactDetection::operator() ( const size_t  idx1,
const size_t  idx2,
const GEO1_T &  geo1,
const GEO2_T &  geo2,
Accessor &  ac 
)
inline

Member Data Documentation

◆ contactNormal_

Vec3 walberla::mesa_pd::collision_detection::AnalyticContactDetection::contactNormal_ = Vec3()
protected

◆ contactPoint_

Vec3 walberla::mesa_pd::collision_detection::AnalyticContactDetection::contactPoint_ = Vec3()
protected

◆ contactThreshold_

real_t walberla::mesa_pd::collision_detection::AnalyticContactDetection::contactThreshold_ = real_t(0.0)
protected

◆ idx1_

size_t walberla::mesa_pd::collision_detection::AnalyticContactDetection::idx1_ = std::numeric_limits<size_t>::max()
protected

◆ idx2_

size_t walberla::mesa_pd::collision_detection::AnalyticContactDetection::idx2_ = std::numeric_limits<size_t>::max()
protected

◆ penetrationDepth_

real_t walberla::mesa_pd::collision_detection::AnalyticContactDetection::penetrationDepth_ = real_t(0)
protected

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