source:
orxonox.OLD/orxonox/trunk/src/object.h
@
2833
| Last change on this file since 2833 was 2822, checked in by patrick, 21 years ago | |
|---|---|
| File size: 907 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 | |
| [2822] | 11 | |
| [2748] | 12 | class Object |
| 13 | { | |
| 14 | public: | |
| 15 | Object (); | |
| [2767] | 16 | Object (char* fileName); |
| [2748] | 17 | ~Object (); |
| 18 | ||
| [2767] | 19 | bool importFile (char* fileName); |
| 20 | bool initialize (void); | |
| 21 | bool finalize(void); | |
| 22 | void draw (void); | |
| 23 | ||
| [2754] | 24 | bool readFromObjFile (char* fileName); |
| [2748] | 25 | |
| 26 | ||
| 27 | private: | |
| 28 | GLuint listNumber; | |
| [2754] | 29 | Array* vertices; |
| 30 | int verticesCount; | |
| 31 | Array* colors; | |
| [2794] | 32 | Array* normals; |
| [2810] | 33 | char* objFileName; |
| 34 | char* mtlFileName; | |
| [2767] | 35 | int faceMode; |
| 36 | bool readVertices; | |
| [2776] | 37 | Material* material; |
| [2760] | 38 | |
| [2765] | 39 | ifstream* OBJ_FILE; |
| 40 | ifstream* MTL_FILE; | |
| [2748] | 41 | |
| [2767] | 42 | bool readVertex (char* vertexString); |
| 43 | bool readFace (char* faceString); | |
| 44 | bool readVT (char* vtString); | |
| [2794] | 45 | bool readVertexNormal (char* normalString); |
| [2776] | 46 | bool readMtlLib (char* matFile); |
| 47 | bool readUseMtl (char* mtlString); | |
| [2754] | 48 | |
| [2768] | 49 | bool addGLElement (char* elementString); |
| [2748] | 50 | }; |
| [2773] | 51 | |
| 52 | #endif |
Note: See TracBrowser
for help on using the repository browser.










