GlobeEngine
GlobeEngineGLWidget.h
Go to the documentation of this file.
1 
2 #ifndef GlobeEngineGLWidget_H
3 #define GlobeEngineGLWidget_H
4 
5 #include "OpenGL_Includes.h"
6 #include "ModelLayer.h"
7 #include "GlobeEngine.h"
8 #include "SceneBluePrint.h"
10 #include <math.h>
11 #include <memory.h>
12 
13 namespace geViewer {
14 
16  Q_OBJECT
17  public:
18  GlobeEngineGLWidget(const std::shared_ptr<geGIS::SceneBlueprint>& _scene, geGIS::GlobeEngine* _engine, ge::InputControl* _input);
19 
20  public:
21  std::shared_ptr<geGIS::ModelLayer> getModelLayer();
23  const std::shared_ptr<geGIS::SceneBlueprint> getSceneBlueprint() const;
24  vmml::Vector2d getEngineWindowSize();
25 
26  void enableNamesRendering(bool _in=true);
27  void disableNamesRendering();
28 
29  void enableNamesCulling(bool _in = true);
30  void disableNamesCulling();
31 
33 
34  // calls which require opengl context
35  void enableTerrainNumeration(bool _in = true);
36  void addModelToModelLayer(enum geGIS::ModelLayerCategories::MODELTYPE _type, std::shared_ptr<geGIS::FeatureBlueprint> _blueprint);
37  void requestQuery();
39 
40  protected:
41  void drawNamesOnUI();
42  void drawQuadtreeNamesOnUI();
43 
44  // overrides from SimpleQTViewerGLWidget
45  void initialize();
46  void drawGL();
47  void updateScene();
48  void drawUI();
49  void resize(int width, int height);
50 
51  private:
52  void create();
53  std::shared_ptr<geGIS::ModelLayer> models;
54  std::shared_ptr<geGIS::SceneBlueprint>sceneBlueprint;
55 
56  QLabel label;
57 
58  bool graphicsInitialized;
59  bool renderNames;
60  bool cullNames;
61  bool renderTerrainQuadtreeNames;
62  };
63 }
64 #endif
void initialize()
Definition: GlobeEngineGLWidget.cpp:27
void requestQuery()
Definition: GlobeEngineGLWidget.cpp:204
void updateScene()
Definition: GlobeEngineGLWidget.cpp:43
Definition: FeaturePanel.h:10
void disableNamesCulling()
Definition: GlobeEngineGLWidget.cpp:182
Definition: GlobeEngine.h:62
void enableTerrainNumeration(bool _in=true)
Definition: GlobeEngineGLWidget.cpp:194
GlobeEngineGLWidget(const std::shared_ptr< geGIS::SceneBlueprint > &_scene, geGIS::GlobeEngine *_engine, ge::InputControl *_input)
Definition: GlobeEngineGLWidget.cpp:8
geGIS::GlobeEngine * getEngineLayer()
Definition: GlobeEngineGLWidget.cpp:164
Definition: SimpleQTViewerGLWidget.h:24
void enableNamesCulling(bool _in=true)
Definition: GlobeEngineGLWidget.cpp:178
Definition: ModelLayer.h:85
vmml::Vector2d getEngineWindowSize()
Definition: GlobeEngineGLWidget.cpp:168
void addModelToModelLayer(enum geGIS::ModelLayerCategories::MODELTYPE _type, std::shared_ptr< geGIS::FeatureBlueprint > _blueprint)
Definition: GlobeEngineGLWidget.cpp:198
void resize(int width, int height)
Definition: GlobeEngineGLWidget.cpp:152
MODELTYPE
Definition: ModelLayer.h:54
void drawUI()
Definition: GlobeEngineGLWidget.cpp:68
void disableNamesRendering()
Definition: GlobeEngineGLWidget.cpp:190
void enableNamesRendering(bool _in=true)
Definition: GlobeEngineGLWidget.cpp:186
Definition: GlobeEngineGLWidget.h:15
std::shared_ptr< geGIS::ModelLayer > getModelLayer()
Definition: GlobeEngineGLWidget.cpp:156
void drawGL()
Definition: GlobeEngineGLWidget.cpp:62
const std::shared_ptr< geGIS::SceneBlueprint > getSceneBlueprint() const
Definition: GlobeEngineGLWidget.cpp:160
void drawQuadtreeNamesOnUI()
Definition: GlobeEngineGLWidget.cpp:88
void triangulateObject(geGIS::ModelLayerSelection _selection)
Definition: GlobeEngineGLWidget.cpp:210
void drawNamesOnUI()
Definition: GlobeEngineGLWidget.cpp:108
Definition: InputControl.h:16
bool isGraphicsSystemInitialized()
Definition: GlobeEngineGLWidget.cpp:216