Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2008, 4:44:36 PM (16 years ago)
Author:
landauf
Message:

merged core branch to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Skybox.cc

    r790 r871  
    3838#include "../core/CoreIncludes.h"
    3939#include "../core/Debug.h"
     40#include "core/XMLPort.h"
    4041
    4142#include "Skybox.h"
     
    5657    void Skybox::loadParams(TiXmlElement* xmlElem)
    5758    {
    58         Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    59 
    6059        if (xmlElem->Attribute("src"))
    6160        {
    6261                std::string skyboxSrc = xmlElem->Attribute("src");
    63                 mgr->setSkyBox(true, skyboxSrc);
     62                this->setSkybox(skyboxSrc);
    6463
    6564                COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
    6665        }
    6766   }
     67
     68   void Skybox::setSkybox(const std::string& skyboxname)
     69   {
     70        Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);
     71   }
     72
     73    /**
     74        @brief XML loading and saving.
     75        @param xmlelement The XML-element
     76        @param loading Loading (true) or saving (false)
     77        @return The XML-element
     78    */
     79    void Skybox::XMLPort(Element& xmlelement, bool loading)
     80    {
     81        BaseObject::XMLPort(xmlelement, loading);
     82
     83        XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, loading);
     84    }
    6885}
Note: See TracChangeset for help on using the changeset viewer.