diff options
author | Aki <please@ignore.pl> | 2022-01-30 17:44:05 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-01-30 17:44:05 +0100 |
commit | c01469dddabe404506ef3a64542e8423f9e11f2c (patch) | |
tree | 740f6e0e0811227a6e40aac51ba48057f1166b41 /Opcode/OPC_PlanesTriOverlap.h | |
parent | 51657e10769faa2617d546a06c42e4c62a19bb50 (diff) | |
download | starshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.zip starshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.tar.gz starshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.tar.bz2 |
Converted Opcode and Ice into unix newlines format
Diffstat (limited to 'Opcode/OPC_PlanesTriOverlap.h')
-rw-r--r-- | Opcode/OPC_PlanesTriOverlap.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/Opcode/OPC_PlanesTriOverlap.h b/Opcode/OPC_PlanesTriOverlap.h index cdd6ff8..17d065d 100644 --- a/Opcode/OPC_PlanesTriOverlap.h +++ b/Opcode/OPC_PlanesTriOverlap.h @@ -1,40 +1,40 @@ -///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Planes-triangle overlap test.
- * \param in_clip_mask [in] bitmask for active planes
- * \return TRUE if triangle overlap planes
- * \warning THIS IS A CONSERVATIVE TEST !! Some triangles will be returned as intersecting, while they're not!
- */
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-inline_ BOOL PlanesCollider::PlanesTriOverlap(udword in_clip_mask)
-{
- // Stats
- mNbVolumePrimTests++;
-
- const IcePlane* p = mPlanes;
- udword Mask = 1;
-
- while(Mask<=in_clip_mask)
- {
- if(in_clip_mask & Mask)
- {
- float d0 = p->Distance(*mVP.Vertex[0]);
- float d1 = p->Distance(*mVP.Vertex[1]);
- float d2 = p->Distance(*mVP.Vertex[2]);
- if(d0>0.0f && d1>0.0f && d2>0.0f) return FALSE;
-// if(!(IR(d0)&SIGN_BITMASK) && !(IR(d1)&SIGN_BITMASK) && !(IR(d2)&SIGN_BITMASK)) return FALSE;
- }
- Mask+=Mask;
- p++;
- }
-/*
- for(udword i=0;i<6;i++)
- {
- float d0 = p[i].Distance(mLeafVerts[0]);
- float d1 = p[i].Distance(mLeafVerts[1]);
- float d2 = p[i].Distance(mLeafVerts[2]);
- if(d0>0.0f && d1>0.0f && d2>0.0f) return false;
- }
-*/
- return TRUE;
-}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * Planes-triangle overlap test. + * \param in_clip_mask [in] bitmask for active planes + * \return TRUE if triangle overlap planes + * \warning THIS IS A CONSERVATIVE TEST !! Some triangles will be returned as intersecting, while they're not! + */ +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +inline_ BOOL PlanesCollider::PlanesTriOverlap(udword in_clip_mask) +{ + // Stats + mNbVolumePrimTests++; + + const IcePlane* p = mPlanes; + udword Mask = 1; + + while(Mask<=in_clip_mask) + { + if(in_clip_mask & Mask) + { + float d0 = p->Distance(*mVP.Vertex[0]); + float d1 = p->Distance(*mVP.Vertex[1]); + float d2 = p->Distance(*mVP.Vertex[2]); + if(d0>0.0f && d1>0.0f && d2>0.0f) return FALSE; +// if(!(IR(d0)&SIGN_BITMASK) && !(IR(d1)&SIGN_BITMASK) && !(IR(d2)&SIGN_BITMASK)) return FALSE; + } + Mask+=Mask; + p++; + } +/* + for(udword i=0;i<6;i++) + { + float d0 = p[i].Distance(mLeafVerts[0]); + float d1 = p[i].Distance(mLeafVerts[1]); + float d2 = p[i].Distance(mLeafVerts[2]); + if(d0>0.0f && d1>0.0f && d2>0.0f) return false; + } +*/ + return TRUE; +} |