- Timestamp:
- May 4, 2006, 2:59:48 PM (19 years ago)
- Location:
- branches/cd/src/subprojects/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/subprojects/collision_detection/collision_detection.cc
r7365 r7533 48 48 //Terrain* c; 49 49 bool animateModel = false; 50 51 50 52 51 53 void Framework::moduleInit(int argc, char** argv) … … 78 80 79 81 80 entityList = new tList<WorldEntity>(); 81 82 // a = new TestEntity(); a->setName("Clown1"); 83 b = new CollisionTestEntity(); b->setName("Jaeger"); 82 entityList = new tList<WorldEntity>(); 83 84 84 if (argc > 1) 85 85 { 86 86 printf("Loading model %s\n", argv[1]); 87 b ->loadModel(argv[1]);87 b = new CollisionTestEntity(argv[1]); b->setName("Jaeger"); 88 88 } 89 90 // a = new Terrain(); 91 89 else 90 { 91 printf("----------------------- WARNING ---------------------\n\n"); 92 printf("no path specified, using default model: models/ships/fighter.obj\n\n"); 93 printf("----------------------- WARNING ---------------------\n"); 94 b = new CollisionTestEntity("models/ships/fighter.obj"); b->setName("Jaeger"); 95 } 92 96 // b->setRelCoor(0.0, 0.0, -20.0); 93 97 // b->setRelDir(Quaternion(-M_PI/2.0f, Vector(0.0, 1.0, 0.0))); 94 95 entityList->add(b); 98 if(b != NULL) 99 printf("model successfully loaded\n"); 100 entityList->add(b); 101 102 103 // a = new Terrain(); 104 105 96 106 // entityList->add(b); 97 107 … … 259 269 while( entity != NULL) 260 270 { 261 if( likely(drawModel))271 //if( likely(drawModel)) 262 272 entity->draw(); 263 273 entity->drawBVTree(depth, drawMode); -
branches/cd/src/subprojects/collision_detection/collision_test_entity.cc
r7365 r7533 31 31 * creates an environment 32 32 */ 33 CollisionTestEntity::CollisionTestEntity ( ) : WorldEntity()33 CollisionTestEntity::CollisionTestEntity (const char* modelName) : WorldEntity() 34 34 { 35 35 this->init(); 36 this->loadModel( "models/ships/reaplow.obj");36 this->loadModel(modelName); 37 37 // this->loadModel("models/ships/figther.obj"); 38 38 -
branches/cd/src/subprojects/collision_detection/collision_test_entity.h
r7157 r7533 19 19 20 20 public: 21 CollisionTestEntity ( );21 CollisionTestEntity (const char* modelName); 22 22 CollisionTestEntity (const TiXmlElement* root); 23 23 virtual ~CollisionTestEntity ();
Note: See TracChangeset
for help on using the changeset viewer.