All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FittedRouteFactory.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Routes.h"
6 #include "NavGraphConformerConfig.h"
7 #include "Terrain.h"
8 #include "Streaming.h"
9 #include "Navigation.h"
10 
11 namespace Eegeo
12 {
13  namespace Routes
14  {
15  namespace Fitting
16  {
18  {
20  };
21 
23  {
24  private:
25  const Fitting::NavGraphFittingInfoRepository& m_roadNavGraphSplineRepository;
26  const Fitting::NavGraphFittingInfoRepository& m_railNavGraphSplineRepository;
27  const Streaming::SceneGraphCellRepository& m_sceneGraphCellRepository;
28  const Resources::Terrain::Heights::TerrainHeightProvider& m_terrainHeightProvider;
29  Eegeo::Routes::Fitting::NavGraphDebugAnnotation* m_navGraphDebugAnnotation;
30 
31  bool m_fittingToNavgraphEnabled;
32 
33  FittedRouteFactoryConfig m_config;
34 
35  void UpdateDebugNavGraphAnnotation(const Streaming::MortonKey& key);
36  public:
37 
38  FittedRouteFactory(const Fitting::NavGraphFittingInfoRepository& roadNavGraphSplineRepository,
39  const Fitting::NavGraphFittingInfoRepository& railNavGraphSplineRepository,
40  const Streaming::SceneGraphCellRepository& sceneGraphCellRepository,
41  const Resources::Terrain::Heights::TerrainHeightProvider& terrainHeightProvider,
42  const FittedRouteFactoryConfig& config);
43 
44  FittedRoute* CreateFittedRoute(const Route* pRoute, const Eegeo::Streaming::MortonKey& key);
45 
46  FittedRoute* CreateUnfittedRoute(const Route* pRoute, const Eegeo::Streaming::MortonKey& key, bool projectToTerrain);
47 
48  bool FittingToNavgraphEnabled() const;
49 
50  void ToggleFittingToNavgraph();
51 
52  bool IsUnfittedSectionHighlightEnabled() const;
53 
54  void ToggleHighlightUnfittedSections();
55 
56  FittedRouteFactoryConfig GetConfig() const { return m_config; }
57  void SetConfig(const FittedRouteFactoryConfig& config) { m_config = config; }
58 
59  void SetNavGraphDebugVisualiser(Eegeo::Routes::Fitting::NavGraphDebugAnnotation* visualiser) { m_navGraphDebugAnnotation = visualiser; }
60 
61  static FittedRouteFactoryConfig DefaultConfig();
62  };
63  }
64  }
65 }