Changeset 869 for code/branches/core/src/orxonox/objects/Ambient.cc
- Timestamp:
- Mar 9, 2008, 4:04:23 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/objects/Ambient.cc
r845 r869 40 40 #include "../core/CoreIncludes.h" 41 41 #include "../Orxonox.h" 42 #include "core/XMLPort.h" 42 43 43 44 #include "Ambient.h" … … 58 59 void Ambient::loadParams(TiXmlElement* xmlElem) 59 60 { 60 Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();61 62 61 if (xmlElem->Attribute("colourvalue")) 63 62 { … … 69 68 String2Number<float>(b, colourvalues[2]); 70 69 71 mgr->setAmbientLight(ColourValue(r,g,b));70 this->setAmbientLight(ColourValue(r, g, b)); 72 71 73 72 COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b << std::endl << std::endl; 74 73 } 75 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 Element& Ambient::XMLPort(Element& xmlelement, bool loading) 88 { 89 BaseObject::XMLPort(xmlelement, loading); 90 91 XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading); 92 93 return xmlelement; 94 } 76 95 }
Note: See TracChangeset
for help on using the changeset viewer.