Changeset 1747 for code/trunk/src/orxonox/objects/Ambient.cc
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/Ambient.cc
r1625 r1747 39 39 #include "util/Convert.h" 40 40 #include "util/Math.h" 41 #include " core/Debug.h"41 #include "util/Debug.h" 42 42 #include "core/CoreIncludes.h" 43 #include "GraphicsEngine.h"44 43 #include "core/XMLPort.h" 45 44 #include "core/ConsoleCommand.h" 45 #include "GraphicsEngine.h" 46 46 47 47 namespace orxonox 48 48 { 49 SetConsoleCommand (Ambient, setAmbientLightTest, false).setDefaultValues(ColourValue(1, 1, 1, 1)).setAccessLevel(AccessLevel::Offline);49 SetConsoleCommandAlias(Ambient, setAmbientLightTest, "setAmbientLight", false).defaultValues(ColourValue(1, 1, 1, 1)).accessLevel(AccessLevel::Offline); 50 50 51 51 CreateFactory(Ambient); … … 64 64 } 65 65 66 bool Ambient::create(){ 67 GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_); 68 return Synchronisable::create(); 66 bool Ambient::create() 67 { 68 GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_); 69 return Synchronisable::create(); 69 70 } 70 71 void Ambient::registerAllVariables() {72 registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);73 71 72 void Ambient::registerAllVariables() 73 { 74 registerVar(&ambientLight_, sizeof(ColourValue), network::DATA); 74 75 } 75 76 76 77 void Ambient::setAmbientLight(const ColourValue& colour) 77 78 { 78 79 ambientLight_=colour;79 GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour); 80 ambientLight_=colour; 80 81 } 81 82 … … 88 89 void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode) 89 90 { 90 BaseObject::XMLPort(xmlelement, mode);91 SUPER(Ambient, XMLPort, xmlelement, mode); 91 92 92 XMLPortParam LoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, mode);93 XMLPortParam(Ambient, "colourvalue", setAmbientLight, getAmbienetLight, xmlelement, mode); 93 94 create(); 94 95 }
Note: See TracChangeset
for help on using the changeset viewer.