Changeset 4675 in orxonox.OLD for orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
- Timestamp:
- Jun 23, 2005, 11:08:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4673 r4675 26 26 27 27 #include "md2Model.h" 28 #include "model.h" 29 #include "test_entity.h" 28 30 29 31 #include "graphics_engine.h" 30 31 32 32 #include "list.h" 33 34 35 Model* mod; 33 36 MD2Model* model; 34 37 int drawMode; 35 38 int depth; 39 tList<WorldEntity>* entityList; 36 40 37 41 void Framework::moduleInit(int argc, char** argv) … … 42 46 //CDEngine::getInstance()->debug(); 43 47 44 model = new MD2Model("models/tris.md2", "models/tris.pcx"); 45 model->tick(0.1f); 46 47 48 CDEngine::getInstance()->debugSpawnTree(9, model->data->pVertices, model->data->numVertices); 49 50 48 // model = new MD2Model("models/tris.md2", "models/tris.pcx"); 49 // model->tick(0.1f); 50 // CDEngine::getInstance()->debugSpawnTree(9, model->data->pVertices, model->data->numVertices); 51 52 entityList = new tList<WorldEntity>(); 53 54 TestEntity* a = new TestEntity(); 55 56 entityList->add(a); 57 58 59 mod = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN); 60 CDEngine::getInstance()->debugSpawnTree(9, (sVec3D*)mod->getVertexArray(), mod->getVertexArrayCount()); 61 62 /* ligths */ 51 63 LightManager* lightMan = LightManager::getInstance(); 52 64 lightMan->setAmbientColor(.1,.1,.1); … … 56 68 lightMan->setPosition(-30, -30, -30); 57 69 70 /* properties */ 58 71 drawMode = DRAW_MODEL; 59 72 depth = 0; … … 171 184 void Framework::moduleTick(float dt) 172 185 { 186 tIterator<WorldEntity>* iterator = entityList->getIterator(); /* get the iterator - JAVA style */ 187 WorldEntity* entity = iterator->nextElement(); /* this returns the FIRST element */ 188 while( entity != NULL) /* nextElement() will return NULL at the end */ 189 { 190 entity->tick(0.2); 191 entity = iterator->nextElement(); /* give back the next element or NULL if last */ 192 } 193 delete iterator; 194 173 195 } 174 196 … … 180 202 LightManager::getInstance()->draw(); 181 203 204 // tIterator<WorldEntity>* iterator = entityList->getIterator(); /* get the iterator - JAVA style */ 205 // WorldEntity* entity = iterator->nextElement(); /* this returns the FIRST element */ 206 // while( entity != NULL) /* nextElement() will return NULL at the end */ 207 // { 208 // entity->draw(); 209 // entity = iterator->nextElement(); /* give back the next element or NULL if last */ 210 // } 211 // delete iterator; 182 212 //model->draw(); 183 213 }
Note: See TracChangeset
for help on using the changeset viewer.