Changeset 8507 in orxonox.OLD for branches/bsp_model/src/world_entities/world_entity.cc
- Timestamp:
- Jun 15, 2006, 11:34:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/world_entities/world_entity.cc
r8490 r8507 24 24 #include "md3/md3_model.h" 25 25 26 #include "aabb_tree_node.h" 27 26 28 #include "util/loading/resource_manager.h" 27 29 #include "util/loading/load_param.h" … … 60 62 61 63 this->obbTree = NULL; 64 this->aabbNode = NULL; 62 65 this->healthWidget = NULL; 63 66 this->healthMax = 1.0f; … … 240 243 241 244 this->models[modelNumber] = model; 242 243 244 // if (this->model != NULL)245 // this->buildObbTree(4);246 245 } 247 246 … … 257 256 258 257 if (this->models[0] != NULL) 259 {260 258 this->obbTree = new OBBTree(depth, models[0]->getModelInfo(), this); 261 return true;262 }263 259 else 264 260 { … … 267 263 return false; 268 264 } 265 266 267 // create the axis aligned bounding box 268 if( this->aabbNode != NULL) 269 { 270 delete this->aabbNode; 271 this->aabbNode = NULL; 272 } 273 274 if( this->models[0] != NULL) { 275 this->aabbNode = new AABBTreeNode(); 276 this->aabbNode->spawnBVTree(this->models[0]); 277 } 278 return true; 269 279 } 270 280 … … 604 614 this->models[0]->draw(); 605 615 } 616 617 if( this->aabbNode != NULL) 618 this->aabbNode->drawBV(0, DRAW_BV_POLYGON, Vector(1, 0.6, 0.2), true); 619 606 620 glPopMatrix(); 607 621 }
Note: See TracChangeset
for help on using the changeset viewer.