All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PointOnMapTerrainHeightComponent.h
1 #pragma once
2 
3 #include "PointOnMapComponent.h"
4 #include "Helpers.h"
5 #include "Terrain.h"
6 #include "VectorMath.h"
7 #include "Space.h"
8 #include "Streaming.h"
9 #include "ICallback.h"
10 
11 namespace Eegeo
12 {
13  namespace Positioning
14  {
16  {
17  public:
18 
20  const Resources::Terrain::Heights::TerrainHeightProvider& terrainHeightProvider);
21 
23 
24  virtual void NotifyNeedsRefresh(const IPointOnMap& pointOnMap);
25 
26  virtual float GetTerrainHeight() const;
27 
28  private:
29 
30  void SetLocation(const Space::LatLong& location);
31 
32  void OnTerrainHeightChanged(const Streaming::MortonKey& key);
33 
34 
35  bool NeedsUpdate() const;
36 
37  void UpdateTerrainHeight();
38 
39  Helpers::IMortonKeyBasedEventProvider<TerrainHeightResourceChangedEvent>& m_terrainHeightResourceChangedEventProvider;
40  const Resources::Terrain::Heights::TerrainHeightProvider& m_terrainHeightProvider;
41 
43 
44  dv3 m_locationSeaLevel;
45  int m_mostDetailedTerrainLevel;
46  float m_terrainHeight;
47  };
48  }
49 }