GlobeEngine
HikingTerrainModule.h
Go to the documentation of this file.
1 
11 #ifndef GlobeEngine_HikingTerrainModule_h
12 #define GlobeEngine_HikingTerrainModule_h
13 
14 #include "OpenGL_Includes.h"
15 #include "TerrainModule.h"
16 #include "DrawableComponent.h"
17 #include "HikingKPatchBintree.h"
18 #include "TerrainMessageQueue.h"
19 
20 // TMS Support
21 #include "TileMapService.h"
22 
23 namespace geHikingViewer {
24 
26  {
27  public:
30  void clear();
31  void create();
32  void update(std::shared_ptr<ge::Camera> _cam);
33  void updateQuadtree(std::shared_ptr<ge::Camera> _cam);
34 
35  void draw(std::shared_ptr<ge::Camera> _cam);
36  void loadTerrainService(std::string _shaderPath, std::string _terrainUrl, std::string _texUrl, float _heightScale);
37  void switchTerrainShader(std::string _shaderPath);
38 
39  bool isDangerEnabled();
40  void switchDanger();
41 
42  void setDangerHeight(float h);
43  float getDangerHeight();
44  void enableNorthSouth(bool e);
45  void setDangerOrientation(float o);
46  int getRiskLevel();
47  void setRiskLevel(int level);
48  void setHikingDangerSection(float s);
49 
50  private:
51  void updateGeometryForPosition(std::shared_ptr<ge::Camera> _cam);
55  void loadElevationTile(int _tmsid, const std::shared_ptr<geSpatial::Tile> _tile);
56  void loadTextureTile(int _tmsid, const std::shared_ptr<geSpatial::Tile> _tile);
57 
58  void setupTileService(int _cacheSize);
59  void requestInitialTMSTiles(int _tmsid);
60  void getTilesFromTileService(int _tmsid);
61 
62  void createHikingBintree(short _lod, double _distLod, double _heightScale,
63  std::shared_ptr<ge::Shader> _shader, geRaster::KPatchBase::PatchMode _mode,
64  vmml::Vector3d _pos, std::string _name);
65 
66  protected:
67  std::shared_ptr<geRaster::TerrainMessageQueue> tileServiceProvider;
68 
70  std::shared_ptr<ge::Shader> programForTerrain;
71  std::shared_ptr<ge::Shader> programForTerrainRiskAnalysis;
72 
73  };
74 }
75 #endif
void clear()
Definition: HikingTerrainModule.cpp:22
void updateQuadtree(std::shared_ptr< ge::Camera > _cam)
Definition: HikingTerrainModule.cpp:79
~HikingTerrainModule()
Definition: HikingTerrainModule.cpp:17
void setDangerHeight(float h)
Definition: HikingTerrainModule.cpp:270
Definition: HikingComposition.h:14
HikingTerrainModule()
Definition: HikingTerrainModule.cpp:11
Definition: TerrainModule.h:24
void create()
Definition: HikingTerrainModule.cpp:27
std::shared_ptr< ge::Shader > programForTerrain
Definition: HikingTerrainModule.h:70
int getRiskLevel()
Definition: HikingTerrainModule.cpp:293
Definition: HikingTerrainModule.h:25
int selectedShader
Definition: HikingTerrainModule.h:69
void enableNorthSouth(bool e)
Definition: HikingTerrainModule.cpp:278
void setRiskLevel(int level)
Definition: HikingTerrainModule.cpp:286
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: HikingTerrainModule.cpp:146
bool isDangerEnabled()
Definition: HikingTerrainModule.cpp:253
void setHikingDangerSection(float s)
Definition: HikingTerrainModule.cpp:297
void switchDanger()
Definition: HikingTerrainModule.cpp:261
std::shared_ptr< ge::Shader > programForTerrainRiskAnalysis
Definition: HikingTerrainModule.h:71
float getDangerHeight()
Definition: HikingTerrainModule.cpp:274
void setDangerOrientation(float o)
Definition: HikingTerrainModule.cpp:282
PatchMode
Definition: KPatchBase.h:21
std::shared_ptr< geRaster::TerrainMessageQueue > tileServiceProvider
Definition: HikingTerrainModule.h:67
void loadTerrainService(std::string _shaderPath, std::string _terrainUrl, std::string _texUrl, float _heightScale)
Definition: HikingTerrainModule.cpp:35
void switchTerrainShader(std::string _shaderPath)
Definition: HikingTerrainModule.cpp:244
void update(std::shared_ptr< ge::Camera > _cam)
Definition: HikingTerrainModule.cpp:96