GlobeEngine
TerrainModule.h
Go to the documentation of this file.
1 
11 #ifndef GlobeEngine_TerrainModule_h
12 #define GlobeEngine_TerrainModule_h
13 
14 #include "OpenGL_Includes.h"
15 #include "DrawableComponent.h"
16 #include "KPatchBintree.h"
17 #include "MBlockQuadtree.h"
18 #include "Tile.h"
19 #include "TileMapService.h"
20 #include "QuadPatchField.h"
21 
22 namespace geRaster {
23 
25  {
26 
27  public:
28  TerrainModule();
29  virtual ~TerrainModule();
30  virtual void clear();
31  void createBasicSetup(double _scale);
32  virtual void update(std::shared_ptr<ge::Camera> _cam) = 0;
33  virtual void draw(std::shared_ptr<ge::Camera> _cam);
34 
35  void createBintree(short _lod, double _distLod,
36  double _heightScale, std::shared_ptr<ge::Shader> _shader,
38  vmml::Vector3d _pos, std::string _name);
39 
40  void createQuadPatchTree(geRaster::TerrainTriangulationInfo _triangulationInfo, std::shared_ptr<ge::Shader> _shader, vmml::Vector3d _pos, std::string _name, geRaster::TerrainVis::VisualizationMode _mode);
41 
42  void createQuadtree(vmml::Vector2d _zeropos, double _scale);
43 
45  int _minLod, int _maxLod, std::string _url,
47 
48  //void updateGeometry(vmml::Vector3d _center, bool _forcePositionChange);
49  void updateGeometry(vmml::Vector3d _center);
50 
52  bool isModuleActive();
53  void rescale(float _in);
54 
55  std::shared_ptr<geRaster::MBlockQuadtree> getElevationQuadtree();
56  std::shared_ptr<geRaster::KPatchBintree> getBintree();
57  std::string getName();
58 
59  void recompileShader();
60 
63 
64  protected:
65  std::shared_ptr<geRaster::MBlockQuadtree> quadtree;
66  std::vector<tileService::TileMapService*> tmslist;
67 
68  //geRaster::TerrainVis::TriangulationTechnique technique;
70 
71  // The RASTeR bintree
72  std::shared_ptr<geRaster::KPatchBintree> bintree;
73 
74  // The Frostbite triangulation patches
75  std::shared_ptr<geRaster::QuadPatchField> quadpatchfield;
76 
77  float heightScale;
79  };
80 }
81 #endif
std::shared_ptr< geRaster::QuadPatchField > quadpatchfield
Definition: TerrainModule.h:75
std::string getName()
Definition: TerrainModule.cpp:155
void createBintree(short _lod, double _distLod, double _heightScale, std::shared_ptr< ge::Shader > _shader, geRaster::KPatchBase::PatchMode _mode, vmml::Vector3d _pos, std::string _name)
Definition: TerrainModule.cpp:92
std::shared_ptr< geRaster::MBlockQuadtree > quadtree
Definition: TerrainModule.h:65
void printElevationBintreeInfo()
Definition: TerrainModule.cpp:196
void createQuadPatchTree(geRaster::TerrainTriangulationInfo _triangulationInfo, std::shared_ptr< ge::Shader > _shader, vmml::Vector3d _pos, std::string _name, geRaster::TerrainVis::VisualizationMode _mode)
Definition: TerrainModule.cpp:103
int addTileMapService(int _minLod, int _maxLod, std::string _url, enum geRaster::TerrainVis::Layertype _type)
Definition: TerrainModule.cpp:121
Definition: TerrainConfigStructs.h:47
void printElevationQuadtreeInfo()
Definition: TerrainModule.cpp:185
Definition: TerrainModule.h:24
Definition: KPatchBase.h:13
virtual ~TerrainModule()
Definition: TerrainModule.cpp:22
std::shared_ptr< geRaster::KPatchBintree > getBintree()
Definition: TerrainModule.cpp:147
std::shared_ptr< geRaster::MBlockQuadtree > getElevationQuadtree()
Definition: TerrainModule.cpp:143
std::shared_ptr< geRaster::KPatchBintree > bintree
Definition: TerrainModule.h:72
geRaster::TerrainTriangulationInfo technique
Definition: TerrainModule.h:69
std::vector< tileService::TileMapService * > tmslist
Definition: TerrainModule.h:66
void setVisualizationMode(geRaster::TerrainVis::VisualizationMode _mode)
Definition: TerrainModule.cpp:151
float heightScale
Definition: TerrainModule.h:77
void createBasicSetup(double _scale)
Definition: TerrainModule.cpp:32
bool isModuleActive()
Definition: TerrainModule.cpp:163
void createQuadtree(vmml::Vector2d _zeropos, double _scale)
Definition: TerrainModule.cpp:115
bool loadTexture
Definition: TerrainModule.h:78
void recompileShader()
Definition: TerrainModule.cpp:171
virtual void update(std::shared_ptr< ge::Camera > _cam)=0
void updateGeometry(vmml::Vector3d _center)
Definition: TerrainModule.cpp:37
virtual void draw(std::shared_ptr< ge::Camera > _cam)
Definition: TerrainModule.cpp:74
Layertype
Definition: TerrainConfigStructs.h:24
PatchMode
Definition: KPatchBase.h:21
void rescale(float _in)
Definition: TerrainModule.cpp:159
TerrainModule()
Definition: TerrainModule.cpp:12
VisualizationMode
Definition: TerrainConfigStructs.h:17
virtual void clear()
Definition: TerrainModule.cpp:27