Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7711 in orxonox.OLD for trunk/src/subprojects


Ignore:
Timestamp:
May 18, 2006, 11:44:21 PM (19 years ago)
Author:
patrick
Message:

trunk: merged the cd branche back to trunk

Location:
trunk/src/subprojects
Files:
4 edited

Legend:

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

    r7157 r7711  
    4848//Terrain* c;
    4949bool animateModel = false;
     50
     51
    5052
    5153void Framework::moduleInit(int argc, char** argv)
     
    7678//   CDEngine::getInstance()->debugSpawnTree(9, (sVec3D*)mod->getVertexArray(), mod->getVertexArrayCount());
    7779
    78 
    79 
    80   entityList = new tList<WorldEntity>();
    81 
    82 //   a = new TestEntity(); a->setName("Clown1");
    83    b = new CollisionTestEntity(); b->setName("Jaeger");
     80   entityList = new tList<WorldEntity>();
     81
    8482   if (argc > 1)
    8583   {
    8684     printf("Loading model %s\n", argv[1]);
    87      b->loadModel(argv[1]);
     85     b = new CollisionTestEntity(argv[1]); b->setName("Jaeger");
    8886   }
    89 //   a = new Terrain();
    90 
     87   else
     88   {
     89     printf("----------------------- WARNING ---------------------\n\n");
     90     printf("no path specified, using default model: models/ships/fighter.obj\n\n");
     91     printf("----------------------- WARNING ---------------------\n");
     92     b = new CollisionTestEntity("models/test/cd_test_0.obj"); b->setName("Jaeger");
     93   }
    9194//   b->setRelCoor(0.0, 0.0, -20.0);
    9295//   b->setRelDir(Quaternion(-M_PI/2.0f, Vector(0.0, 1.0, 0.0)));
    93 
    94   entityList->add(b);
     96   if(b != NULL)
     97     printf("model successfully loaded\n");
     98   entityList->add(b);
     99
     100
     101//   a = new Terrain();
     102
     103
    95104//   entityList->add(b);
    96105
     
    261270      entity->draw();
    262271    entity->drawBVTree(depth, drawMode);
    263     printf("%i, %i\n", depth, drawMode);
     272   // printf("%i, %i\n", depth, drawMode);
    264273    entity = iterator->nextElement();
    265274  }
  • trunk/src/subprojects/collision_detection/collision_test_entity.cc

    r7193 r7711  
    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");
    37   //  this->loadModel("models/ships/figther.obj");
     36  this->loadModel(modelName, 1.0f, 0, 10);
     37/*  this->buildObbTree(0);*/
    3838
    39   this->buildObbTree(10);
    4039}
    4140
     
    8180void CollisionTestEntity::tick (float time) {}
    8281
    83 
  • trunk/src/subprojects/collision_detection/collision_test_entity.h

    r7157 r7711  
    1919
    2020 public:
    21   CollisionTestEntity ();
     21  CollisionTestEntity (const char* modelName);
    2222  CollisionTestEntity (const TiXmlElement* root);
    2323  virtual ~CollisionTestEntity ();
  • trunk/src/subprojects/framework.cc

    r7256 r7711  
    3434  LightManager::getInstance();
    3535
    36   const char* dataPath;
    37   if ((dataPath = Preferences::getInstance()->getString(CONFIG_SECTION_DATA, CONFIG_NAME_DATADIR, ""))!= NULL)
     36  std::string dataPath = //Preferences::getInstance()->getString(CONFIG_SECTION_DATA, CONFIG_NAME_DATADIR, "");
     37      "/home/boenzlip/orxonox/data/trunk/";
     38  printf("%s\n", dataPath.c_str());
     39  if (!dataPath.empty())
    3840  {
    3941    if (!ResourceManager::getInstance()->setDataDir(dataPath))
     
    4850    PRINTF(1)("The DataDirectory %s could not be verified\n" \
    4951        "  Please Change in File %s Section %s Entry %s to a suitable value\n",
    50     ResourceManager::getInstance()->getDataDir(),
     52    ResourceManager::getInstance()->getDataDir().c_str(),
    5153    DEFAULT_CONFIG_FILE,
    5254    CONFIG_SECTION_DATA,
Note: See TracChangeset for help on using the changeset viewer.