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/Model.cc

    r790 r871  
    3333#include "../core/CoreIncludes.h"
    3434#include "../Orxonox.h"
     35#include "core/XMLPort.h"
    3536
    3637#include "Model.h"
     
    6061    }
    6162
     63    /**
     64        @brief XML loading and saving.
     65        @param xmlelement The XML-element
     66        @param loading Loading (true) or saving (false)
     67        @return The XML-element
     68    */
     69    void Model::XMLPort(Element& xmlelement, bool loading)
     70    {
     71        WorldEntity::XMLPort(xmlelement, loading);
     72
     73        XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, loading);
     74
     75        create();
     76    }
     77
     78    void Model::setMesh(const std::string& meshname)
     79    {
     80        this->meshSrc_ = meshname;
     81    }
     82
    6283    bool Model::create(){
    6384      if(meshSrc_.compare("")!=0){
     
    7192
    7293    void Model::registerAllVariables(){
    73       registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
     94//      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
    7495    }
    7596}
Note: See TracChangeset for help on using the changeset viewer.