- Timestamp:
- May 20, 2006, 11:24:22 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/cd_engine.cc
r7711 r7739 131 131 132 132 133 void CDEngine::drawBV(const ObjectManager::EntityList& drawList 133 void CDEngine::drawBV(const ObjectManager::EntityList& drawList, int level) const 134 134 { 135 135 ObjectManager::EntityList::const_iterator entity; 136 136 for (entity = drawList.begin(); entity != drawList.end(); entity++) 137 (*entity)->drawBVTree( 3, 226);137 (*entity)->drawBVTree(level, 226); 138 138 } 139 139 -
trunk/src/lib/collision_detection/cd_engine.h
r7713 r7739 53 53 void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2); 54 54 55 void drawBV(const std::list<WorldEntity*>& drawList 55 void drawBV(const std::list<WorldEntity*>& drawList, int level) const; 56 56 void debug(); 57 57 -
trunk/src/story_entities/game_world.cc
r7723 r7739 67 67 ->completionPlugin(0, OrxShell::CompletorStringArray(Playable::playmodeNames, Playable::PlaymodeCount)); 68 68 69 SHELL_COMMAND(togglePNodeVisibility, GameWorld, GameWorld::togglePNodeVisibility);70 SHELL_COMMAND( toggleBVVisibility, GameWorld, GameWorld::toggleBVVisibility);69 SHELL_COMMAND(togglePNodeVisibility, GameWorld, togglePNodeVisibility); 70 SHELL_COMMAND(showBVLevel, GameWorld, toggleBVVisibility); 71 71 72 72 … … 84 84 this->showPNodes = false; 85 85 this->showBV = false; 86 this->showBVLevel = 3; 86 87 87 88 this->dataXML = NULL; … … 484 485 CDEngine* engine = CDEngine::getInstance(); 485 486 for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 486 engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]) );487 engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel); 487 488 } 488 489 … … 533 534 * @brief toggles the bounding volume (BV) visibility 534 535 */ 535 void GameWorld::toggleBVVisibility() 536 { 537 this->showBV = !this->showBV; 536 void GameWorld::toggleBVVisibility(int level) 537 { 538 if( level < 1) 539 this->showBV = false; 540 else 541 { 542 this->showBV = true; 543 this->showBVLevel = level; 544 } 545 538 546 }; 539 547 -
trunk/src/story_entities/game_world.h
r7723 r7739 55 55 56 56 void togglePNodeVisibility(); 57 void toggleBVVisibility( );57 void toggleBVVisibility(int level); 58 58 59 59 inline void setSky(WorldEntity* sky) { this->dataTank->sky = sky; } … … 86 86 bool showPNodes; //!< if the PNodes should be visible. 87 87 bool showBV; //!< if the Bounding Volumes should be visible. 88 int showBVLevel; //!< the depth level of the displayed bounding volumes 88 89 89 90 /* world timing */
Note: See TracChangeset
for help on using the changeset viewer.