Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4918 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Jul 21, 2005, 12:37:46 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the CDEngine now knows the terrain

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/cd_engine.cc

    r4907 r4918  
    6161void CDEngine::checkCollisions()
    6262{
    63   this->checkCollisionObjects();
     63  //this->checkCollisionObjects();
    6464  this->checkCollisionGround();
    6565}
  • orxonox/trunk/src/lib/collision_detection/cd_engine.h

    r4836 r4918  
    1515class WorldEntity;
    1616class OBBTree;
     17class Terrain;
    1718
    1819
     
    4546
    4647  inline void setEntityList(tList<WorldEntity>* entityList) { this->entityList = entityList; }
     48  inline void setTerrain(Terrain* terrain) { this->terrain = terrain; }
    4749
    4850  void drawBV(int depth, int drawMode) const;
     
    6870  tList<WorldEntity>*     entityList;                       //!< pointer to the world entity list
    6971  OBBTree*                rootTree;                         //!< for testing purposes a root tree
     72
     73  Terrain*                terrain;                          //!< this it a ref to the terrain, serving as a ground for all WE
    7074};
    7175
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4914 r4918  
    362362void QuadtreeNode::drawTree(int depth, int drawMode) const
    363363{
    364   printf("this = %p\n", this);
    365364  if( this->treeDepth == this->maxDepth)
    366365  {
  • orxonox/trunk/src/story_entities/world.cc

    r4917 r4918  
    276276
    277277  GraphicsEngine::getInstance()->displayFPS(true);
     278
     279  CDEngine::getInstance()->setEntityList( this->entities);
    278280}
    279281
     
    377379          if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
    378380          if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky = (SkyBox*) created;
    379           if( element->Value() != NULL && !strcmp( element->Value(), "Terrain")) terrain = (Terrain*) created;
     381          if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
     382          {
     383            terrain = (Terrain*) created;
     384            CDEngine::getInstance()->setTerrain(terrain);
     385          }
    380386          element = element->NextSiblingElement();
    381387          glmis->step(); //! @todo temporary
     
    949955void World::collide()
    950956{
    951 
     957  CDEngine::getInstance()->checkCollisions();
    952958}
    953959
Note: See TracChangeset for help on using the changeset viewer.