Changeset 1293 for code/trunk/src/orxonox/objects/Model.cc
- Timestamp:
- May 15, 2008, 5:44:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/Model.cc
r1209 r1293 49 49 } 50 50 51 void Model::loadParams(TiXmlElement* xmlElem)52 {53 WorldEntity::loadParams(xmlElem);54 55 if (xmlElem->Attribute("mesh"))56 {57 meshSrc_ = xmlElem->Attribute("mesh");58 }59 create();60 }61 62 51 /** 63 52 @brief XML loading and saving. … … 73 62 XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, mode); 74 63 75 create();64 Model::create(); 76 65 } 77 66 … … 82 71 83 72 bool Model::create(){ 84 WorldEntity::create(); 73 if(!WorldEntity::create()) 74 return false; 85 75 if ((this->meshSrc_ != "") && (this->meshSrc_.size() > 0)) 86 76 { 87 77 this->mesh_.setMesh(meshSrc_); 88 78 this->attachObject(this->mesh_.getEntity()); 89 COUT(4) << "Loader : Created model" << std::endl;79 COUT(4) << "Loader (Model.cc): Created model" << std::endl; 90 80 } 91 81 return true; … … 93 83 94 84 void Model::registerAllVariables(){ 95 WorldEntity::registerAllVariables(); 85 // WorldEntity::registerAllVariables(); 86 COUT(5) << "Model.cc:registering new meshsrc with size: " << meshSrc_.length()+1 << " this: " << this << std::endl; 96 87 registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING); 97 88 }
Note: See TracChangeset
for help on using the changeset viewer.