Last change
on this file since 2808 was
2795,
checked in by bensch, 20 years ago
|
orxonox/branches/importer: importer includes into the source
|
File size:
881 bytes
|
Line | |
---|
1 | #ifndef _OBJECT_H |
---|
2 | #define _OBJECT_H |
---|
3 | |
---|
4 | #include <GL/gl.h> |
---|
5 | #include <GL/glu.h> |
---|
6 | |
---|
7 | #include "array.h" |
---|
8 | #include "material.h" |
---|
9 | #include <fstream.h> |
---|
10 | |
---|
11 | class Object |
---|
12 | { |
---|
13 | public: |
---|
14 | Object (); |
---|
15 | Object (char* fileName); |
---|
16 | ~Object (); |
---|
17 | |
---|
18 | bool importFile (char* fileName); |
---|
19 | bool initialize (void); |
---|
20 | bool finalize(void); |
---|
21 | void draw (void); |
---|
22 | |
---|
23 | bool readFromObjFile (char* fileName); |
---|
24 | |
---|
25 | |
---|
26 | private: |
---|
27 | GLuint listNumber; |
---|
28 | Array* vertices; |
---|
29 | int verticesCount; |
---|
30 | Array* colors; |
---|
31 | Array* normals; |
---|
32 | char* objFile; |
---|
33 | int faceMode; |
---|
34 | bool readVertices; |
---|
35 | Material* material; |
---|
36 | |
---|
37 | ifstream* OBJ_FILE; |
---|
38 | ifstream* MTL_FILE; |
---|
39 | |
---|
40 | bool readVertex (char* vertexString); |
---|
41 | bool readFace (char* faceString); |
---|
42 | bool readVT (char* vtString); |
---|
43 | bool readVertexNormal (char* normalString); |
---|
44 | bool readMtlLib (char* matFile); |
---|
45 | bool readUseMtl (char* mtlString); |
---|
46 | |
---|
47 | bool addGLElement (char* elementString); |
---|
48 | }; |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.