Changeset 3063 in orxonox.OLD for orxonox/trunk/importer/object.h
- Timestamp:
- Dec 3, 2004, 1:59:29 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/object.h
r2934 r3063 16 16 using namespace std; 17 17 18 extern int verbose; //!< fill be removed and added again as a verbose-class18 extern int verbose; //!< Will be removed and added again as a verbose-class. 19 19 20 20 21 struct FaceElement22 {23 char value[20];24 FaceElement* next;25 };26 21 27 22 //! Class that handles 3D-Objects. it can also read them in and display them. … … 37 32 bool initialize (void); 38 33 bool finalize(void); 39 void draw (void) ;40 void draw (int groupNumber) ;41 void draw (char* groupName) ;42 int getGroupCount() ;34 void draw (void) const; 35 void draw (int groupNumber) const; 36 void draw (char* groupName) const; 37 int getGroupCount() const; 43 38 44 39 private: 40 struct FaceElement 41 { 42 char* value; 43 FaceElement* next; 44 }; 45 46 //! Face 47 struct Face 48 { 49 int vertexCount; 50 51 FaceElement* firstElem; 52 53 char* material; 54 55 Face* next; 56 }; 57 45 58 //! Group to handle multiple Objects per obj-file 46 59 struct Group … … 49 62 50 63 GLuint listNumber; 51 Array* vertices; 52 int verticesCount; 53 Array* colors; 54 Array* normals; 55 Array* vTexture; 64 Face* firstFace; 65 Face* currentFace; 56 66 int faceMode; 57 67 int faceCount; 58 68 59 int firstVertex; 60 int firstNormal; 61 int firstVertexTexture; 69 Group* next; 70 }; 62 71 63 Group* nextGroup; 64 }; 72 73 Array* vertices; 74 int verticesCount; 75 Array* colors; 76 Array* normals; 77 Array* vTexture; 78 65 79 66 80 Group* firstGroup; //!< the first of all groups. 67 81 Group* currentGroup; //!< the currentGroup. this is the one we will work with. 68 82 int groupCount; 69 70 bool readingVertices;71 83 72 84 char* objFileName; … … 76 88 float scaleFactor; 77 89 90 char* objPath; 78 91 ifstream* OBJ_FILE; 79 92 ifstream* MTL_FILE; … … 81 94 bool initGroup(Group* group); 82 95 bool finalizeGroup (Group* group); 83 bool cleanupGroup(Group* group);84 96 85 97 … … 96 108 bool readUseMtl (char* mtlString); 97 109 110 bool initFace (Face* face); 111 bool importToGL (void); 98 112 bool addGLElement (char* elementString); 99 113
Note: See TracChangeset
for help on using the changeset viewer.