Changeset 7833 in orxonox.OLD for branches/bsp_model/src/lib/collision_detection
- Timestamp:
- May 24, 2006, 6:41:08 PM (19 years ago)
- Location:
- branches/bsp_model/src/lib/collision_detection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_detection/cd_engine.cc
r6316 r7833 29 29 #include "quadtree_node.h" 30 30 31 31 #include "bsp_manager.h" 32 32 33 33 using namespace std; … … 137 137 * this checks the collisions with the ground 138 138 */ 139 void CDEngine::checkCollisionGround( )139 void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1) 140 140 { 141 141 if( likely( this->terrain != NULL)) 142 142 { 143 143 Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree(); 144 145 144 // QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor()); 146 145 } 147 //sTriangleExt* tri = q->getTriangleFromPosition(this->player->getAbsCoor()); 146 147 if( likely( this->bspManager != NULL)) 148 { 149 std::list<WorldEntity*>::iterator iterator; 150 PRINTF(3)("checking for collisions\n"); 151 152 iterator = list1.begin(); 153 while (iterator != list1.end()) 154 { 155 bspManager->checkCollision(*iterator); 156 iterator++; 157 } 158 } 148 159 } 149 160 -
branches/bsp_model/src/lib/collision_detection/cd_engine.h
r6316 r7833 17 17 class OBBTree; 18 18 class Terrain; 19 class BspManager; 19 20 //class Player; 20 21 … … 50 51 51 52 inline void setTerrain(Terrain* terrain) { this->terrain = terrain; } 53 inline void setBSPModel(BspManager* bspManager) { this->bspManager = bspManager; } 52 54 // inline void setPlayer(Player* player) { this->player = player; } /* only for debug purposes \todo: delete*/ 53 55 … … 56 58 // void checkCollisions(); 57 59 void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2); 58 60 void checkCollisionGround(std::list<WorldEntity*>& list1); 61 59 62 void drawBV(const std::list<WorldEntity*>& drawList ) const; 60 63 void debug(); … … 68 71 69 72 void checkCollisionObjects(); 70 void checkCollisionGround(); 73 71 74 72 75 void debugSpawnTree(int depth, sVec3D* vertices, int numVertices); … … 79 82 80 83 Terrain* terrain; //!< this it a ref to the terrain, serving as a ground for all WE 84 BspManager* bspManager; 81 85 // Player* player; 82 86 };
Note: See TracChangeset
for help on using the changeset viewer.