All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RoutesModule.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 "Rendering.h"
8 #include "Streaming.h"
9 #include "Resources.h"
10 #include "Lighting.h"
11 #include "Terrain.h"
12 #include "Navigation.h"
13 #include "Modules.h"
14 #include "Web.h"
15 #include "Positioning.h"
16 #include "Interiors.h"
17 
18 #include "RouteRepository.h"
19 #include "FittedRouteRepository.h"
20 #include "RouteViewRepository.h"
21 #include "RouteClippingService.h"
22 #include "RouteSimulationViewRepository.h"
23 #include "RouteSimulationSessionRepository.h"
24 #include "RoutingRequestBuilder.h"
25 
26 namespace Eegeo
27 {
28  namespace Modules
29  {
30  class RoutesModule : protected Eegeo::NonCopyable
31  {
32  public:
33  static RoutesModule* Create(
34  Modules::Core::CoreModule& coreModule,
35  Modules::Map::MapModule& mapModule,
36  Web::IWebLoadRequestFactory& webLoadRequestFactory,
37  const Web::ApiTokenModel& apiTokenModel);
38 
40  Rendering::Shaders::ShaderIdGenerator& shaderIdGenerator,
41  Rendering::Materials::MaterialIdGenerator& materialIdGenerator,
42  Rendering::GlBufferPool& glBufferPool,
44  Rendering::Materials::NullMaterialFactory& nullMaterialFactory,
45  Rendering::RenderableFilters& renderableFilters,
47  Streaming::SceneGraphCellRepository& sceneGraphCellRepository,
48  const Rendering::EnvironmentFlatteningService& environmentFlatteningService,
53  Rendering::Filters::SceneModelRenderableFilter& sceneModelRenderableFilter,
54  const Eegeo::Positioning::IPositioningViewComponent& positioningViewComponent,
55  Eegeo::Positioning::IPointOnMapFactory& pointOnMapFactory,
57  Web::IWebLoadRequestFactory& webLoadRequestFactory,
58  const Web::ApiTokenModel& apiTokenModel
59  );
60  ~RoutesModule();
61 
62  Routes::RouteService& GetRouteService() const;
63  Routes::RouteFactory& GetRouteFactory() const;
64  Routes::Simulation::RouteSimulationService& GetRouteSimulationService() const;
65  Routes::Simulation::RouteSimulationSessionRepository& GetRouteSimulationSessionRepository();
66  Routes::Simulation::View::RouteSimulationViewService& GetRouteSimulationViewService() const;
67  Routes::RouteRepository& GetRouteRepository();
68  Routes::View::RouteViewRepository& GetRouteViewRepository();
69  Routes::Fitting::FittedRouteFactory& GetFittedRouteFactory() const;
70  Routes::Fitting::FittedRouteRepository& GetFittedRouteRepository();
71  Routes::Fitting::RouteFittingService& GetRouteFittingService() const;
72  Routes::View::RouteViewRenderer& GetRouteViewRenderer() const;
73  Routes::Webservice::RoutingRequestBuilder& GetRoutingRequestBuilder();
74  Routes::Webservice::IRoutingWebservice& GetRoutingWebservice() const;
75  Routes::View::RouteViewRenderableFactory& GetRouteViewRenderableFactory() const;
76 
77  Rendering::VertexLayouts::VertexLayout& GetRouteRenderVertexLayout() const { return *m_pRouteRenderVertexLayout; }
78 
79  void EarlyUpdate(float dt);
80  void Update(float dt);
81 
82  private:
83  Rendering::RenderableFilters& m_renderableFilters;
84 
85  Routes::RouteRepository m_routeRepository;
86  Routes::RouteStyleRepository* m_pRouteStyleRepository;
87  Routes::View::RouteViewFactoryRepository* m_pRouteViewFactoryRepository;
88  Routes::StyleMappingRouteObserver *m_pStyleMappingRouteObserver;
89  Routes::View::ViewFactoryMappingRouteObserver *m_pViewFactoryMappingRouteObserver;
90  Routes::Fitting::FittedRouteRepository m_fittedRouteRepository;
91  Routes::Fitting::FittedRouteFactory* m_pFittedRouteFactory;
92  Routes::Fitting::RouteObserver* m_pRouteFittingRouteObserver;
93  Routes::View::RouteViewRepository m_routeViewRepository;
94  Routes::View::RouteViewStyleObserver* m_pRouteViewStyleObserver;
95  Routes::Fitting::RouteFittingService* m_pRouteFittingService;
96  Routes::Fitting::NavGraphFittingInfoService* m_pNavGraphFittingInfoService;
97  Routes::Fitting::NavGraphFittingInfoRepository* m_pRoadNavGraphFittingInfoRepository;
98  Routes::Fitting::NavGraphFittingInfoRepository* m_pRailNavGraphFittingInfoRepository;
99  Routes::Clipping::RouteClippingService m_routeClippingService;
100  Routes::RouteFactory* m_pRouteFactory;
101  Rendering::VertexLayouts::VertexLayout* m_pRouteRenderVertexLayout;
102  Routes::View::RouteViewMeshFactory* m_pRouteViewMeshFactory;
103  Routes::View::RouteViewRenderableFactory* m_pRouteViewRenderableFactory;
104  Routes::View::IRouteViewFactory* m_pDefaultRouteViewFactory;
105  Routes::View::RouteViewShader* m_pRouteViewShader;
106  Routes::View::ScreenSpaceRouteViewShader* m_pScreenSpaceRouteViewShader;
107  Routes::View::RouteViewMaterial* m_pRouteViewMaterial;
108  Routes::View::ScreenSpaceRouteViewMaterial* m_pScreenSpaceRouteViewMaterial;
109  Routes::RouteService* m_pRouteService;
110  Routes::View::RouteViewService* m_pRouteViewService;
111  Routes::RoutingNavigationGraphObserver* m_pRoutingNavigationGraphObserver;
112  Routes::RoutingTerrainHeightsObserver* m_pRoutingTerrainHeightsObserver;
113  Routes::RoutingSceneGraphObserver* m_pRoutingSceneGraphObserver;
114  Routes::View::RouteViewFittedRouteObserver* m_pRouteViewFittedRouteObserver;
115  Routes::View::RouteViewRenderer* m_pRouteViewRenderer;
116  Routes::Simulation::RouteSamplerFactory* m_pRouteSamplerFactory;
117  Routes::Simulation::RouteSimulationSessionFactory* m_pRouteSimulationSessionFactory;
118  Routes::Simulation::RouteSimulationService* m_pRouteSimulationService;
119  Routes::Simulation::View::RouteSimulationViewFactory* m_pRouteSimulationViewFactory;
120  Eegeo::Rendering::Materials::NullMaterial* m_pRouteSimulationViewNullMaterial;
121  Routes::Simulation::View::RouteSimulationViewRepository m_routeSimulationViewRepository;
122  Routes::Simulation::View::RouteSimulationViewService* m_pRouteSimulationViewService;
123  Routes::Simulation::RouteSimulationSessionRepository m_routeSimulationSessionRepository;
124  Routes::Simulation::RouteSimulationSessionFittedRouteObserver* m_pRouteSimulationSessionFittedRouteObserver;
125  Routes::Simulation::RouteSimulationRouteObserver* m_pRouteSimulationRouteObserver;
126  Routes::Webservice::RoutingRequestBuilder m_routingRequestBuilder;
127  Routes::Webservice::IRoutingWebservice* m_pRoutingWebservice;
128  };
129  }
130 }