source:
orxonox.OLD/orxonox/trunk/importer/object.h
@
2820
| Last change on this file since 2820 was 2820, checked in by bensch, 21 years ago | |
|---|---|
| File size: 995 bytes | |
| Rev | Line | |
|---|---|---|
| [2776] | 1 | #ifndef _OBJECT_H |
| 2 | #define _OBJECT_H | |
| [2773] | 3 | |
| 4 | #include <GL/gl.h> | |
| 5 | #include <GL/glu.h> | |
| 6 | ||
| [2754] | 7 | #include "array.h" |
| [2776] | 8 | #include "material.h" |
| [2765] | 9 | #include <fstream.h> |
| [2748] | 10 | |
| [2804] | 11 | extern int verbose; |
| 12 | ||
| [2748] | 13 | class Object |
| 14 | { | |
| 15 | public: | |
| 16 | Object (); | |
| [2767] | 17 | Object (char* fileName); |
| [2748] | 18 | ~Object (); |
| 19 | ||
| [2767] | 20 | bool importFile (char* fileName); |
| 21 | bool initialize (void); | |
| 22 | bool finalize(void); | |
| 23 | void draw (void); | |
| 24 | ||
| [2754] | 25 | bool readFromObjFile (char* fileName); |
| [2748] | 26 | |
| 27 | ||
| 28 | private: | |
| 29 | GLuint listNumber; | |
| [2754] | 30 | Array* vertices; |
| 31 | int verticesCount; | |
| 32 | Array* colors; | |
| [2794] | 33 | Array* normals; |
| [2820] | 34 | Array* vTexture; |
| [2804] | 35 | char* objFileName; |
| 36 | char* mtlFileName; | |
| [2767] | 37 | int faceMode; |
| 38 | bool readVertices; | |
| [2776] | 39 | Material* material; |
| [2760] | 40 | |
| [2765] | 41 | ifstream* OBJ_FILE; |
| 42 | ifstream* MTL_FILE; | |
| [2748] | 43 | |
| [2767] | 44 | bool readVertex (char* vertexString); |
| 45 | bool readFace (char* faceString); | |
| 46 | bool readVT (char* vtString); | |
| [2794] | 47 | bool readVertexNormal (char* normalString); |
| [2820] | 48 | bool readVertexTexture (char* vTextureString); |
| [2776] | 49 | bool readMtlLib (char* matFile); |
| 50 | bool readUseMtl (char* mtlString); | |
| [2754] | 51 | |
| [2768] | 52 | bool addGLElement (char* elementString); |
| [2748] | 53 | }; |
| [2773] | 54 | |
| 55 | #endif |
Note: See TracBrowser
for help on using the repository browser.










