All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RasterTerrainHeightLookup.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "BuiltResourceWithKey.h"
6 #include "TerrainHeightLookup.h"
7 #include "Types.h"
8 #include "Terrain.h"
9 #include "VectorMath.h"
10 #include "Streaming.h"
11 #include <vector>
12 
13 namespace Eegeo
14 {
15  namespace Resources
16  {
17  namespace Terrain
18  {
19  namespace Raster
20  {
22  {
24  Eegeo::dv3 m_ecefCellCenter;
25  std::vector<float> m_heights;
26  float m_maxHeight;
27  float m_minHeight;
28 
29  public:
30 
32  const Streaming::MortonKey& key,
33  Eegeo::dv3 ecefCellCenter,
34  std::vector<float> heights);
35 
37 
38  bool TryGetHeight(Eegeo::dv3 ecefPoint, float &height) const;
39  bool TryGetHeight(Eegeo::dv3 ecefPoint, Streaming::MortonKey key, float &height) const;
40 
41  float GetMaxHeight() const { return m_maxHeight; }
42  float GetMinHeight() const { return m_minHeight; }
43 
44  void Unload();
45  void RemovedFromSceneGraph();
46  void AddedToSceneGraph();
47 
48  const Eegeo::Streaming::MortonKey& GetMortonKey() const;
49  };
50  }
51  }
52  }
53 }