Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2005, 6:51:31 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the cd now supports rotations in the detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc

    r4707 r4708  
    4444bool drawModel;
    4545
    46 TestEntity* a;
     46Environment* a;
    4747Environment* b;
    4848
     
    6969  entityList = new tList<WorldEntity>();
    7070
    71   a = new TestEntity(); a->setName("Clown1");
    72   //a = new Environment(); a->setName("Clown");
     71  //a = new TestEntity(); a->setName("Clown1");
     72  a = new Environment(); a->setName("Clown");
    7373  b = new Environment(); b->setName("Jaeger");
     74
    7475  b->setRelCoor(0.0, 0.0, -10.0);
     76  b->setRelDir(Quaternion(-M_PI/2.0f, Vector(0.0, 1.0, 0.0)));
    7577
    7678//   TestEntity* c = new TestEntity(); c->setName("Colwn2");
     
    7981  entityList->add(a);
    8082  entityList->add(b);
    81 //   entityList->add(c);
    8283
    8384  CDEngine::getInstance()->setEntityList(entityList);
     
    225226
    226227
    227   tIterator<WorldEntity>* iterator = entityList->getIterator(); /* get the iterator - JAVA style */
    228   WorldEntity* entity = iterator->nextElement();   /* this returns the FIRST element */
    229   while( entity != NULL)                        /* nextElement() will return NULL at the end */
     228  tIterator<WorldEntity>* iterator = entityList->getIterator();
     229  WorldEntity* entity = iterator->nextElement();
     230  while( entity != NULL)
    230231  {
    231232    entity->tick(dt);
    232     entity = iterator->nextElement();       /* give back the next element or NULL if last */
     233    entity = iterator->nextElement();
    233234  }
    234235  delete iterator;
     
    238239void Framework::moduleDraw() const
    239240{
    240   //CDEngine::getInstance()->drawBV(depth, drawMode);
    241 
    242   tIterator<WorldEntity>* iterator = entityList->getIterator(); /* get the iterator - JAVA style */
    243   WorldEntity* entity = iterator->nextElement();   /* this returns the FIRST element */
    244   while( entity != NULL)                        /* nextElement() will return NULL at the end */
     241  tIterator<WorldEntity>* iterator = entityList->getIterator();
     242  WorldEntity* entity = iterator->nextElement();
     243  while( entity != NULL)
    245244  {
    246245    if( likely(drawModel))
    247246    entity->draw();
    248247    entity->drawBVTree(depth, drawMode);
    249     entity = iterator->nextElement();       /* give back the next element or NULL if last */
     248    entity = iterator->nextElement();
    250249  }
    251250  delete iterator;
Note: See TracChangeset for help on using the changeset viewer.