Changeset 871 for code/trunk/src/orxonox/objects/Ambient.cc
- Timestamp:
- Mar 9, 2008, 4:44:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/Ambient.cc
r790 r871 40 40 #include "../core/CoreIncludes.h" 41 41 #include "../Orxonox.h" 42 #include "core/XMLPort.h" 42 43 43 44 #include "Ambient.h" … … 45 46 namespace orxonox 46 47 { 47 // create a template instantiations48 //template class _OrxonoxExport ClassIdentifier<Ambient>;49 50 48 CreateFactory(Ambient); 51 49 … … 61 59 void Ambient::loadParams(TiXmlElement* xmlElem) 62 60 { 63 Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();64 65 61 if (xmlElem->Attribute("colourvalue")) 66 62 { … … 72 68 String2Number<float>(b, colourvalues[2]); 73 69 74 mgr->setAmbientLight(ColourValue(r,g,b));70 this->setAmbientLight(ColourValue(r, g, b)); 75 71 76 72 COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b << std::endl << std::endl; 77 73 } 78 74 } 75 76 void Ambient::setAmbientLight(const ColourValue& colour) 77 { 78 Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour); 79 } 80 81 /** 82 @brief XML loading and saving. 83 @param xmlelement The XML-element 84 @param loading Loading (true) or saving (false) 85 @return The XML-element 86 */ 87 void Ambient::XMLPort(Element& xmlelement, bool loading) 88 { 89 BaseObject::XMLPort(xmlelement, loading); 90 91 XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading); 92 } 79 93 }
Note: See TracChangeset
for help on using the changeset viewer.