Changeset 6691 for code/branches/lod/src/orxonox/Level.cc
- Timestamp:
- Apr 12, 2010, 3:48:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/lod/src/orxonox/Level.cc
r6417 r6691 32 32 #include "core/CoreIncludes.h" 33 33 #include "core/Loader.h" 34 #include "core/ Template.h"34 #include "core/template.h" 35 35 #include "core/XMLFile.h" 36 36 #include "core/XMLPort.h" … … 73 73 XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype"); 74 74 75 XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false); 76 } 75 XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false); 76 XMLPortObject(Level, MeshLodInformation, "lodinformation", addLodInfo, getLodInfo, xmlelement, mode); 77 } 77 78 78 79 void Level::registerVariables() … … 138 139 return 0; 139 140 } 141 142 //LoD 143 void Level::addLodInfo(const MeshLodInformation* lodInformation) 144 { 145 // std::pair<std::map<std::string,MeshLodInformation*>::iterator,bool> it 146 // = new std::pair<lodInformation->getMeshName(),lodInformation>; 147 this->lodInformation_.insert(std::pair<lodInformation->getMeshName(),lodInformation>); 148 } 149 150 MeshLodInformation* Level::getLodInfo(string meshName) const 151 { 152 if(this->lodInformation_.find(meshName)!=std::map::end) 153 return this->lodInformation_.find(meshName); 154 155 return 0; 156 157 158 /* 159 unsigned int i = 0; 160 for (std::map<MeshLodInformation*>::const_iterator it = this->lodInformation_.begin(); it != this->lodInformation_.end(); ++it) 161 { 162 if (i == index) 163 return (*it); 164 ++i; 165 } 166 return 0;*/ 167 } 140 168 141 169 void Level::playerEntered(PlayerInfo* player)
Note: See TracChangeset
for help on using the changeset viewer.