Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 24, 2005, 6:10:13 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now ready to implement the collision detection algorithm

File:
1 edited

Legend:

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

    r4689 r4694  
    5959  tIterator<WorldEntity>* iterator2 = entityList->getIterator();
    6060  WorldEntity* entity1 = iterator1->nextElement();
    61   WorldEntity* entity2 = iterator2->nextElement();
     61  WorldEntity* entity2 = iterator2->seekElement(entity1);
     62  printf("checking for collisions\n");
    6263  while( entity1 != NULL)
    6364  {
    64     while( entity2 != NULL && entity1 != entity2)
     65    printf("entering l1\n");
     66    while( entity2 != NULL)
    6567    {
     68      printf("entering l2 - checking object %s against %s\n", entity1->getName(), entity2->getName());
    6669      entity1->collideWith(entity2);
    6770      entity2 = iterator2->nextElement();
     71
    6872    }
    6973    entity1 = iterator1->nextElement();
     74    entity2 = iterator2->seekElement(entity1);
     75
    7076  }
    7177  delete iterator1;
    7278  delete iterator2;
    73 
    74 
    7579}
    7680
Note: See TracChangeset for help on using the changeset viewer.