Changeset 7592 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
- Timestamp:
- May 11, 2006, 10:12:37 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r7579 r7592 160 160 // gets bit of visSet 161 161 if( ((visSet) & (1 << (cluster & 7))) != 0 ) { 162 163 // Frustum culling 164 165 Vector dir; 166 dir.x = this->cam.x - State::getCameraTargetNode()->getLastAbsCoor().x; 167 dir.y = this->cam.y - State::getCameraTargetNode()->getLastAbsCoor().y; 168 dir.z = this->cam.z - State::getCameraTargetNode()->getLastAbsCoor().z; 169 const float dist = dir.x*this->cam.x +dir.y*this->cam.y +dir.z*this->cam.z; 170 //if(dist < 0) dist = -dist; 171 const float dMins = dir.x*(float)curLeaf.mins[0] +dir.y*(float)curLeaf.mins[1] +dir.z*(float)curLeaf.mins[2] - dist; 172 const float dMaxs = dir.x*(float)curLeaf.maxs[0] +dir.y*(float)curLeaf.maxs[1] +dir.z*(float)curLeaf.maxs[2] - dist; 173 174 if(dMins < -100.0 && dMaxs < -100.0) 175 { 176 continue; 177 } 178 179 162 180 // Iterate through all faces 163 181 for (int j = 0; j < curLeaf.n_leaffaces ; ++j) {
Note: See TracChangeset
for help on using the changeset viewer.