Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/object.h @ 2817

Last change on this file since 2817 was 2811, checked in by bensch, 20 years ago

orxonox/trunk: merged the ObjectImporter to trunk: merged with
svn merge branches/importer/src/ trunk/src/ -r 2794:HEAD

File size: 906 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
11class 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* objFileName;
33  char* mtlFileName;
34  int faceMode;
35  bool readVertices;
36  Material* material;
37
38  ifstream* OBJ_FILE;
39  ifstream* MTL_FILE;
40 
41  bool readVertex (char* vertexString);
42  bool readFace (char* faceString);
43  bool readVT (char* vtString);
44  bool readVertexNormal (char* normalString);
45  bool readMtlLib (char* matFile);
46  bool readUseMtl (char* mtlString);
47
48  bool addGLElement (char* elementString);
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.