SOFA plugin: CollisionOBBCapsule  master
Open source framework for multi-physics simuation
collisionobbcapsule::detection::intersection::MeshIntTool Class Reference

#include <MeshIntTool.h>

Static Public Member Functions

template<class DataTypes >
static int computeIntersection (TCapsule< DataTypes > &cap, Point &pnt, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int doCapPointInt (TCapsule< DataTypes > &cap, const type::Vec3 &q, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int computeIntersection (TCapsule< DataTypes > &cap, Line &lin, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int doCapLineInt (TCapsule< DataTypes > &cap, const type::Vec3 &q1, const type::Vec3 &q2, SReal alarmDist, SReal contactDist, OutputVector *contacts, bool ignore_p1=false, bool ignore_p2=false)
 
static int doCapLineInt (const type::Vec3 &p1, const type::Vec3 &p2, SReal cap_rad, const type::Vec3 &q1, const type::Vec3 &q2, SReal alarmDist, SReal contactDist, OutputVector *contacts, bool ignore_p1=false, bool ignore_p2=false)
 
static int doIntersectionTrianglePoint (SReal dist2, int flags, const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &q, OutputVector *contacts, bool swapElems=false)
 
template<class DataTypes >
static int computeIntersection (TCapsule< DataTypes > &cap, Triangle &tri, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
static int computeIntersection (Triangle &tri, OBB &obb, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
static int computeIntersection (Triangle &tri, int flags, OBB &obb, SReal alarmDist, SReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int computeIntersection (TSphere< DataTypes > &sph, Point &pt, typename DataTypes::Real alarmDist, typename DataTypes::Real contactDist, OutputVector *contacts)
 
template<class TReal >
static int computeIntersection (TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &sph, Point &pt, TReal alarmDist, TReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int computeIntersection (Line &e2, TSphere< DataTypes > &e1, typename DataTypes::Real alarmDist, typename DataTypes::Real contactDist, OutputVector *contacts)
 
template<class TReal >
static int computeIntersection (Line &e2, TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &e1, TReal alarmDist, TReal contactDist, OutputVector *contacts)
 
template<class DataTypes >
static int computeIntersection (Triangle &tri, TSphere< DataTypes > &sph, typename DataTypes::Real alarmDist, typename DataTypes::Real contactDist, OutputVector *contacts)
 
template<class TReal >
static int computeIntersection (Triangle &tri, TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &sph, TReal alarmDist, TReal contactDist, OutputVector *contacts)
 
static int projectPointOnTriangle (int flags, const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, type::Vec3 &to_be_projected)
 
static void triangleBaryCoords (const type::Vec3 &to_be_projected, const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, SReal &alpha, SReal &beta)
 

Function details

◆ computeIntersection() [1/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Line e2,
TSphere< DataTypes > &  e1,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [2/11]

template<class TReal >
static int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Line e2,
TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &  e1,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [3/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( geometry::TCapsule< DataTypes > &  cap,
Line lin,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [4/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( geometry::TCapsule< DataTypes > &  cap,
Point pnt,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [5/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( geometry::TCapsule< DataTypes > &  cap,
Triangle tri,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [6/11]

int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Triangle tri,
int  flags,
OBB obb,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [7/11]

int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Triangle tri,
OBB obb,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
inlinestatic

◆ computeIntersection() [8/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Triangle tri,
TSphere< DataTypes > &  sph,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [9/11]

template<class TReal >
static int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( Triangle tri,
TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &  sph,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [10/11]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( TSphere< DataTypes > &  sph,
Point pt,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static

◆ computeIntersection() [11/11]

template<class TReal >
static int collisionobbcapsule::detection::intersection::MeshIntTool::computeIntersection ( TSphere< defaulttype::StdVectorTypes< type::Vec< 3, TReal >, type::Vec< 3, TReal >, TReal > > &  sph,
Point pt,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static

◆ doCapLineInt() [1/2]

int collisionobbcapsule::detection::intersection::MeshIntTool::doCapLineInt ( const type::Vec3 p1,
const type::Vec3 p2,
SReal  cap_rad,
const type::Vec3 q1,
const type::Vec3 q2,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts,
bool  ignore_p1 = false,
bool  ignore_p2 = false 
)
static

◆ doCapLineInt() [2/2]

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::doCapLineInt ( geometry::TCapsule< DataTypes > &  cap,
const type::Vec3 q1,
const type::Vec3 q2,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts,
bool  ignore_p1 = false,
bool  ignore_p2 = false 
)
static

◆ doCapPointInt()

template<class DataTypes >
int collisionobbcapsule::detection::intersection::MeshIntTool::doCapPointInt ( geometry::TCapsule< DataTypes > &  cap,
const type::Vec3 q,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static

◆ doIntersectionTrianglePoint()

int collisionobbcapsule::detection::intersection::MeshIntTool::doIntersectionTrianglePoint ( SReal  dist2,
int  flags,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 q,
OutputVector contacts,
bool  swapElems = false 
)
static

!\ CAUTION : uninitialized fields detection->elem and detection->id and detection->value, you have to subtract contactDist, because this function can be used also as doIntersectionTriangleSphere where the contactDist = getContactDist() + sphere_radius

◆ projectPointOnTriangle()

int collisionobbcapsule::detection::intersection::MeshIntTool::projectPointOnTriangle ( int  flags,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
type::Vec3 to_be_projected 
)
static

◆ triangleBaryCoords()

void collisionobbcapsule::detection::intersection::MeshIntTool::triangleBaryCoords ( const type::Vec3 to_be_projected,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
SReal &  alpha,
SReal &  beta 
)
static