|
| AABBTreeCollider () |
|
virtual | ~AABBTreeCollider () |
|
bool | Collide (BVTCache &cache, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null) |
|
bool | Collide (const AABBCollisionTree *tree0, const AABBCollisionTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBNoLeafTree *tree0, const AABBNoLeafTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBQuantizedTree *tree0, const AABBQuantizedTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBQuantizedNoLeafTree *tree0, const AABBQuantizedNoLeafTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
inline_ void | SetFullBoxBoxTest (bool flag) |
|
void | SetFullPrimBoxTest (bool flag) |
|
inline_ udword | GetNbBVBVTests () const |
|
inline_ udword | GetNbPrimPrimTests () const |
|
inline_ udword | GetNbBVPrimTests () const |
|
inline_ udword | GetNbPairs () const |
|
inline_ const Pair * | GetPairs () const |
|
| override (Collider) const char *ValidateSettings() |
|
| Collider () |
|
virtual | ~Collider () |
|
inline_ BOOL | GetContactStatus () const |
|
inline_ BOOL | FirstContactEnabled () const |
|
inline_ BOOL | TemporalCoherenceEnabled () const |
|
inline_ BOOL | ContactFound () const |
|
inline_ BOOL | TemporalHit () const |
|
inline_ BOOL | SkipPrimitiveTests () const |
|
inline_ void | SetFirstContact (bool flag) |
|
inline_ void | SetTemporalCoherence (bool flag) |
|
inline_ void | SetPrimitiveTests (bool flag) |
|
virtual const char * | ValidateSettings ()=0 |
|
|
void | _Collide (const AABBCollisionNode *b0, const AABBCollisionNode *b1) |
|
void | _Collide (const AABBQuantizedNode *b0, const AABBQuantizedNode *b1, const Point &a, const Point &Pa, const Point &b, const Point &Pb) |
|
void | _CollideTriBox (const AABBNoLeafNode *b) |
|
void | _CollideBoxTri (const AABBNoLeafNode *b) |
|
void | _Collide (const AABBNoLeafNode *a, const AABBNoLeafNode *b) |
|
void | _CollideTriBox (const AABBQuantizedNoLeafNode *b) |
|
void | _CollideBoxTri (const AABBQuantizedNoLeafNode *b) |
|
void | _Collide (const AABBQuantizedNoLeafNode *a, const AABBQuantizedNoLeafNode *b) |
|
void | PrimTest (udword id0, udword id1) |
|
inline_ void | PrimTestTriIndex (udword id1) |
|
inline_ void | PrimTestIndexTri (udword id0) |
|
inline_ bool | BoxBoxOverlap (const Point &ea, const Point &ca, const Point &eb, const Point &cb) |
|
inline_ bool | TriBoxOverlap (const Point ¢er, const Point &extents) |
|
inline_ bool | TriTriOverlap (const Point &V0, const Point &V1, const Point &V2, const Point &U0, const Point &U1, const Point &U2) |
|
void | InitQuery (const Matrix4x4 *world0=null, const Matrix4x4 *world1=null) |
|
bool | CheckTemporalCoherence (Pair *cache) |
|
inline_ bool | Setup (const MeshInterface *mi0, const MeshInterface *mi1) |
|
inline_ BOOL | Setup (const BaseModel *model) |
|
virtual inline_ void | InitQuery () |
|
Contains an AABB tree collider. This class performs a collision test between two AABB trees.
- Author
- Pierre Terdiman
- Version
- 1.3
- Date
- March, 20, 2001
Definition at line 69 of file OPC_TreeCollider.h.
Triangle/triangle intersection test routine, by Tomas Moller, 1997. See article "A Fast Triangle-Triangle Intersection Test", Journal of Graphics Tools, 2(2), 1997
Updated June 1999: removed the divisions – a little faster now! Updated October 1999: added {} to CROSS and SUB macros
int NoDivTriTriIsect(float V0[3],float V1[3],float V2[3], float U0[3],float U1[3],float U2[3])
- Parameters
-
V0 | [in] triangle 0, vertex 0 |
V1 | [in] triangle 0, vertex 1 |
V2 | [in] triangle 0, vertex 2 |
U0 | [in] triangle 1, vertex 0 |
U1 | [in] triangle 1, vertex 1 |
U2 | [in] triangle 1, vertex 2 |
- Returns
- true if triangles overlap
Definition at line 179 of file OPC_TriTriOverlap.h.
187 const Point N1 = E1 ^ E2;
188 const float d1 =-N1 | V0;
192 float du0 = (N1|U0) + d1;
193 float du1 = (N1|U1) + d1;
194 float du2 = (N1|U2) + d1;
197 #ifdef OPC_TRITRI_EPSILON_TEST
202 const float du0du1 = du0 * du1;
203 const float du0du2 = du0 * du2;
205 if(du0du1>0.0f && du0du2>0.0f)
211 const Point N2 = E1 ^ E2;
212 const float d2=-N2 | U0;
216 float dv0 = (N2|V0) + d2;
217 float dv1 = (N2|V1) + d2;
218 float dv2 = (N2|V2) + d2;
220 #ifdef OPC_TRITRI_EPSILON_TEST
226 const float dv0dv1 = dv0 * dv1;
227 const float dv0dv2 = dv0 * dv2;
229 if(dv0dv1>0.0f && dv0dv2>0.0f)
233 const Point D = N1^N2;
236 float max=fabsf(D[0]);
238 float bb=fabsf(D[1]);
239 float cc=fabsf(D[2]);
240 if(bb>max) max=bb,index=1;
241 if(cc>max) max=cc,index=2;
244 const float vp0 = V0[
index];
245 const float vp1 = V1[
index];
246 const float vp2 = V2[
index];
248 const float up0 = U0[
index];
249 const float up1 = U1[
index];
250 const float up2 = U2[
index];
254 NEWCOMPUTE_INTERVALS(vp0,vp1,vp2,dv0,dv1,dv2,dv0dv1,dv0dv2,a,b,c,x0,x1);
258 NEWCOMPUTE_INTERVALS(up0,up1,up2,du0,du1,du2,du0du1,du0du2,d,e,f,y0,y1);
260 const float xx=x0*x1;
261 const float yy=y0*y1;
262 const float xxyy=xx*yy;
264 float isect1[2], isect2[2];
267 isect1[0]=tmp+b*x1*yy;
268 isect1[1]=tmp+c*x0*yy;
271 isect2[0]=tmp+e*xx*y1;
272 isect2[1]=tmp+f*xx*y0;
274 SORT(isect1[0],isect1[1]);
275 SORT(isect2[0],isect2[1]);
277 if(isect1[1]<isect2[0] || isect2[1]<isect1[0])
return FALSE;