mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Objects.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "GlobalGL.h"
10 #include "Structures.h"
11 
12 #include <vector>
13 #include <string>
14 
15 class ObjectLoader3ds;
16 class Vector3;
17 
26 class Objects {
27  // singleton stuff
28 public:
29  static Objects * getObjects( void );
30  ~Objects( void );
31 private:
32  static class Objects *m_objects;
33  Objects( void );
34 
35  // loading, unloading
36 public:
37  void Objects::freeObject( unsigned int object );
38  void Objects::loadObject( unsigned int object, std::string filename, float factor );
39  void reserve( unsigned int count );
40 private:
41  void loadObject3DS( unsigned int object, std::string filename, float factor );
42  GLuint createDisplayList( ObjectLoader3ds * model, float factor );
43 
44  // using objects
45 public:
46  GLuint getDisplayList ( unsigned int object );
47  Vector3 getObjectView ( unsigned int object );
48 
49  // internal data structure
50 private:
51  std::vector<ObjectInfo> objectList;
52 };