Changeset 2853 in orxonox.OLD for orxonox/trunk/src/object.h
- Timestamp:
- Nov 14, 2004, 6:41:02 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/object.h
r2835 r2853 1 1 /*! 2 \file object.h3 \brief Contains the Object Class that handles 3D-Objects2 \file object.h 3 \brief Contains the Object Class that handles 3D-Objects 4 4 */ 5 5 … … 16 16 using namespace std; 17 17 18 extern int verbose; //!< fill be removed and added again as a verbose-class 19 20 18 21 //! Class that handles 3D-Objects. it can also read them in and display them. 19 22 class Object … … 29 32 bool finalize(void); 30 33 void draw (void); 31 32 bool readFromObjFile (char* fileName);33 34 void draw (int groupNumber); 35 void draw (char* groupName); 36 int getGroupCount(); 34 37 35 38 private: 36 GLuint listNumber; 37 Array* vertices; 38 int verticesCount; 39 Array* colors; 40 Array* normals; 41 Array* vTexture; 39 //! Group to handle multiple Objects per obj-file 40 struct Group 41 { 42 char* name; 43 44 GLuint listNumber; 45 Array* vertices; 46 int verticesCount; 47 Array* colors; 48 Array* normals; 49 Array* vTexture; 50 int faceMode; 51 52 int firstVertex; 53 int firstNormal; 54 int firstVertexTexture; 55 56 Group* nextGroup; 57 }; 58 59 Group* firstGroup; //!< the first of all groups. 60 Group* currentGroup; //!< the currentGroup. this is the one we will work with. 61 int groupCount; 62 63 bool readingVertices; 64 42 65 char* objFileName; 43 66 char* mtlFileName; 44 int faceMode; 45 bool readVertices; 67 46 68 Material* material; 47 69 float scaleFactor; … … 49 71 ifstream* OBJ_FILE; 50 72 ifstream* MTL_FILE; 73 74 bool initGroup(Group* group); 75 bool finalizeGroup (Group* group); 76 77 78 ///// readin /// 79 bool readFromObjFile (char* fileName); 51 80 52 81 bool readVertex (char* vertexString); … … 55 84 bool readVertexNormal (char* normalString); 56 85 bool readVertexTexture (char* vTextureString); 86 bool readGroup (char* groupString); 57 87 bool readMtlLib (char* matFile); 58 88 bool readUseMtl (char* mtlString);
Note: See TracChangeset
for help on using the changeset viewer.