SOFA API  73d8bb95
Open source framework for multi-physics simuation
sofa::component::collision::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 defaulttype::Vector3 &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 defaulttype::Vector3 &q1, const defaulttype::Vector3 &q2, SReal alarmDist, SReal contactDist, OutputVector *contacts, bool ignore_p1=false, bool ignore_p2=false)
 
static int doCapLineInt (const defaulttype::Vector3 &p1, const defaulttype::Vector3 &p2, SReal cap_rad, const defaulttype::Vector3 &q1, const defaulttype::Vector3 &q2, SReal alarmDist, SReal contactDist, OutputVector *contacts, bool ignore_p1=false, bool ignore_p2=false)
 
static int doIntersectionTrianglePoint (SReal dist2, int flags, const defaulttype::Vector3 &p1, const defaulttype::Vector3 &p2, const defaulttype::Vector3 &p3, const defaulttype::Vector3 &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< defaulttype::Vec< 3, TReal >, defaulttype::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< defaulttype::Vec< 3, TReal >, defaulttype::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< defaulttype::Vec< 3, TReal >, defaulttype::Vec< 3, TReal >, TReal > > &sph, TReal alarmDist, TReal contactDist, OutputVector *contacts)
 
static int projectPointOnTriangle (int flags, const defaulttype::Vector3 &p1, const defaulttype::Vector3 &p2, const defaulttype::Vector3 &p3, defaulttype::Vector3 &to_be_projected)
 
static void triangleBaryCoords (const defaulttype::Vector3 &to_be_projected, const defaulttype::Vector3 &p1, const defaulttype::Vector3 &p2, const defaulttype::Vector3 &p3, SReal &alpha, SReal &beta)
 

Function details

template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( TCapsule< DataTypes > &  cap,
Point pnt,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( TCapsule< DataTypes > &  cap,
Line lin,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( TCapsule< DataTypes > &  cap,
Triangle tri,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static
int sofa::component::collision::MeshIntTool::computeIntersection ( Triangle tri,
OBB obb,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
inlinestatic
int sofa::component::collision::MeshIntTool::computeIntersection ( Triangle tri,
int  flags,
OBB obb,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( TSphere< DataTypes > &  sph,
Point pt,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static
template<class TReal >
static int sofa::component::collision::MeshIntTool::computeIntersection ( TSphere< defaulttype::StdVectorTypes< defaulttype::Vec< 3, TReal >, defaulttype::Vec< 3, TReal >, TReal > > &  sph,
Point pt,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( Line e2,
TSphere< DataTypes > &  e1,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static
template<class TReal >
static int sofa::component::collision::MeshIntTool::computeIntersection ( Line e2,
TSphere< defaulttype::StdVectorTypes< defaulttype::Vec< 3, TReal >, defaulttype::Vec< 3, TReal >, TReal > > &  e1,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::computeIntersection ( Triangle tri,
TSphere< DataTypes > &  sph,
typename DataTypes::Real  alarmDist,
typename DataTypes::Real  contactDist,
OutputVector contacts 
)
static
template<class TReal >
static int sofa::component::collision::MeshIntTool::computeIntersection ( Triangle tri,
TSphere< defaulttype::StdVectorTypes< defaulttype::Vec< 3, TReal >, defaulttype::Vec< 3, TReal >, TReal > > &  sph,
TReal  alarmDist,
TReal  contactDist,
OutputVector contacts 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::doCapLineInt ( TCapsule< DataTypes > &  cap,
const defaulttype::Vector3 &  q1,
const defaulttype::Vector3 &  q2,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts,
bool  ignore_p1 = false,
bool  ignore_p2 = false 
)
static
static int sofa::component::collision::MeshIntTool::doCapLineInt ( const defaulttype::Vector3 &  p1,
const defaulttype::Vector3 &  p2,
SReal  cap_rad,
const defaulttype::Vector3 &  q1,
const defaulttype::Vector3 &  q2,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts,
bool  ignore_p1 = false,
bool  ignore_p2 = false 
)
static
template<class DataTypes >
int sofa::component::collision::MeshIntTool::doCapPointInt ( TCapsule< DataTypes > &  cap,
const defaulttype::Vector3 &  q,
SReal  alarmDist,
SReal  contactDist,
OutputVector contacts 
)
static
int sofa::component::collision::MeshIntTool::doIntersectionTrianglePoint ( SReal  dist2,
int  flags,
const defaulttype::Vector3 &  p1,
const defaulttype::Vector3 &  p2,
const defaulttype::Vector3 &  p3,
const defaulttype::Vector3 &  q,
OutputVector contacts,
bool  swapElems = false 
)
static

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

int sofa::component::collision::MeshIntTool::projectPointOnTriangle ( int  flags,
const defaulttype::Vector3 &  p1,
const defaulttype::Vector3 &  p2,
const defaulttype::Vector3 &  p3,
defaulttype::Vector3 &  to_be_projected 
)
static
void sofa::component::collision::MeshIntTool::triangleBaryCoords ( const defaulttype::Vector3 &  to_be_projected,
const defaulttype::Vector3 &  p1,
const defaulttype::Vector3 &  p2,
const defaulttype::Vector3 &  p3,
SReal &  alpha,
SReal &  beta 
)
static