Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7004 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Feb 3, 2006, 3:03:59 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: togglePNodeVisibility as it can be …. cool :)

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r6992 r7004  
    6969
    7070SHELL_COMMAND(speed, GameWorld, setSpeed);
    71 SHELL_COMMAND(togglePNodeVisibility, GameWorld, togglePNodeVisibility);
    72 SHELL_COMMAND(toggleBVVisibility, GameWorld, toggleBVVisibility);
     71SHELL_COMMAND_STATIC(togglePNodeVisibility, GameWorld, GameWorld::togglePNodeVisibility);
     72SHELL_COMMAND_STATIC(toggleBVVisibility, GameWorld, GameWorld::toggleBVVisibility);
    7373
    7474
     
    379379{
    380380  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
    381   this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
     381      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
    382382  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
    383   this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
     383      this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
    384384
    385385  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
     
    462462}
    463463
     464
     465
     466/**
     467 * @brief toggles the PNode visibility in the world (drawn as boxes)
     468 */
     469void GameWorld::togglePNodeVisibility()
     470{
     471  if (State::getCurrentStoryEntity() != NULL &&
     472      State::getCurrentStoryEntity()->isA(CL_GAME_WORLD))
     473  {
     474    dynamic_cast<GameWorld*>(State::getCurrentStoryEntity())->showPNodes = !dynamic_cast<GameWorld*>(State::getCurrentStoryEntity())->showPNodes;
     475  }
     476  else
     477    PRINTF(2)("The Current Story entity is not a GameWorld\n");
     478};
     479
     480
     481/**
     482 * @brief toggles the bounding volume (BV) visibility
     483*/
     484void GameWorld::toggleBVVisibility()
     485{
     486  if (State::getCurrentStoryEntity() != NULL &&
     487      State::getCurrentStoryEntity()->isA(CL_GAME_WORLD))
     488  {
     489    dynamic_cast<GameWorld*>(State::getCurrentStoryEntity())->showBV = !dynamic_cast<GameWorld*>(State::getCurrentStoryEntity())->showBV;
     490  }
     491  else
     492    PRINTF(2)("The Current Story entity is not a GameWorld\n");
     493};
     494
  • trunk/src/story_entities/game_world.h

    r6992 r7004  
    4848    /**  returns the track path of this world @returns the track path */
    4949
    50     /** toggles the PNode visibility in the world (drawn as boxes) */
    51     void togglePNodeVisibility() { this->showPNodes = !this->showPNodes; };
    52     /** toggles the bounding volume (BV) visibility */
    53     void toggleBVVisibility() { this->showBV = !this->showBV; };
     50    static void togglePNodeVisibility();
     51    static void toggleBVVisibility();
    5452
    5553
  • trunk/src/world_entities/space_ships/turbine_hover.cc

    r7003 r7004  
    275275  this->cameraNode.setAbsCoorSoft(this->getAbsCoor() + Vector(0.0f, 5.0f, 0.0f), 30.0f);
    276276  this->cameraNode.setRelDirSoft(this->getAbsDir(), 30.0f);
    277   this->cameraNode.getAbsDir().debug();
    278277}
    279278
Note: See TracChangeset for help on using the changeset viewer.