SOFA API  99934cbc
Open source framework for multi-physics simuation
sofa::component::collision::IntrUtil< Real > Struct Template Reference

#include <IntrUtility3.h>

Static Public Member Functions

static Real ZERO_TOLERANCE ()
 
static Real SQ_ZERO_TOLERANCE ()
 
static void normalize (defaulttype::Vec< 3, Real > &vec)
 
static bool normalized (const defaulttype::Vec< 3, Real > &vec)
 
static void ColinearSegments (const defaulttype::Vec< 3, Real > segment0[2], const defaulttype::Vec< 3, Real > segment1[2], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void SegmentThroughPlane (const defaulttype::Vec< 3, Real > segment[2], const defaulttype::Vec< 3, Real > &planeOrigin, const defaulttype::Vec< 3, Real > &planeNormal, int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void SegmentSegment (const defaulttype::Vec< 3, Real > segment0[2], const defaulttype::Vec< 3, Real > segment1[2], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void ColinearSegmentTriangle (const defaulttype::Vec< 3, Real > segment[2], const defaulttype::Vec< 3, Real > triangle[3], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void CoplanarSegmentRectangle (const defaulttype::Vec< 3, Real > segment[2], const defaulttype::Vec< 3, Real > rectangle[4], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void CoplanarTriangleRectangle (const defaulttype::Vec< 3, Real > triangle[3], const defaulttype::Vec< 3, Real > rectangle[4], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void CoplanarRectangleRectangle (const defaulttype::Vec< 3, Real > rectangle0[4], const defaulttype::Vec< 3, Real > rectangle1[4], int &quantity, defaulttype::Vec< 3, Real > *P)
 
static void projectIntPoints (const defaulttype::Vec< 3, Real > &velocity, Real contactTime, const defaulttype::Vec< 3, Real > *points, int n, defaulttype::Vec< 3, Real > &proj_pt)
 
static void projectPointOnCapsuleAndFindCapNormal (const defaulttype::Vec< 3, Real > &pt, const defaulttype::Vec< 3, Real > segment[2], Real radius, CapIntrConfiguration< Real > &capCfg, defaulttype::Vec< 3, Real > &pt_on_capsule)
 
static Real projectOnTriangle (defaulttype::Vec< 3, Real > &pt, const defaulttype::Vec< 3, Real > &t_p0, const defaulttype::Vec< 3, Real > &t_p1, const defaulttype::Vec< 3, Real > &t_p2, Real &s, Real &t)
 
static defaulttype::Vec< 3, RealnearestPointOnSeg (const defaulttype::Vec< 3, Real > &seg0, const defaulttype::Vec< 3, Real > &seg1, const defaulttype::Vec< 3, Real > &point)
 
static void segNearestPoints (const defaulttype::Vec< 3, Real > *p, const defaulttype::Vec< 3, Real > *q, defaulttype::Vec< 3, Real > &P, defaulttype::Vec< 3, Real > &Q)
 
static void segNearestPoints (const defaulttype::Vec< 3, Real > &p0, const defaulttype::Vec< 3, Real > &p1, const defaulttype::Vec< 3, Real > &q0, const defaulttype::Vec< 3, Real > &q1, defaulttype::Vec< 3, Real > &P, defaulttype::Vec< 3, Real > &Q)
 
static void segNearestPoints (const defaulttype::Vec< 3, Real > &p0, const defaulttype::Vec< 3, Real > &p1, const defaulttype::Vec< 3, Real > &q0, const defaulttype::Vec< 3, Real > &q1, defaulttype::Vec< 3, Real > &P, defaulttype::Vec< 3, Real > &Q, SReal &alpha, SReal &beta)
 
static Real facesNearestPoints (const defaulttype::Vec< 3, Real > *first_face, int first_size, const defaulttype::Vec< 3, Real > *second_face, int second_size, defaulttype::Vec< 3, Real > &pt_on_first, defaulttype::Vec< 3, Real > &pt_on_second)
 
static Real faceSegNearestPoints (const defaulttype::Vec< 3, Real > face[4], const defaulttype::Vec< 3, Real > seg[2], defaulttype::Vec< 3, Real > &pt_on_face, defaulttype::Vec< 3, Real > &pt_on_seg)
 
static Real faceSegNearestPoints (const defaulttype::Vec< 3, Real > *face, int n, const defaulttype::Vec< 3, Real > seg[2], defaulttype::Vec< 3, Real > &pt_on_face, defaulttype::Vec< 3, Real > &pt_on_seg)
 
static bool equal (const defaulttype::Vec< 3, Real > &vec0, const defaulttype::Vec< 3, Real > &vec1)
 
static bool nequal (Real a, Real b)
 
static bool strInf (Real a, Real b)
 
static bool inf (Real a, Real b)
 

Function details

template<typename Real >
void sofa::component::collision::IntrUtil< Real >::ColinearSegments ( const defaulttype::Vec< 3, Real segment0[2],
const defaulttype::Vec< 3, Real segment1[2],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::ColinearSegmentTriangle ( const defaulttype::Vec< 3, Real segment[2],
const defaulttype::Vec< 3, Real triangle[3],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::CoplanarRectangleRectangle ( const defaulttype::Vec< 3, Real rectangle0[4],
const defaulttype::Vec< 3, Real rectangle1[4],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::CoplanarSegmentRectangle ( const defaulttype::Vec< 3, Real segment[2],
const defaulttype::Vec< 3, Real rectangle[4],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::CoplanarTriangleRectangle ( const defaulttype::Vec< 3, Real triangle[3],
const defaulttype::Vec< 3, Real rectangle[4],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
bool sofa::component::collision::IntrUtil< Real >::equal ( const defaulttype::Vec< 3, Real > &  vec0,
const defaulttype::Vec< 3, Real > &  vec1 
)
static
template<typename Real >
Real sofa::component::collision::IntrUtil< Real >::faceSegNearestPoints ( const defaulttype::Vec< 3, Real face[4],
const defaulttype::Vec< 3, Real seg[2],
defaulttype::Vec< 3, Real > &  pt_on_face,
defaulttype::Vec< 3, Real > &  pt_on_seg 
)
static

Returns the squared distance between pt_on_face and pt_on_seg. Use only if the face and the segment lay on the same plane.

template<typename Real >
Real sofa::component::collision::IntrUtil< Real >::faceSegNearestPoints ( const defaulttype::Vec< 3, Real > *  face,
int  n,
const defaulttype::Vec< 3, Real seg[2],
defaulttype::Vec< 3, Real > &  pt_on_face,
defaulttype::Vec< 3, Real > &  pt_on_seg 
)
static
template<typename Real >
Real sofa::component::collision::IntrUtil< Real >::facesNearestPoints ( const defaulttype::Vec< 3, Real > *  first_face,
int  first_size,
const defaulttype::Vec< 3, Real > *  second_face,
int  second_size,
defaulttype::Vec< 3, Real > &  pt_on_first,
defaulttype::Vec< 3, Real > &  pt_on_second 
)
static

Returns the squared distance between pt_on_face and pt_on_seg. Use only if the both faces lay on the same plane.

template<typename Real >
bool sofa::component::collision::IntrUtil< Real >::inf ( Real  a,
Real  b 
)
static
template<typename Real >
defaulttype::Vec< 3, Real > sofa::component::collision::IntrUtil< Real >::nearestPointOnSeg ( const defaulttype::Vec< 3, Real > &  seg0,
const defaulttype::Vec< 3, Real > &  seg1,
const defaulttype::Vec< 3, Real > &  point 
)
static
template<typename Real >
bool sofa::component::collision::IntrUtil< Real >::nequal ( Real  a,
Real  b 
)
static
template<typename Real >
static void sofa::component::collision::IntrUtil< Real >::normalize ( defaulttype::Vec< 3, Real > &  vec)
inlinestatic
template<typename Real >
static bool sofa::component::collision::IntrUtil< Real >::normalized ( const defaulttype::Vec< 3, Real > &  vec)
inlinestatic
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::projectIntPoints ( const defaulttype::Vec< 3, Real > &  velocity,
Real  contactTime,
const defaulttype::Vec< 3, Real > *  points,
int  n,
defaulttype::Vec< 3, Real > &  proj_pt 
)
static
template<typename Real >
Real sofa::component::collision::IntrUtil< Real >::projectOnTriangle ( defaulttype::Vec< 3, Real > &  pt,
const defaulttype::Vec< 3, Real > &  t_p0,
const defaulttype::Vec< 3, Real > &  t_p1,
const defaulttype::Vec< 3, Real > &  t_p2,
Real s,
Real t 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::projectPointOnCapsuleAndFindCapNormal ( const defaulttype::Vec< 3, Real > &  pt,
const defaulttype::Vec< 3, Real segment[2],
Real  radius,
CapIntrConfiguration< Real > &  capCfg,
defaulttype::Vec< 3, Real > &  pt_on_capsule 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::SegmentSegment ( const defaulttype::Vec< 3, Real segment0[2],
const defaulttype::Vec< 3, Real segment1[2],
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::SegmentThroughPlane ( const defaulttype::Vec< 3, Real segment[2],
const defaulttype::Vec< 3, Real > &  planeOrigin,
const defaulttype::Vec< 3, Real > &  planeNormal,
int quantity,
defaulttype::Vec< 3, Real > *  P 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::segNearestPoints ( const defaulttype::Vec< 3, Real > *  p,
const defaulttype::Vec< 3, Real > *  q,
defaulttype::Vec< 3, Real > &  P,
defaulttype::Vec< 3, Real > &  Q 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::segNearestPoints ( const defaulttype::Vec< 3, Real > &  p0,
const defaulttype::Vec< 3, Real > &  p1,
const defaulttype::Vec< 3, Real > &  q0,
const defaulttype::Vec< 3, Real > &  q1,
defaulttype::Vec< 3, Real > &  P,
defaulttype::Vec< 3, Real > &  Q 
)
static
template<typename Real >
void sofa::component::collision::IntrUtil< Real >::segNearestPoints ( const defaulttype::Vec< 3, Real > &  p0,
const defaulttype::Vec< 3, Real > &  p1,
const defaulttype::Vec< 3, Real > &  q0,
const defaulttype::Vec< 3, Real > &  q1,
defaulttype::Vec< 3, Real > &  P,
defaulttype::Vec< 3, Real > &  Q,
SReal &  alpha,
SReal &  beta 
)
static
template<typename Real >
static Real sofa::component::collision::IntrUtil< Real >::SQ_ZERO_TOLERANCE ( )
inlinestatic
template<typename Real >
bool sofa::component::collision::IntrUtil< Real >::strInf ( Real  a,
Real  b 
)
static
template<typename Real >
static Real sofa::component::collision::IntrUtil< Real >::ZERO_TOLERANCE ( )
inlinestatic