GlobeEngine
PolygonZ.h
Go to the documentation of this file.
1 //
2 // Polyline.h
3 // GlobeEngine
4 //
5 // Created by Mathias Thöny on 27.12.11.
6 // Copyright (c) 2011 University of Zurich. All rights reserved.
7 //
8 
9 #ifndef GlobeEngine_Polygon_h
10 #define GlobeEngine_Polygon_h
11 
12 #include "DrawableComponent.h"
13 #include "VBOVertex.h"
14 #include "OpenGL_Includes.h"
15 
16 namespace geData {
17 
19  {
20  public:
21  PolygonZ() {clear(); };
22  ~PolygonZ() {destroy(); };
23  void clear();
24  void destroy();
25  void create(int pointCount, double* _points);
26  void create(int pointCount, double* _points_x, double* _points_y);
27  void createWithRescale(int _pointCount, double* _points_x, double* _points_y, double* minBound, double* edgelength, double* rescaleTo);
28  void create(int pointCount,
29  double* _points_x,
30  double* _points_y,
31  double* _points_z, double* minBound, double* edgelength, double* rescaleTo);
32 
33  void rescaleHeights(double _newmin, double _newmax, double _min, double edgelength);
34  void setIndices();
35  void update();
36 
37  void setData(double* points);
39  GLuint* getIndexData();
40  int getIndexCount();
41 
42  private:
43  using ge::DrawableComponent::create; // hidden by purpose
44 
45  int lineCount;
46 
47  ge::Vertexd* vertices;
48  GLuint* indices;
49 
50  GLuint vboVertexObject;
51  GLuint vboIndexObject;
52  ge::VBOVertex3f* vboVertices;
53  GLuint* vboIndices;
54 
55  };
56 }
57 #endif
Definition: DrawableComponent.h:25
~PolygonZ()
Definition: PolygonZ.h:22
void clear()
Definition: PolygonZ.cpp:5
Definition: AvalancheTrainingSimulationEngine.h:39
GLuint * getIndexData()
Definition: PolygonZ.cpp:105
void destroy()
Definition: PolygonZ.cpp:10
void update()
Definition: PolygonZ.cpp:96
int getIndexCount()
Definition: PolygonZ.cpp:109
virtual void create()=0
void rescaleHeights(double _newmin, double _newmax, double _min, double edgelength)
Definition: PolygonZ.cpp:87
void createWithRescale(int _pointCount, double *_points_x, double *_points_y, double *minBound, double *edgelength, double *rescaleTo)
Definition: PolygonZ.cpp:61
Definition: PolygonZ.h:18
Definition: VBOVertex.h:115
ge::Vertexd * getData()
Definition: PolygonZ.cpp:101
void setIndices()
Definition: PolygonZ.cpp:78
void setData(double *points)
PolygonZ()
Definition: PolygonZ.h:21