Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8215 in orxonox.OLD


Ignore:
Timestamp:
Jun 7, 2006, 9:24:25 PM (18 years ago)
Author:
patrick
Message:

bsp: integrated the collision checks

Location:
branches/bsp_model/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/collision_detection/cd_engine.cc

    r8213 r8215  
    9999void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1)
    100100{
    101 
     101  std::list<BaseObject*>::const_iterator bspIterator;
    102102  std::list<WorldEntity*>::iterator entityIterator;
    103   std::list<BaseObject*>::const_iterator bspIterator;
    104   const std::list<BaseObject*>* list = ClassList::getList(CL_BSP_MODEL);
     103  const std::list<BaseObject*>* bspList = ClassList::getList(CL_BSP_MODEL);
     104  if( bspList == NULL)
     105    return;
    105106
    106107  // for all bsp managers check all entities
    107   for( bspIterator = list->begin(); bspIterator != list->end(); bspIterator++) {
     108  for( bspIterator = bspList->begin(); bspIterator != bspList->end(); bspIterator++) {
    108109      for(entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++)
    109110        static_cast<BspManager*>(*bspIterator)->checkCollision(*entityIterator);
     
    122123  PRINT(0)("=  CDEngine: Spawning Tree: Finished\n");
    123124  PRINT(0)("=======================================================\n");
    124 
    125125}
    126126
     
    143143}
    144144
     145
    145146/**
    146147 * this draws the debug spawn tree
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc

    r8213 r8215  
    173173  this->outputFraction = 1.0f;
    174174
    175 #warning not here
    176   this->checkCollision(State::getPlayer()->getPlayable());
    177 
    178 
    179175  if ( viscluster < 0  || ((int *)(this->bspFile->header))[35] == 0 )  //!< if (sizeof(Visdata) == 0)
    180176  {
  • branches/bsp_model/src/story_entities/game_world.cc

    r8190 r8215  
    413413void GameWorld::collisionDetection()
    414414{
     415  // object-object collision detection
    415416  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
    416417      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
     
    425426      this->dataTank->objectManager->getObjectList(OM_COMMON));
    426427
     428  // ground collision detection: BSP Model
     429  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_00));
    427430}
    428431
Note: See TracChangeset for help on using the changeset viewer.