GlobeEngine
TileManager.hpp
Go to the documentation of this file.
1 //
2 // TileManager.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 15/05/16.
6 //
7 //
8 
9 #ifndef TileManager_hpp
10 #define TileManager_hpp
11 
12 #include <stdio.h>
13 #include <vector>
14 #include "GlobeEngineGeoTiff.h"
15 #include "SpatialKey.h"
16 #include "Tile.hpp"
17 
18 #include <vmmlib/vmmlib.hpp>
19 
20 namespace geTerrainPreprocess{
21 
22  enum Mode{
23  NONE = 0,
26  };
27 
28  class TileMapService;
29 
30  class TileManager{
31  private:
32  std::vector<TilePtr> tiles;
33  Mode mode;
34  TileMapService *tms;
35  bool isWorkingOnNormals = false;
36  vmml::Vector2i horizontalBounds;
37  int lod;
38  unsigned short ifReplace = 0;
39 
40  public:
41  void createHorizontalTiles(geSpatial::SpatialKey2ui _key, geoTiffIo::GeoInfo _info, vmml::Vector2i _bounds);
42  void clear();
43  void writeScanlineToTiles(geoTiffIo::ScanLineBufferPtr _scanline, double _PCSbegin, double _PCSend, uint32_t _row);
46  void loadHorizontalTiles(geSpatial::SpatialKey2ui _key, vmml::Vector2i _bounds);
47  geoTiffIo::ScanLineBufferPtr readScanlineFromTiles(uint32_t _row);
48  vmml::Vector2d getScanlinePCSBound();
49 
50  public:
51  void setTms(TileMapService *_tms){ tms = _tms; };
52  void setMode(Mode _mode){ mode = _mode; };
53  vmml::Vector2i getHorizontalBounds(){ return horizontalBounds; };
54  int getLod(){ return lod; };
55  Mode getMode(){ return mode; };
56  void setIfReplace(unsigned short _ifr){ ifReplace = _ifr; };
57  };
58 }
59 #endif /* TileManager_hpp */
Definition: TileManager.hpp:30
Definition: TileManager.hpp:23
int getLod()
Definition: TileManager.hpp:54
void clear()
Definition: TileManager.cpp:34
Mode getMode()
Definition: TileManager.hpp:55
void setIfReplace(unsigned short _ifr)
Definition: TileManager.hpp:56
void writeScanlineToTiles(geoTiffIo::ScanLineBufferPtr _scanline, double _PCSbegin, double _PCSend, uint32_t _row)
Definition: TileManager.cpp:41
void createHorizontalTiles(geSpatial::SpatialKey2ui _key, geoTiffIo::GeoInfo _info, vmml::Vector2i _bounds)
Definition: TileManager.cpp:13
void loadHorizontalTiles(geSpatial::SpatialKey2ui _key, vmml::Vector2i _bounds)
Definition: TileManager.cpp:78
vmml::Vector2d getScanlinePCSBound()
Definition: TileManager.cpp:184
Mode
Definition: TileManager.hpp:22
void setMode(Mode _mode)
Definition: TileManager.hpp:52
void loadTile(geSpatial::SpatialKey2ui _key)
Definition: TileManager.cpp:66
Definition: TileManager.hpp:24
Definition: NormalCommand.h:14
Definition: SpatialKey.h:137
geoTiffIo::ScanLineBufferPtr readScanlineFromTiles(uint32_t _row)
Definition: TileManager.cpp:161
Definition: TileMapService.hpp:39
void mergeFour(geSpatial::SpatialKey2ui _key)
Definition: TileManager.cpp:100
vmml::Vector2i getHorizontalBounds()
Definition: TileManager.hpp:53
void setTms(TileMapService *_tms)
Definition: TileManager.hpp:51
Definition: TileManager.hpp:25