Changeset 10202 in orxonox.OLD for branches/mount_points
- Timestamp:
- Jan 10, 2007, 11:41:08 AM (18 years ago)
- Location:
- branches/mount_points/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/lib/graphics/importer/static_model.cc
r10184 r10202 84 84 data->finalize(); 85 85 this->updateBase(); 86 this->extractMountPoints();87 86 } 88 87 … … 187 186 center /= vertices.size(); 188 187 189 PRINTF(0)("Up Point\n");190 up.debug();191 192 PRINTF(0)("Center\n");193 center.debug();194 195 PRINTF(0)("Forward\n");196 forward.debug();188 // PRINTF(0)("Up Point\n"); 189 // up.debug(); 190 // 191 // PRINTF(0)("Center\n"); 192 // center.debug(); 193 // 194 // PRINTF(0)("Forward\n"); 195 // forward.debug(); 197 196 198 197 // now add the mount point … … 229 228 this->pModelInfo.pTriangles = this->data->getTrianglesExt(); 230 229 this->pModelInfo.numTriangles = this->data->getTriangles().size(); 230 231 this->extractMountPoints(); 231 232 } 232 233 -
branches/mount_points/src/world_entities/world_entity.cc
r10201 r10202 209 209 { 210 210 this->setModel(model, modelNumber); 211 PRINTF(0)("model number: %i\n", modelNumber);212 211 213 212 if( modelNumber == 0) … … 217 216 // now get the object information file for this model, if any 218 217 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif"; 219 this->loadMountPoints( oifName);218 this->loadMountPoints( model, oifName); 220 219 } 221 220 } … … 275 274 * @param fileName the name of the file 276 275 */ 277 void WorldEntity::loadMountPoints( const std::string& fileName)276 void WorldEntity::loadMountPoints( Model* model, const std::string& fileName) 278 277 { 279 278 PRINTF(0)("loading the oif File: %s\n", fileName.c_str()); … … 281 280 282 281 // first get all mount points from the model 283 std::list<mountPointSkeleton> mpList = this->getModel()->getMountPoints();282 const std::list<mountPointSkeleton> mpList = model->getMountPoints(); 284 283 // for each skeleton create a mounting point world entity 285 284 std::list<mountPointSkeleton>::const_iterator it = mpList.begin(); 286 285 287 PRINTF(0)("->>>> size: %i\n", mpList.size());288 289 286 for( ; it != mpList.end(); it++) 290 287 { 291 288 MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name); 292 289 293 std::string nrStr = (*it).name.substr( 1, 2);290 std::string nrStr = (*it).name.substr(3, 2); 294 291 295 292 PRINTF(0)("got mp nr: %s\n", nrStr.c_str()); -
branches/mount_points/src/world_entities/world_entity.h
r10184 r10202 53 53 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; }; 54 54 55 void loadMountPoints( const std::string& fileName);55 void loadMountPoints( Model* model, const std::string& fileName); 56 56 inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; } 57 57
Note: See TracChangeset
for help on using the changeset viewer.