All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TerrainHeightProvider.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Terrain.h"
7 #include "VectorMathDecl.h"
8 #include "Streaming.h"
9 
10 namespace Eegeo
11 {
12  namespace Resources
13  {
14  namespace Terrain
15  {
16  namespace Heights
17  {
19  {
20  private:
21  TerrainHeightRepository& m_heightRepository;
22  bool m_debugLog;
23  static const int MAX_TERRAIN_DEPTH;
24  public:
26 
27  virtual ~TerrainHeightProvider();
28 
29  bool TryGetHeight(const Eegeo::dv3& ecefPosition, int minLevel, float& out_terrainHeight) const;
30 
31  bool TryGetHeight(const Eegeo::dv3& ecefPosition, const Streaming::MortonKey& key, float& out_terrainHeight) const;
32 
33  bool TryGetHeight(const Eegeo::dv3& ecefPosition,
34  int minLevel,
35  int previousQueryTerminationLevel,
36  float previousQueryTerrainHeight,
37  int& out_queryTerminationLevel,
38  float& out_terrainHeight) const;
39 
40  bool HasHeightsForKey(Streaming::MortonKey key) const;
41 
42  float GetMaxHeight() const;
43  float GetMinHeight() const;
44 
45  void SetDebugLog(bool enabled) { m_debugLog = enabled; }
46  };
47  }
48  }
49  }
50 }