Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2819 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
RevLine 
[2776]1#ifndef _OBJECT_H
2#define _OBJECT_H
[2773]3
4#include <GL/gl.h>
5#include <GL/glu.h>
6
[2754]7#include "array.h"
[2776]8#include "material.h"
[2765]9#include <fstream.h>
[2748]10
11class Object
12{
13 public:
14  Object ();
[2767]15  Object (char* fileName);
[2748]16  ~Object ();
17 
[2767]18  bool importFile (char* fileName);
19  bool initialize (void);
20  bool finalize(void);
21  void draw (void);
22
[2754]23  bool readFromObjFile (char* fileName);
[2748]24
25
26 private:
27  GLuint listNumber;
[2754]28  Array* vertices;
29  int verticesCount;
30  Array* colors;
[2794]31  Array* normals;
[2810]32  char* objFileName;
33  char* mtlFileName;
[2767]34  int faceMode;
35  bool readVertices;
[2776]36  Material* material;
[2760]37
[2765]38  ifstream* OBJ_FILE;
39  ifstream* MTL_FILE;
[2748]40 
[2767]41  bool readVertex (char* vertexString);
42  bool readFace (char* faceString);
43  bool readVT (char* vtString);
[2794]44  bool readVertexNormal (char* normalString);
[2776]45  bool readMtlLib (char* matFile);
46  bool readUseMtl (char* mtlString);
[2754]47
[2768]48  bool addGLElement (char* elementString);
[2748]49};
[2773]50
51#endif
Note: See TracBrowser for help on using the repository browser.