All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TrafficModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Modules.h"
7 #include "Rendering.h"
8 #include "Traffic.h"
9 #include "TrafficCongestion.h"
10 #include "Location.h"
11 #include "Camera.h"
12 #include "AsyncModels.h"
13 #include "CityThemes.h"
14 #include "Random.h"
15 #include "Streaming.h"
16 #include "Terrain.h"
17 #include "Navigation.h"
18 #include "PlatformConfig.h"
19 #include "Lighting.h"
20 
21 namespace Eegeo
22 {
23  namespace Modules
24  {
26  {
27  public:
34  Rendering::EnvironmentFlatteningService& environmentFlatteningService,
35  Io::AsyncModels::HttpAsyncModelLoader& asyncModelLoader,
37  Resources::CityThemes::ThemeStateController& themeStateController,
38  const Config::PlatformConfig& config,
39  Rendering::Materials::NullMaterialFactory& nullMaterialFactory,
40  const Lighting::GlobalLighting& lighting,
41  Lighting::GlobalFogging& fogging,
42  Rendering::RenderableFilters& renderableFilters,
43  const Streaming::ResourceCeilingProvider& resourceCeilingProvider,
44  Rendering::IMaterialProvider& materialProvider,
47 
48  ~TrafficModule();
49 
50  static TrafficModule* Create(Eegeo::Modules::Core::CoreModule& coreModule,
52  const Config::PlatformConfig& config);
53 
54  void Update(float dt, const Camera::RenderCamera& renderCamera, const dv3& ecefInterestPoint);
55 
56  void SetEnabled(bool value);
57  bool IsEnabled() const;
58 
59  TrafficCongestion::TrafficCongestionSimulationController& GetTrafficCongestionSimulationController() const;
60  TrafficCongestion::ITrafficCongestionService& GetTrafficCongestionService() const;
61  Traffic::TrafficSimulationController& GetTrafficSimulationController() const;
62 
63  private:
64  Random m_random;
65  bool m_enabled;
66  Traffic::Themes::TrafficThemeModel* m_pTrafficThemeModel;
67  Traffic::Themes::TrafficThemeController* m_pTrafficThemeController;
68 
69  Traffic::TrafficSimulationFactory* m_pTrafficSimulationFactory;
70  Eegeo::Traffic::TrafficSimulationController* m_pTrafficSimulationController;
71 
72  Eegeo::Traffic::VehicleModelNodeRepository* m_pVehicleModelNodeRepository;
73  Eegeo::Traffic::VehicleRenderer* m_pTrafficVehicleRenderer;
74  Eegeo::Rendering::Materials::NullMaterial* m_pTrafficSimulationNullMaterial;
75 
76  Eegeo::TrafficCongestion::TrafficCongestionModel* m_pTrafficCongestionModel;
77  Eegeo::Traffic::VehicleRenderablesModel* m_pTrafficCongestionVehicleRenderablesModel;
78  Eegeo::Traffic::VehicleRenderer* m_pTrafficCongestionVehicleRenderer;
79  Eegeo::TrafficCongestion::TrafficCongestionConfig* m_pTrafficCongestionConfig;
80  Eegeo::TrafficCongestion::TrafficCongestionSimulationController* m_pTrafficCongestionSimulationController;
81  Eegeo::TrafficCongestion::TrafficCongestionVehicleFactory* m_pTrafficCongestionVehicleFactory;
82  Eegeo::TrafficCongestion::TrafficCongestionService* m_pTrafficCongestionService;
83  Eegeo::Traffic::Config::GlobalTrafficConfiguration m_globalTrafficConfiguration;
84  Rendering::RenderableFilters& m_renderableFilters;
85  Resources::Interiors::InteriorTransitionModel& m_interiorTransitionModel;
86  Helpers::TCallback0<TrafficModule> m_interiorTransitionCallback;
87  void HandleInteriorTransitionChange();
88  };
89  }
90 }