Last change
on this file since 2804 was
2804,
checked in by bensch, 20 years ago
|
orxonox/branches/importer: added heavy logging
|
File size:
927 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 | extern int verbose; |
---|
12 | |
---|
13 | class Object |
---|
14 | { |
---|
15 | public: |
---|
16 | Object (); |
---|
17 | Object (char* fileName); |
---|
18 | ~Object (); |
---|
19 | |
---|
20 | bool importFile (char* fileName); |
---|
21 | bool initialize (void); |
---|
22 | bool finalize(void); |
---|
23 | void draw (void); |
---|
24 | |
---|
25 | bool readFromObjFile (char* fileName); |
---|
26 | |
---|
27 | |
---|
28 | private: |
---|
29 | GLuint listNumber; |
---|
30 | Array* vertices; |
---|
31 | int verticesCount; |
---|
32 | Array* colors; |
---|
33 | Array* normals; |
---|
34 | char* objFileName; |
---|
35 | char* mtlFileName; |
---|
36 | int faceMode; |
---|
37 | bool readVertices; |
---|
38 | Material* material; |
---|
39 | |
---|
40 | ifstream* OBJ_FILE; |
---|
41 | ifstream* MTL_FILE; |
---|
42 | |
---|
43 | bool readVertex (char* vertexString); |
---|
44 | bool readFace (char* faceString); |
---|
45 | bool readVT (char* vtString); |
---|
46 | bool readVertexNormal (char* normalString); |
---|
47 | bool readMtlLib (char* matFile); |
---|
48 | bool readUseMtl (char* mtlString); |
---|
49 | |
---|
50 | bool addGLElement (char* elementString); |
---|
51 | }; |
---|
52 | |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.