Changeset 8569 in orxonox.OLD for branches/terrain/src/lib/graphics/importer/terrain/frustum.h
- Timestamp:
- Jun 18, 2006, 8:26:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/graphics/importer/terrain/frustum.h
r8328 r8569 28 28 29 29 /** 30 * Code borrowed from Lighthouse 3D 30 * Code borrowed from Lighthouse 3D. Its a very good tutorial on culling. 31 31 */ 32 32 class Frustum; … … 64 64 { 65 65 int result = INSIDE; 66 for(int i=0; i < 6; i++) { 66 //for each plane do ... 67 for( int i = 0; i < 6; ++i ) { 67 68 69 // is the positive vertex outside? 68 70 if ( planes[i].distance( _box.vertexP( planes[i].n ) ) < 0 ) 69 71 return OUTSIDE; 70 if ( planes[i].distance( _box.vertexN( planes[i].n) ) < 0 ) 71 result = INTERSECT; 72 // is the negative vertex outside? 73 else if ( planes[i].distance( _box.vertexN( planes[i].n ) ) < 0 ) 74 result = INTERSECT; 72 75 } 73 return result; 76 return result; 74 77 } 75 78 … … 78 81 int result = INSIDE; 79 82 for(int i=0; i < 6; i++) { 80 81 83 if (planes[i].distance( _point ) < 0) 82 84 return OUTSIDE;
Note: See TracChangeset
for help on using the changeset viewer.