Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5038 in orxonox.OLD


Ignore:
Timestamp:
Aug 16, 2005, 6:46:10 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now collision detection enabled again. excluded the cd with the terrain, which took about 33fps :D now the performance is acceptable again

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

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

    r5035 r5038  
    6666void CDEngine::checkCollisions()
    6767{
    68   //this->checkCollisionObjects();
     68  this->checkCollisionObjects();
    6969  this->checkCollisionGround();
    7070}
     
    8484  while( entity1 != NULL)
    8585  {
    86     while( entity2 != NULL)
     86    if( likely(entity1 != this->terrain))
    8787    {
    88       PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName());
    89       tree = entity1->getOBBTree();
    90       if( likely(tree != NULL)) tree->collideWith(entity1, entity2);
    91       entity2 = iterator2->nextElement();
     88      while( entity2 != NULL)
     89      {
     90        if( likely(entity2 != this->terrain))
     91        {
     92          PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName());
     93          tree = entity1->getOBBTree();
     94          if( likely(tree != NULL)) tree->collideWith(entity1, entity2);
     95        }
     96        entity2 = iterator2->nextElement();
     97      }
    9298    }
    9399    entity1 = iterator1->nextElement();
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r5029 r5038  
    628628  if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB))
    629629  {
     630    //PRINTF(0)("collision @ lvl %i, object %s vs %s\n", this->depth, nodeA->getClassName(), nodeB->getClassName());
     631
    630632    /* check if left node overlaps */
    631633    if( likely( this->nodeLeft != NULL))
  • orxonox/trunk/src/story_entities/world.cc

    r5035 r5038  
    926926  {
    927927    if( entity->isVisible() ) entity->draw();
    928     //entity->drawBVTree(2, 226);
     928    entity->drawBVTree(2, 226);
    929929    entity = iterator->nextElement();
    930930  }
Note: See TracChangeset for help on using the changeset viewer.