SOFA plugin: CollisionOBBCapsule  master
Open source framework for multi-physics simuation
collisionobbcapsule::detection::intersection::IntrUtil< Real > Struct Template Reference

#include <IntrUtility3.h>

Static Public Member Functions

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

◆ ColinearSegments()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::ColinearSegments ( const type::Vec< 3, Real >  segment0[2],
const type::Vec< 3, Real >  segment1[2],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ ColinearSegmentTriangle()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::ColinearSegmentTriangle ( const type::Vec< 3, Real >  segment[2],
const type::Vec< 3, Real >  triangle[3],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ CoplanarRectangleRectangle()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::CoplanarRectangleRectangle ( const type::Vec< 3, Real >  rectangle0[4],
const type::Vec< 3, Real >  rectangle1[4],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ CoplanarSegmentRectangle()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::CoplanarSegmentRectangle ( const type::Vec< 3, Real >  segment[2],
const type::Vec< 3, Real >  rectangle[4],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ CoplanarTriangleRectangle()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::CoplanarTriangleRectangle ( const type::Vec< 3, Real >  triangle[3],
const type::Vec< 3, Real >  rectangle[4],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ equal()

template<typename Real >
bool collisionobbcapsule::detection::intersection::IntrUtil< Real >::equal ( const type::Vec< 3, Real > &  vec0,
const type::Vec< 3, Real > &  vec1 
)
static

◆ faceSegNearestPoints() [1/2]

template<typename Real >
Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::faceSegNearestPoints ( const type::Vec< 3, Real > *  face,
int  n,
const type::Vec< 3, Real >  seg[2],
type::Vec< 3, Real > &  pt_on_face,
type::Vec< 3, Real > &  pt_on_seg 
)
static

◆ faceSegNearestPoints() [2/2]

template<typename Real >
Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::faceSegNearestPoints ( const type::Vec< 3, Real >  face[4],
const type::Vec< 3, Real >  seg[2],
type::Vec< 3, Real > &  pt_on_face,
type::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.

◆ facesNearestPoints()

template<typename Real >
Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::facesNearestPoints ( const type::Vec< 3, Real > *  first_face,
int  first_size,
const type::Vec< 3, Real > *  second_face,
int  second_size,
type::Vec< 3, Real > &  pt_on_first,
type::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.

◆ inf()

template<typename Real >
bool collisionobbcapsule::detection::intersection::IntrUtil< Real >::inf ( Real  a,
Real  b 
)
static

◆ nearestPointOnSeg()

template<typename Real >
type::Vec< 3, Real > collisionobbcapsule::detection::intersection::IntrUtil< Real >::nearestPointOnSeg ( const type::Vec< 3, Real > &  seg0,
const type::Vec< 3, Real > &  seg1,
const type::Vec< 3, Real > &  point 
)
static

◆ nequal()

template<typename Real >
bool collisionobbcapsule::detection::intersection::IntrUtil< Real >::nequal ( Real  a,
Real  b 
)
static

◆ normalize()

template<typename Real >
static void collisionobbcapsule::detection::intersection::IntrUtil< Real >::normalize ( type::Vec< 3, Real > &  vec)
inlinestatic

◆ normalized()

template<typename Real >
static bool collisionobbcapsule::detection::intersection::IntrUtil< Real >::normalized ( const type::Vec< 3, Real > &  vec)
inlinestatic

◆ projectIntPoints()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::projectIntPoints ( const type::Vec< 3, Real > &  velocity,
Real  contactTime,
const type::Vec< 3, Real > *  points,
int  n,
type::Vec< 3, Real > &  proj_pt 
)
static

◆ projectOnTriangle()

template<typename Real >
Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::projectOnTriangle ( type::Vec< 3, Real > &  pt,
const type::Vec< 3, Real > &  t_p0,
const type::Vec< 3, Real > &  t_p1,
const type::Vec< 3, Real > &  t_p2,
Real &  s,
Real &  t 
)
static

◆ projectPointOnCapsuleAndFindCapNormal()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::projectPointOnCapsuleAndFindCapNormal ( const type::Vec< 3, Real > &  pt,
const type::Vec< 3, Real >  segment[2],
Real  radius,
CapIntrConfiguration< Real > &  capCfg,
type::Vec< 3, Real > &  pt_on_capsule 
)
static

◆ SegmentSegment()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::SegmentSegment ( const type::Vec< 3, Real >  segment0[2],
const type::Vec< 3, Real >  segment1[2],
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ SegmentThroughPlane()

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::SegmentThroughPlane ( const type::Vec< 3, Real >  segment[2],
const type::Vec< 3, Real > &  planeOrigin,
const type::Vec< 3, Real > &  planeNormal,
int &  quantity,
type::Vec< 3, Real > *  P 
)
static

◆ segNearestPoints() [1/3]

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::segNearestPoints ( const type::Vec< 3, Real > &  p0,
const type::Vec< 3, Real > &  p1,
const type::Vec< 3, Real > &  q0,
const type::Vec< 3, Real > &  q1,
type::Vec< 3, Real > &  P,
type::Vec< 3, Real > &  Q 
)
static

◆ segNearestPoints() [2/3]

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::segNearestPoints ( const type::Vec< 3, Real > &  p0,
const type::Vec< 3, Real > &  p1,
const type::Vec< 3, Real > &  q0,
const type::Vec< 3, Real > &  q1,
type::Vec< 3, Real > &  P,
type::Vec< 3, Real > &  Q,
SReal &  alpha,
SReal &  beta 
)
static

◆ segNearestPoints() [3/3]

template<typename Real >
void collisionobbcapsule::detection::intersection::IntrUtil< Real >::segNearestPoints ( const type::Vec< 3, Real > *  p,
const type::Vec< 3, Real > *  q,
type::Vec< 3, Real > &  P,
type::Vec< 3, Real > &  Q 
)
static

◆ SQ_ZERO_TOLERANCE()

template<typename Real >
static Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::SQ_ZERO_TOLERANCE ( )
inlinestatic

◆ strInf()

template<typename Real >
bool collisionobbcapsule::detection::intersection::IntrUtil< Real >::strInf ( Real  a,
Real  b 
)
static

◆ ZERO_TOLERANCE()

template<typename Real >
static Real collisionobbcapsule::detection::intersection::IntrUtil< Real >::ZERO_TOLERANCE ( )
inlinestatic