GlobeEngine
Globe.h
Go to the documentation of this file.
1 
8 #ifndef GlobeEngine_Globe_h
9 #define GlobeEngine_Globe_h
10 
11 #include <vmmlib/vmmlib.hpp>
12 #include "DrawableComponent.h"
13 #include "VBOVertex.h"
14 
15 namespace geGIS {
16 
18  {
19  public:
20  Globe() {clear(); };
21  ~Globe() {};
22  void clear();
23  void destroy();
24  void create() {};
25  void create(vmml::Vector3d _position, float _radius, unsigned int rings, unsigned int sectors);
27  void createVAO();
28 
29  void update();
30  void draw(std::shared_ptr<ge::Camera> _cam);
31 
32  private:
33  // Geometric properties
34  float radius;
35  float grid_size_lat_half;
36 
37  int verticesInLongitude;
38  int verticesInLatitude;
39  int triangleCountperSide;
40  float dist;
41  int indexCountperSide;
42  int triangleStripsPerColumn;
43 
44  float* heights;
45  float maxHeight;
46  float minHeight;
47  float diffHeight;
48  ge::Vertexf* vertices;
49  GLuint* indices;
50 
51 
52  GLuint vboVertexObject;
53  GLuint vboIndexObject;
54  GLuint vboNormalObject;
55  GLuint vboTexCoordObject;
56  ge::VBOVertex3f* vboVertices;
57  ge::VBOVertex3f* vboNormals;
58  GLuint* vboIndices;
59  bool geometryIsReady;
60 
61  };
62 }
63 #endif
Definition: DrawableComponent.h:25
void createRenderingStructures()
Definition: Globe.cpp:28
Definition: ClusterGrid.h:17
void createVAO()
Definition: Globe.cpp:81
~Globe()
Definition: Globe.h:21
Globe()
Definition: Globe.h:20
Definition: Globe.h:17
Definition: VBOVertex.h:115
void destroy()
void clear()
Definition: Globe.cpp:4
void update()
Definition: Globe.cpp:188
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: Globe.cpp:135
void create()
Definition: Globe.h:24