Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10202 in orxonox.OLD


Ignore:
Timestamp:
Jan 10, 2007, 11:41:08 AM (17 years ago)
Author:
patrick
Message:

fixed the bug, the resources were overwriting my model infos

Location:
branches/mount_points/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/lib/graphics/importer/static_model.cc

    r10184 r10202  
    8484  data->finalize();
    8585  this->updateBase();
    86   this->extractMountPoints();
    8786}
    8887
     
    187186    center /= vertices.size();
    188187
    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();
    197196
    198197    // now add the mount point
     
    229228  this->pModelInfo.pTriangles = this->data->getTrianglesExt();
    230229  this->pModelInfo.numTriangles = this->data->getTriangles().size();
     230
     231  this->extractMountPoints();
    231232}
    232233
  • branches/mount_points/src/world_entities/world_entity.cc

    r10201 r10202  
    209209      {
    210210        this->setModel(model, modelNumber);
    211         PRINTF(0)("model number: %i\n", modelNumber);
    212211
    213212        if( modelNumber == 0)
     
    217216          // now get the object information file for this model, if any
    218217          std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";
    219           this->loadMountPoints( oifName);
     218          this->loadMountPoints( model, oifName);
    220219        }
    221220      }
     
    275274 * @param fileName the name of the file
    276275 */
    277 void WorldEntity::loadMountPoints(const std::string& fileName)
     276void WorldEntity::loadMountPoints( Model* model, const std::string& fileName)
    278277{
    279278  PRINTF(0)("loading the oif File: %s\n", fileName.c_str());
     
    281280
    282281  // first get all mount points from the model
    283   std::list<mountPointSkeleton> mpList = this->getModel()->getMountPoints();
     282  const std::list<mountPointSkeleton> mpList = model->getMountPoints();
    284283  // for each skeleton create a mounting point world entity
    285284  std::list<mountPointSkeleton>::const_iterator it = mpList.begin();
    286285
    287   PRINTF(0)("->>>> size: %i\n", mpList.size());
    288 
    289286  for( ; it != mpList.end(); it++)
    290287  {
    291288    MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name);
    292289
    293     std::string nrStr = (*it).name.substr(1, 2);
     290    std::string nrStr = (*it).name.substr(3, 2);
    294291
    295292    PRINTF(0)("got mp nr: %s\n", nrStr.c_str());
  • branches/mount_points/src/world_entities/world_entity.h

    r10184 r10202  
    5353  Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
    5454
    55   void loadMountPoints(const std::string& fileName);
     55  void loadMountPoints( Model* model, const std::string& fileName);
    5656  inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
    5757
Note: See TracChangeset for help on using the changeset viewer.