Changeset 1999 for GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
- Timestamp:
- 01/20/07 00:14:25 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
r1981 r1999 9 9 #include "Mesh.h" 10 10 #include "Halton.h" 11 #include "Triangle3.h" 12 11 13 12 14 namespace GtpVisibilityPreprocessor { … … 556 558 AxisAlignedBox3::IsInside(const Vector3 &v) const 557 559 { 558 return ! ( v.x < mMin.x||559 v.x > mMax.x||560 v.y < mMin.y||561 v.y > mMax.y||562 v.z < mMin.z||563 v.z > mMax.z);560 return ! ((v.x < mMin.x) || 561 (v.x > mMax.x) || 562 (v.y < mMin.y) || 563 (v.y > mMax.y) || 564 (v.z < mMin.z) || 565 (v.z > mMax.z)); 564 566 } 565 567 #endif … … 2353 2355 } 2354 2356 2357 2358 bool AxisAlignedBox3::Intersects(const Mesh &mesh) const 2359 { 2360 VertexContainer::const_iterator vit, vit_end = mesh.mVertices.end(); 2361 2362 for (vit = mesh.mVertices.begin(); vit != vit_end; ++ vit) 2363 { 2364 if (IsInside(*vit)) 2365 return true; 2366 } 2367 2368 return false; 2369 } 2370 2371 2372 bool AxisAlignedBox3::Intersects(const Triangle3 &tri) const 2373 { 2374 if (IsInside(tri.mVertices[0]) || 2375 IsInside(tri.mVertices[1]) || 2376 IsInside(tri.mVertices[2])) 2377 { 2378 return true; 2379 } 2380 2381 return false; 2382 } 2383 2355 2384 /* 2356 2385 int inline GetIntersection(const float fDst1,
Note: See TracChangeset
for help on using the changeset viewer.