Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/importer/object.h @ 2821

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

orxonox/trunk/importer: added BOX if no Object can be displayed

File size: 1021 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
11extern int verbose;
12
13class 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  Array* vTexture;
35  char* objFileName;
36  char* mtlFileName;
37  int faceMode;
38  bool readVertices;
39  Material* material;
40
41  ifstream* OBJ_FILE;
42  ifstream* MTL_FILE;
43 
44  bool readVertex (char* vertexString);
45  bool readFace (char* faceString);
46  bool readVT (char* vtString);
47  bool readVertexNormal (char* normalString);
48  bool readVertexTexture (char* vTextureString);
49  bool readMtlLib (char* matFile);
50  bool readUseMtl (char* mtlString);
51
52  bool addGLElement (char* elementString);
53
54  void BoxObject (void);
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.