Changeset 4708 in orxonox.OLD for orxonox/trunk/src/subprojects/collision_detection
- Timestamp:
- Jun 26, 2005, 6:51:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4707 r4708 44 44 bool drawModel; 45 45 46 TestEntity* a;46 Environment* a; 47 47 Environment* b; 48 48 … … 69 69 entityList = new tList<WorldEntity>(); 70 70 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"); 73 73 b = new Environment(); b->setName("Jaeger"); 74 74 75 b->setRelCoor(0.0, 0.0, -10.0); 76 b->setRelDir(Quaternion(-M_PI/2.0f, Vector(0.0, 1.0, 0.0))); 75 77 76 78 // TestEntity* c = new TestEntity(); c->setName("Colwn2"); … … 79 81 entityList->add(a); 80 82 entityList->add(b); 81 // entityList->add(c);82 83 83 84 CDEngine::getInstance()->setEntityList(entityList); … … 225 226 226 227 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) 230 231 { 231 232 entity->tick(dt); 232 entity = iterator->nextElement(); /* give back the next element or NULL if last */233 entity = iterator->nextElement(); 233 234 } 234 235 delete iterator; … … 238 239 void Framework::moduleDraw() const 239 240 { 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) 245 244 { 246 245 if( likely(drawModel)) 247 246 entity->draw(); 248 247 entity->drawBVTree(depth, drawMode); 249 entity = iterator->nextElement(); /* give back the next element or NULL if last */248 entity = iterator->nextElement(); 250 249 } 251 250 delete iterator;
Note: See TracChangeset
for help on using the changeset viewer.