Last change
on this file since 2848 was
2842,
checked in by bensch, 20 years ago
|
orxonox/trunk/importer: doxygen tags added
|
File size:
1.3 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file object.h |
---|
3 | \brief Contains the Object Class that handles 3D-Objects |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _OBJECT_H |
---|
7 | #define _OBJECT_H |
---|
8 | |
---|
9 | #include <GL/gl.h> |
---|
10 | #include <GL/glu.h> |
---|
11 | |
---|
12 | #include "array.h" |
---|
13 | #include "material.h" |
---|
14 | #include <fstream> |
---|
15 | |
---|
16 | using namespace std; |
---|
17 | |
---|
18 | extern int verbose; //!< fill be removed and added again as a verbose-class |
---|
19 | |
---|
20 | |
---|
21 | //! Class that handles 3D-Objects. it can also read them in and display them. |
---|
22 | class Object |
---|
23 | { |
---|
24 | public: |
---|
25 | Object (); |
---|
26 | Object (char* fileName); |
---|
27 | Object(char* fileName, float scaling); |
---|
28 | ~Object (); |
---|
29 | |
---|
30 | bool importFile (char* fileName); |
---|
31 | bool initialize (void); |
---|
32 | bool finalize(void); |
---|
33 | void draw (void); |
---|
34 | |
---|
35 | bool readFromObjFile (char* fileName); |
---|
36 | |
---|
37 | |
---|
38 | private: |
---|
39 | GLuint listNumber; |
---|
40 | Array* vertices; |
---|
41 | int verticesCount; |
---|
42 | Array* colors; |
---|
43 | Array* normals; |
---|
44 | Array* vTexture; |
---|
45 | char* objFileName; |
---|
46 | char* mtlFileName; |
---|
47 | int faceMode; |
---|
48 | bool readVertices; |
---|
49 | Material* material; |
---|
50 | float scaleFactor; |
---|
51 | |
---|
52 | ifstream* OBJ_FILE; |
---|
53 | ifstream* MTL_FILE; |
---|
54 | |
---|
55 | bool readVertex (char* vertexString); |
---|
56 | bool readFace (char* faceString); |
---|
57 | bool readVT (char* vtString); |
---|
58 | bool readVertexNormal (char* normalString); |
---|
59 | bool readVertexTexture (char* vTextureString); |
---|
60 | bool readMtlLib (char* matFile); |
---|
61 | bool readUseMtl (char* mtlString); |
---|
62 | |
---|
63 | bool addGLElement (char* elementString); |
---|
64 | |
---|
65 | void BoxObject (void); |
---|
66 | }; |
---|
67 | |
---|
68 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.