Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2822 was 2822, checked in by patrick, 20 years ago

orxonox/trunk/src: changed list to template again, will add an iterator soon. fixed a graphics bug, that was realy painful to track.

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