Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10089 in orxonox.OLD for branches/mount_points


Ignore:
Timestamp:
Dec 18, 2006, 11:32:55 AM (18 years ago)
Author:
patrick
Message:

working on mountpoint extraction

Location:
branches/mount_points/src/lib/graphics/importer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/lib/graphics/importer/model.h

    r9869 r10089  
    8383    inline unsigned int getTriangleCount() const { return this->pModelInfo.numTriangles; };
    8484
     85    /** function to extract the mount points from the model data */
     86    virtual void extractMountPoints() {}
     87
     88
    8589  protected:
    8690    Model();
  • branches/mount_points/src/lib/graphics/importer/obj/objModel.h

    r10033 r10089  
    1616  OBJModel(const std::string& fileName, float scaling = 1.0);
    1717  virtual ~OBJModel();
     18
    1819
    1920private:
  • branches/mount_points/src/lib/graphics/importer/static_model.cc

    r9869 r10089  
    9191  this->updateBase();
    9292}
     93
     94
     95
     96/**
     97 * extract the mount points from this file: looking at each group and checking if the group realy is a mountpoint marker
     98 * if so get place and orientation
     99 */
     100void StaticModel::extractMountPoints()
     101{
     102
     103  // go through all groups and check if they are mounts
     104  const ModelGroup* groupPtr = this->data->getModelGroup();
     105  for( ; groupPtr != NULL; groupPtr = groupPtr->next)
     106  {
     107    // get the name of this group and check if it's a mout point identifier
     108    std::string groupName = groupPtr->name;
     109    if( groupName.find("MP.", 0) != std::string::npos)
     110    {}
     111  }
     112}
     113
     114
    93115
    94116/**
  • branches/mount_points/src/lib/graphics/importer/static_model.h

    r9869 r10089  
    5858
    5959  void finalize();
     60  void extractMountPoints();
    6061
    6162  void acquireData(const StaticModelData::Pointer& data);
  • branches/mount_points/src/lib/graphics/importer/static_model_data.cc

    r9869 r10089  
    368368bool StaticModelData::addGroup(const std::string& groupString)
    369369{
    370   PRINTF(5)("Read Group: %s.\n", groupString.c_str());
     370  PRINTF(0)("Read Group: %s.\n", groupString.c_str());
    371371  if (this->groupCount != 0 && this->currentGroup->faceCount > 0)
    372372  {
     
    375375  }
    376376  // setting the group name if not default.
    377   if (groupString == "default")
    378   {
     377//   if (groupString == "default")
     378//   {
    379379    this->currentGroup->name = groupString;
    380   }
     380//   }
    381381  ++this->groupCount;
    382382  return true;
  • branches/mount_points/src/lib/graphics/importer/static_model_data.h

    r9869 r10089  
    139139  ///! HACK SOLUTION sTriangleExt should be const in the modelInfo.
    140140  sTriangleExt* getTrianglesExt() { return &this->triangles[0]; };
     141  const ModelGroup* getModelGroup() { return this->firstGroup; }
    141142
    142143  float getScaleFactor() const  { return scaleFactor; }
Note: See TracChangeset for help on using the changeset viewer.