Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5027 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Aug 15, 2005, 8:44:44 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: object-object collision detection enabled. there is no feedback jet

Location:
orxonox/trunk/src/lib/collision_detection
Files:
2 edited

Legend:

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

    r5026 r5027  
    7676void CDEngine::checkCollisionObjects()
    7777{
     78  BVTree* tree;
    7879  tIterator<WorldEntity>* iterator1 = entityList->getIterator();
    7980  tIterator<WorldEntity>* iterator2 = entityList->getIterator();
     
    8687    {
    8788      PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName());
    88       //entity1->getOBBTree()->collideWith(entity1, entity2);
     89      tree = entity1->getOBBTree();
     90      if( likely(tree != NULL)) tree->collideWith(entity1, entity2);
    8991      entity2 = iterator2->nextElement();
    9092    }
  • orxonox/trunk/src/lib/collision_detection/obb_tree.cc

    r5026 r5027  
    112112void OBBTree::collideWith(WorldEntity* entity1, WorldEntity* entity2)
    113113{
    114   this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), (PNode*)entity1, (PNode*)entity2);
     114  if( likely(entity2->getOBBTree() != NULL) )
     115    this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), (PNode*)entity1, (PNode*)entity2);
    115116}
    116117
Note: See TracChangeset for help on using the changeset viewer.