Changeset 8087 in orxonox.OLD for branches/bsp_model/src/lib/collision_detection
- Timestamp:
- Jun 1, 2006, 5:10:54 PM (18 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
r7739 r8087 29 29 #include "quadtree_node.h" 30 30 31 31 #include "bsp_manager.h" 32 32 33 33 using namespace std; … … 95 95 * this checks the collisions with the ground 96 96 */ 97 void CDEngine::checkCollisionGround( )97 void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1) 98 98 { 99 99 if( likely( this->terrain != NULL)) 100 100 { 101 101 Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree(); 102 103 102 // QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor()); 104 103 } 105 //sTriangleExt* tri = q->getTriangleFromPosition(this->player->getAbsCoor()); 104 105 if( likely( this->bspManager != NULL)) 106 { 107 std::list<WorldEntity*>::iterator iterator; 108 PRINTF(3)("checking for collisions\n"); 109 110 iterator = list1.begin(); 111 while (iterator != list1.end()) 112 { 113 bspManager->checkCollision(*iterator); 114 iterator++; 115 } 116 } 106 117 } 107 118 -
branches/bsp_model/src/lib/collision_detection/cd_engine.h
r7739 r8087 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 53 55 void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2); 56 void checkCollisionGround(std::list<WorldEntity*>& list1); 54 57 55 58 void drawBV(const std::list<WorldEntity*>& drawList, int level) const; … … 69 72 70 73 void checkCollisionObjects(); 71 void checkCollisionGround(); 74 72 75 73 76 void debugSpawnTree(int depth, sVec3D* vertices, int numVertices); … … 81 84 82 85 Terrain* terrain; //!< this it a ref to the terrain, serving as a ground for all WE 86 BspManager* bspManager; 83 87 }; 84 88
Note: See TracChangeset
for help on using the changeset viewer.