Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3396 in orxonox.OLD for orxonox/trunk/src/importer/model.h


Ignore:
Timestamp:
Feb 6, 2005, 3:58:40 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: splitted obj-loader out of the model-class: this will enable different kinds of Filetypes to be included with the importer.
Althought there is a name-field error, the Model gets loaded and unloaded as good as previously

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/importer/model.h

    r3395 r3396  
    2121{
    2222 public:
    23   Model ();
    24   Model (char* fileName);
    25   Model(char* fileName, float scaling);
    26   ~Model ();
     23  Model(void);
     24  virtual ~Model(void);
    2725 
    28   void draw (void) const;
    29   void draw (int groupNumber) const;
    30   void draw (char* groupName) const;
     26  void draw(void) const;
     27  void draw(int groupNumber) const;
     28  void draw(char* groupName) const;
    3129  int getGroupCount() const;
    3230
    33  private:
     31 protected:
     32  char* name;            //!< This is the name of the Model;
    3433  //! This is the placeholder of one Vertex beloning to a Face.
    35   struct FaceElement 
     34  struct FaceElement
    3635  {
    3736    int vertexNumber;    //!< The number of the Vertex out of the Array* vertices, this vertex points to.
     
    8786  float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
    8887
    89   char* objPath;        //!< The Path where the obj and mtl-file are located.
    90   char* objFileName;    //!< The Name of the obj-file.
    91   char* mtlFileName;    //!< The Name of the mtl-file (parsed out of the obj-file)
    92 
    9388  bool initialize (void);
    9489  bool initGroup(Group* group);
     
    9994  bool cleanupFaceElement(FaceElement* faceElem);
    10095
    101   ///// readin ///
    102   bool importFile (char* fileName);
    103   bool readFromObjFile (void);
    104  
    105   bool readGroup (char* groupString);
    106   bool readVertex (char* vertexString);
    107   bool readFace (char* faceString);
    108   bool readVertexNormal (char* normalString);
    109   bool readVertexTexture (char* vTextureString);
    110   bool readMtlLib (char* matFile);
    111   bool readUseMtl (char* mtlString);
     96  bool addGroup (char* groupString);
     97  bool addVertex (char* vertexString);
     98  bool addFace (char* faceString);
     99  bool addVertexNormal (char* normalString);
     100  bool addVertexTexture (char* vTextureString);
     101  bool addUseMtl (char* mtlString);
    112102
    113103  bool importToGL (void);
Note: See TracChangeset for help on using the changeset viewer.