Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7533 in orxonox.OLD


Ignore:
Timestamp:
May 4, 2006, 2:59:48 PM (18 years ago)
Author:
patrick
Message:

collision: subproject up

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  
    4848//Terrain* c;
    4949bool animateModel = false;
     50
     51
    5052
    5153void Framework::moduleInit(int argc, char** argv)
     
    7880
    7981
    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
    8484   if (argc > 1)
    8585   {
    8686     printf("Loading model %s\n", argv[1]);
    87      b->loadModel(argv[1]);
     87     b = new CollisionTestEntity(argv[1]); b->setName("Jaeger");
    8888   }
    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   }
    9296//   b->setRelCoor(0.0, 0.0, -20.0);
    9397//   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
    96106//   entityList->add(b);
    97107
     
    259269  while( entity != NULL)
    260270  {
    261     if( likely(drawModel))
     271    //if( likely(drawModel))
    262272      entity->draw();
    263273    entity->drawBVTree(depth, drawMode);
  • branches/cd/src/subprojects/collision_detection/collision_test_entity.cc

    r7365 r7533  
    3131 *  creates an environment
    3232*/
    33 CollisionTestEntity::CollisionTestEntity () : WorldEntity()
     33CollisionTestEntity::CollisionTestEntity (const char* modelName) : WorldEntity()
    3434{
    3535  this->init();
    36   this->loadModel("models/ships/reaplow.obj");
     36  this->loadModel(modelName);
    3737  //  this->loadModel("models/ships/figther.obj");
    3838
  • branches/cd/src/subprojects/collision_detection/collision_test_entity.h

    r7157 r7533  
    1919
    2020 public:
    21   CollisionTestEntity ();
     21  CollisionTestEntity (const char* modelName);
    2222  CollisionTestEntity (const TiXmlElement* root);
    2323  virtual ~CollisionTestEntity ();
Note: See TracChangeset for help on using the changeset viewer.