Changeset 10185 in orxonox.OLD for branches/mount_points/src/world_entities
- Timestamp:
- Jan 6, 2007, 5:41:12 PM (18 years ago)
- Location:
- branches/mount_points/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/world_entities/mount_point.cc
r10184 r10185 36 36 { 37 37 38 this-> name = name;38 this->_name = name; 39 39 this->setAbsCoor( center); 40 40 this->setAbsDir( Quaternion(forward, up)); -
branches/mount_points/src/world_entities/world_entity.cc
r10184 r10185 204 204 StaticModel* model = new StaticModel(); 205 205 *model = ResourceOBJ(fileName, this->scaling); 206 207 // check if ther is a valid model and load other stuff 206 208 if (model->getVertexCount() > 0) 207 209 { 208 210 this->setModel(model, modelNumber); 209 211 if( modelNumber == 0) 212 { 210 213 this->buildObbTree(obbTreeDepth); 211 214 212 // now get the object information file for this model, if any 213 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif"; 214 this->loadMountPoints( oifName); 215 // now get the object information file for this model, if any 216 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif"; 217 this->loadMountPoints( oifName); 218 } 215 219 } 216 220 else … … 271 275 void WorldEntity::loadMountPoints(const std::string& fileName) 272 276 { 273 PRINTF(4)("loading the oif File: %s\n", fileName.c_str()); 277 PRINTF(0)("loading the oif File: %s\n", fileName.c_str()); 278 274 279 275 280 // first get all mount points from the model 276 std::list<mountPointSkeleton> mpList = this->models[0]->getMountPoints(); 277 281 std::list<mountPointSkeleton> mpList = this->getModel(0)->getMountPoints(); 278 282 // for each skeleton create a mounting point world entity 279 283 std::list<mountPointSkeleton>::const_iterator it = mpList.begin(); 284 280 285 for( ; it != mpList.end(); it++) 281 286 { 282 287 MountPoint* mp = new MountPoint((*it).up, (*it).forward, (*it).center, (*it).name); 283 288 284 this->mountPoints.push_back(mp); 289 std::string nrStr = (*it).name.substr(1, 2);; 290 291 PRINTF(0)("got mp nr: %s\n", nrStr.c_str()); 292 293 this->addMountPoint(mp); 285 294 } 286 295 287 296 // now load the object information file 288 297 this->oiFile = new ObjectInformationFile(fileName); 298 289 299 290 300
Note: See TracChangeset
for help on using the changeset viewer.