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>
Public Member Functions | |
virtual | ~AnalyticContactDetection ()=default |
size_t & | getIdx1 () |
size_t & | getIdx2 () |
Vec3 & | getContactPoint () |
Vec3 & | getContactNormal () |
real_t & | getPenetrationDepth () |
const size_t & | getIdx1 () const |
const size_t & | getIdx2 () const |
const Vec3 & | getContactPoint () const |
const Vec3 & | getContactNormal () const |
const real_t & | getPenetrationDepth () const |
real_t & | getContactThreshold () |
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) |
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |