Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4735 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
Jun 30, 2005, 12:41:19 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: lights loadable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4730 r4735  
    182182  delete this->nullParent;
    183183  delete this->entities;
    184   delete this->lightMan;
     184  delete LightManager::getInstance();
    185185  delete this->trackManager;
    186186  delete this->particleEngine;
     
    289289  this->particleEngine = ParticleEngine::getInstance();
    290290  this->trackManager = TrackManager::getInstance();
    291   this->lightMan = LightManager::getInstance();
     291  LightManager::getInstance();
    292292  this->nullParent = NullParent::getInstance ();
    293293  this->nullParent->setName ("NullParent");
     
    414414    //////////////////////////////
    415415
     416    LoadParam<LightManager>(root, "LightManager", LightManager::getInstance(), &LightManager::loadParams);
     417
    416418    LoadParam<ParticleEngine>(root, "ParticleEngine", ParticleEngine::getInstance(), &ParticleEngine::loadParams);
    417419    LoadParam<PhysicsEngine>(root, "PhysicsEngine", PhysicsEngine::getInstance(), &PhysicsEngine::loadParams);
     
    451453
    452454
    453   lightMan->setAmbientColor(.1,.1,.1);
    454   lightMan->addLight();
    455   //      lightMan->setAttenuation(1.0, .01, 0.0);
    456   //      lightMan->setDiffuseColor(1,1,1);
    457   //  lightMan->addLight(1);
    458   //  lightMan->setPosition(20, 10, -20);
    459   //  lightMan->setDiffuseColor(0,0,0);
    460   //lightMan->debug();
    461   lightMan->setPosition(-5.0, 50.0, -40.0);
    462   lightMan->addLight();
    463   lightMan->setPosition(100, 80, 60);
     455//   lightMan->setAmbientColor(.1,.1,.1);
     456//   lightMan->addLight();
     457//   //      lightMan->setAttenuation(1.0, .01, 0.0);
     458//   //      lightMan->setDiffuseColor(1,1,1);
     459//   //  lightMan->addLight(1);
     460//   //  lightMan->setPosition(20, 10, -20);
     461//   //  lightMan->setDiffuseColor(0,0,0);
     462//   //lightMan->debug();
     463//   lightMan->setPosition(-5.0, 50.0, -40.0);
     464//   lightMan->addLight();
     465//   lightMan->setPosition(100, 80, 60);
    464466
    465467  //        trackManager->setBindSlave(env);
     
    625627
    626628  // LIGHT initialisation
    627   lightMan->setAmbientColor(.1,.1,.1);
    628   lightMan->addLight();
    629   lightMan->debug();
     629  LightManager::getInstance()->setAmbientColor(.1,.1,.1);
     630  LightManager::getInstance()->addLight();
     631  LightManager::getInstance()->debug();
    630632
    631633  switch(this->debugWorldNr)
     
    639641    case DEBUG_WORLD_0:
    640642      {
    641         lightMan->setPosition(-5.0, 10.0, -40.0);
     643        LightManager::getInstance()->getLight()->setAbsCoor(-5.0, 10.0, -40.0);
    642644
    643645
     
    903905
    904906  TextEngine::getInstance()->draw();
    905   lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
     907  LightManager::getInstance()->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    906908}
    907909
Note: See TracChangeset for help on using the changeset viewer.