Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2850 in orxonox.OLD for orxonox/trunk/importer/object.h


Ignore:
Timestamp:
Nov 14, 2004, 6:16:42 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: included groups to filereader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/object.h

    r2842 r2850  
    3333  void draw (void);
    3434
    35   bool readFromObjFile (char* fileName);
    3635
    3736
    3837 private:
    39   GLuint listNumber;
    40   Array* vertices;
    41   int verticesCount;
    42   Array* colors;
    43   Array* normals;
    44   Array* vTexture;
     38  //! Group to handle multiple Objects per obj-file
     39  struct Group
     40  {
     41    char* name;
     42
     43    GLuint listNumber;
     44    Array* vertices;
     45    int verticesCount;
     46    Array* colors;
     47    Array* normals;
     48    Array* vTexture;
     49    int faceMode;
     50
     51    int firstVertex;
     52    int firstNormal;
     53    int firstVertexTexture;
     54
     55    Group* nextGroup;
     56  };
     57 
     58  Group* firstGroup; //!< the first of all groups.
     59  Group* currentGroup; //!< the currentGroup. this is the one we will work with.
     60  int groupCount;
     61
     62  bool readingVertices;
     63
    4564  char* objFileName;
    4665  char* mtlFileName;
    47   int faceMode;
    48   bool readVertices;
     66
    4967  Material* material;
    5068  float scaleFactor;
     
    5270  ifstream* OBJ_FILE;
    5371  ifstream* MTL_FILE;
     72
     73  bool initGroup(Group* group);
     74  bool finalizeGroup (Group* group);
     75
     76
     77  ///// readin ///
     78  bool readFromObjFile (char* fileName);
    5479 
    5580  bool readVertex (char* vertexString);
     
    5883  bool readVertexNormal (char* normalString);
    5984  bool readVertexTexture (char* vTextureString);
     85  bool readGroup (char* groupString);
    6086  bool readMtlLib (char* matFile);
    6187  bool readUseMtl (char* mtlString);
Note: See TracChangeset for help on using the changeset viewer.