All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
NavGraphConformer.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Routes.h"
7 #include "MortonKey.h"
8 #include "NavGraphConformerConfig.h"
9 #include "SelectedRoadRepository.h"
10 #include "NavGraphConformerConfig.h"
11 #include "CubeMapCellInfo.h"
12 #include "Streaming.h"
13 
14 #include <vector>
15 
16 namespace Eegeo
17 {
18  namespace Routes
19  {
20  namespace Fitting
21  {
22  namespace NavGraphConforming
23  {
25  {
26  public:
28  const Route& route,
29  const Eegeo::Streaming::MortonKey& key,
30  const NavGraphFittingInfoRepository& roadNavGraphFittingInfoRepository,
31  const NavGraphFittingInfoRepository& railNavGraphFittingInfoRepository,
32  const Streaming::SceneGraphCellRepository& sceneGraphCellRepository,
33  const FittingTerrainProjector& fittingTerrainProjector);
34 
35 
36 
37  virtual ~NavGraphConformer();
38 
39  virtual void GenerateInputForKeyAndNeighbours(std::vector<NavGraphConforming::ConformerRouteSection>& out_mergedRouteSections);
40 
41  virtual void GenerateInputForKeyOnly(std::vector<NavGraphConforming::ConformerRouteSection>& out_mergedRouteSections);
42 
43  virtual FittedRoute* CreateFittedRoute(const std::vector<NavGraphConforming::ConformerRouteSection>& mergedRouteSections);
44 
45  private:
46 
47  const Route& m_route;
48  const Eegeo::Streaming::MortonKey m_key;
50  const NavGraphFittingInfoRepository& m_roadNavGraphFittingInfoRepository;
51  const NavGraphFittingInfoRepository& m_railNavGraphFittingInfoRepository;
52  const Streaming::SceneGraphCellRepository& m_sceneGraphCellRepository;
53  const FittingTerrainProjector& m_fittingTerrainProjector;
54 
55  const NavGraphConformerConfig m_config;
56 
57  std::vector<Streaming::MortonKey> m_keyAndAdjacents;
58  SelectedRoadRepository m_selectedRoadRepository;
59 
60  void GenerateClippedRouteSectionsForKeyAndNeighbours(std::vector<Clipping::ClippedRouteSection>& out_clippedRouteSections);
61 
62  bool ConformRouteSections(const NavGraphConforming::ConformerRouteSection& conformerRouteSection,
63  const std::vector<LocalRouteVertex>& inputLocalRouteVertices,
64  std::vector<FittedRouteSection>& out_conformedSections);
65 
66  bool TryBuildFittedRouteSections(const std::vector<NavGraphConforming::ConformerRouteSection>& mergedRouteSections,
67  std::vector<FittedRouteSection>& out_fittedRouteSections);
68 
69 
70  bool TryBuildFittedRouteSections(const NavGraphConforming::ConformerRouteSection& conformerRouteSection,
71  std::vector<FittedRouteSection>& out_fittedRouteSections);
72  };
73  }
74  }
75  }
76 }