Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10182 in orxonox.OLD


Ignore:
Timestamp:
Jan 6, 2007, 4:25:10 PM (17 years ago)
Author:
patrick
Message:

extended model to contain the mounting point informations

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

Legend:

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

    r10147 r10182  
    5252
    5353
     54//! skeleton informations for all mount points
     55typedef struct
     56{
     57  Vector           up;                   //!< the up vector
     58  Vector           forward;              //!< the forward vector
     59  Vector           center;               //!< the center vector
     60} mountPointSkeleton;
     61
     62
     63
    5464//! This class defines the basic components of a model
    5565class Model : virtual public BaseObject {
    5666  ObjectListDeclaration(Model);
     67
     68  typedef std::list<mountPointSkeleton>   mpList;
    5769
    5870  public:
     
    8597    /** function to extract the mount points from the model data */
    8698    virtual void extractMountPoints() {}
     99    /** @returns a list of mounting points */
     100    inline const mpList& getMountPoints() const { return this->mountPoints; }
     101    /** adds a mounting point to the model @param up up vector @param forward forward vector @param center center vector */
     102    inline void addMountPoint(Vector up, Vector forward, Vector center)
     103    { mountPointSkeleton mps; mps.up = up; mps.forward = forward; mps.center = center; }
    87104
    88105
     
    92109
    93110  protected:
    94     modelInfo      pModelInfo;      //!< Reference to the modelInfo
     111    modelInfo                        pModelInfo;      //!< Reference to the modelInfo
     112    mpList                           mountPoints;     //!< a list of all mounting point skeletons
    95113};
    96114
  • branches/mount_points/src/lib/graphics/importer/obj/objModel.cc

    r10147 r10182  
    4444
    4545  this->finalize();
    46 
    47   this->extractMountPoints();
    4846}
    4947
  • branches/mount_points/src/lib/graphics/importer/static_model.cc

    r10181 r10182  
    8484  data->finalize();
    8585  this->updateBase();
     86  this->extractMountPoints();
    8687}
    8788
  • branches/mount_points/src/lib/graphics/importer/static_model.h

    r10147 r10182  
    5858
    5959  void finalize();
    60   void extractMountPoints();
     60  virtual void extractMountPoints();
    6161
    6262  void acquireData(const StaticModelData::Pointer& data);
     
    7171private:
    7272  void updateBase();
     73
     74
    7375private:
    7476  StaticModelData::Pointer         data;
Note: See TracChangeset for help on using the changeset viewer.