Changeset 1629 for code/branches/input/src/orxonox/objects/Skybox.cc
- Timestamp:
- Jun 27, 2008, 8:07:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/orxonox/objects/Skybox.cc
r1505 r1629 54 54 } 55 55 56 void Skybox:: loadParams(TiXmlElement* xmlElem)56 void Skybox::setSkybox(const std::string& skyboxname) 57 57 { 58 if (xmlElem->Attribute("src")) 59 { 60 skyboxSrc_ = xmlElem->Attribute("src"); 61 this->create(); 58 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname); 59 } 62 60 63 COUT(4) << "Loader: Set skybox: "<< skyboxSrc_ << std::endl << std::endl; 64 } 65 } 61 void Skybox::setSkyboxSrc(const std::string& src) 62 { 63 this->skyboxSrc_ = src; 64 } 66 65 67 void Skybox::setSkybox(const std::string& skyboxname)68 {69 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname);70 }71 72 void Skybox::setSkyboxSrc(const std::string& src){73 skyboxSrc_ = src;74 }75 76 66 /** 77 67 @brief XML loading and saving. … … 87 77 create(); 88 78 } 89 90 bool Skybox::create(){ 91 this->setSkybox(skyboxSrc_); 92 return Synchronisable::create(); 79 80 bool Skybox::create() 81 { 82 this->setSkybox(this->skyboxSrc_); 83 return Synchronisable::create(); 93 84 } 94 95 void Skybox::registerAllVariables(){ 96 registerVar(&skyboxSrc_, skyboxSrc_.length()+1 ,network::STRING); 85 86 void Skybox::registerAllVariables() 87 { 88 registerVar(&skyboxSrc_, skyboxSrc_.length()+1 ,network::STRING); 97 89 } 98 90 91 void Skybox::changedVisibility() 92 { 93 BaseObject::changedVisibility(); 94 GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_); 95 } 99 96 }
Note: See TracChangeset
for help on using the changeset viewer.