Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5429 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Oct 24, 2005, 7:36:22 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: bounding volumes now toggeable via shell

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r5428 r5429  
    362362  coMat[3][1] = box->covarianceMatrix[2][0]; coMat[3][2] = box->covarianceMatrix[2][1]; coMat[3][3] = box->covarianceMatrix[2][2];
    363363
     364//   OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0];
     365//   OBBTreeNode::coMat[0][1] = box->covarianceMatrix[0][1];
     366//   OBBTreeNode::coMat[0][2] = box->covarianceMatrix[0][2];
     367//
     368//   OBBTreeNode::coMat[1][0] = box->covarianceMatrix[1][0];
     369//   OBBTreeNode::coMat[1][1] = box->covarianceMatrix[1][1];
     370//   OBBTreeNode::coMat[1][3] = box->covarianceMatrix[1][2];
     371//
     372//   OBBTreeNode::coMat[2][0] = box->covarianceMatrix[2][0];
     373//   OBBTreeNode::coMat[2][1] = box->covarianceMatrix[2][1];
     374//   OBBTreeNode::coMat[2][2] = box->covarianceMatrix[2][2];
     375
     376
    364377  /* new jacobi tests */
    365   JacobI(coMat, 3, eigvlMat, eigvMat, rotCount);
     378  JacobI(OBBTreeNode::coMat, 3, eigvlMat, eigvMat, rotCount);
    366379  PRINTF(3)("-- Done Jacobi Decomposition\n");
    367380
  • trunk/src/story_entities/world.cc

    r5406 r5429  
    7676SHELL_COMMAND(speed, World, setSpeed);
    7777SHELL_COMMAND(togglePNodeVisibility, World, togglePNodeVisibility);
     78SHELL_COMMAND(toggleBVVisibility, World, toggleBVVisibility);
    7879
    7980using namespace std;
     
    174175
    175176  this->showPNodes = false;
     177  this->showBV = false;
    176178}
    177179
     
    972974  {
    973975    if( entity->isVisible() ) entity->draw();
    974     //entity->drawBVTree(2, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
     976    if( unlikely( this->showBV)) entity->drawBVTree(3, 226);  // to draw the bounding boxes of the objects at level 2 for debug purp
    975977    entity = iterator->nextElement();
    976978  }
  • trunk/src/story_entities/world.h

    r5389 r5429  
    7777
    7878  void togglePNodeVisibility() { this->showPNodes = !this->showPNodes; };
     79  void toggleBVVisibility() { this->showBV = !this->showBV; };
    7980
    8081 private:
     
    9394  private:
    9495    bool   showPNodes;                  //!< if the PNodes should be visible.
     96    bool   showBV;                      //!< if the Bounding Volumes should be visible.
    9597    Uint32 lastFrame;                   //!< last time of frame
    9698    Uint32 cycle;                       //!< The cycle we are in (starts with 0 and rises with every frame)
Note: See TracChangeset for help on using the changeset viewer.