diff options
author | dan miller | 2007-10-19 05:20:07 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:20:07 +0000 |
commit | fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd (patch) | |
tree | 51bcae7a1b8381a6bf6fd8025a7de1e30fe0045d /libraries/ode-0.9/OPCODE/OPC_PlanesTriOverlap.h | |
parent | resubmitting ode (diff) | |
download | opensim-SC-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.zip opensim-SC-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.gz opensim-SC-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.bz2 opensim-SC-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.xz |
dont ask
Diffstat (limited to '')
-rw-r--r-- | libraries/ode-0.9/OPCODE/OPC_PlanesTriOverlap.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/libraries/ode-0.9/OPCODE/OPC_PlanesTriOverlap.h b/libraries/ode-0.9/OPCODE/OPC_PlanesTriOverlap.h deleted file mode 100644 index 3f9b39f..0000000 --- a/libraries/ode-0.9/OPCODE/OPC_PlanesTriOverlap.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
2 | /** | ||
3 | * Planes-triangle overlap test. | ||
4 | * \param in_clip_mask [in] bitmask for active planes | ||
5 | * \return TRUE if triangle overlap planes | ||
6 | * \warning THIS IS A CONSERVATIVE TEST !! Some triangles will be returned as intersecting, while they're not! | ||
7 | */ | ||
8 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
9 | inline_ BOOL PlanesCollider::PlanesTriOverlap(udword in_clip_mask) | ||
10 | { | ||
11 | // Stats | ||
12 | mNbVolumePrimTests++; | ||
13 | |||
14 | const Plane* p = mPlanes; | ||
15 | udword Mask = 1; | ||
16 | |||
17 | while(Mask<=in_clip_mask) | ||
18 | { | ||
19 | if(in_clip_mask & Mask) | ||
20 | { | ||
21 | float d0 = p->Distance(*mVP.Vertex[0]); | ||
22 | float d1 = p->Distance(*mVP.Vertex[1]); | ||
23 | float d2 = p->Distance(*mVP.Vertex[2]); | ||
24 | if(d0>0.0f && d1>0.0f && d2>0.0f) return FALSE; | ||
25 | // if(!(IR(d0)&SIGN_BITMASK) && !(IR(d1)&SIGN_BITMASK) && !(IR(d2)&SIGN_BITMASK)) return FALSE; | ||
26 | } | ||
27 | Mask+=Mask; | ||
28 | p++; | ||
29 | } | ||
30 | /* | ||
31 | for(udword i=0;i<6;i++) | ||
32 | { | ||
33 | float d0 = p[i].Distance(mLeafVerts[0]); | ||
34 | float d1 = p[i].Distance(mLeafVerts[1]); | ||
35 | float d2 = p[i].Distance(mLeafVerts[2]); | ||
36 | if(d0>0.0f && d1>0.0f && d2>0.0f) return false; | ||
37 | } | ||
38 | */ | ||
39 | return TRUE; | ||
40 | } | ||