Changeset 8213 in orxonox.OLD for branches/bsp_model/src/lib/collision_detection
- Timestamp:
- Jun 7, 2006, 9:06:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_detection/cd_engine.cc
r8186 r8213 19 19 #include "obb_tree.h" 20 20 #include "debug.h" 21 22 #include "class_list.h" 21 23 22 24 #include "model.h" … … 97 99 void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1) 98 100 { 99 if( likely( this->terrain != NULL))100 {101 Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree();102 // QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor());103 }104 105 if( likely( this->bspManager != NULL))106 {107 std::list<WorldEntity*>::iterator iterator;108 PRINTF(3)("checking for collisions\n");109 101 110 iterator = list1.begin(); 111 while (iterator != list1.end()) 112 { 113 bspManager->checkCollision(*iterator); 114 iterator++; 115 } 102 std::list<WorldEntity*>::iterator entityIterator; 103 std::list<BaseObject*>::const_iterator bspIterator; 104 const std::list<BaseObject*>* list = ClassList::getList(CL_BSP_MODEL); 105 106 // for all bsp managers check all entities 107 for( bspIterator = list->begin(); bspIterator != list->end(); bspIterator++) { 108 for(entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++) 109 static_cast<BspManager*>(*bspIterator)->checkCollision(*entityIterator); 116 110 } 117 111 }
Note: See TracChangeset
for help on using the changeset viewer.