All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VehiclesOnNavigationGraphSimulation.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Navigation.h"
7 #include "Traffic.h"
8 #include "Streaming.h"
9 #include "NavigationGraphAddedCallback.h"
10 #include "NavigationGraphRemovalCallback.h"
11 #include "TrafficSimulationAltitudeSpeedConfiguration.h"
12 #include "Terrain.h"
13 #include "Rendering.h"
14 #include <string>
15 
16 namespace Eegeo
17 {
18  namespace Traffic
19  {
21  {
22  public:
26  const Streaming::ResourceCeilingProvider& resourceCeilingProvider,
27  IVehicleFactory* pVehicleFactory,
28  TrafficSimulationCellsModel* pCellsModel,
29  VehicleRenderablesModel* pRenderablesModel,
31  const Rendering::EnvironmentFlatteningService& environmentFlatteningService);
32 
34 
35  VehicleRenderablesModel& GetRenderablesModel() const { return *m_pVehicleRenderablesModel; }
36 
37  bool Enabled() const { return m_enabled; }
38  void SetEnabled(bool enabled) { m_enabled = enabled; }
39 
40  void Update(float deltaTimeSeconds, const dv3& cameraEcefLocation, const dv3& ecefInterestPoint);
41 
42  void UpdateConfig(const Config::TrafficSimulationConfiguration& roadConfig);
43  void UpdateAltitudeSpeedConfig(Config::TrafficSimulationAltitudeSpeedConfiguration config);
44  void ApplyVehicleSuffixChange(const std::string &suffix);
45 
46  void Reset();
47 
48  private:
49  Traffic::Config::TrafficSimulationAltitudeSpeedConfiguration m_trafficSimulationAltitudeSpeedConfig;
51  const Streaming::ResourceCeilingProvider& m_resourceCeilingProvider;
52  TrafficSimulationCellsModel* m_pCellsModel;
53  IVehicleFactory* m_pVehicleFactory;
54  VehicleRenderablesModel* m_pVehicleRenderablesModel;
55  bool m_enabled;
57  const Rendering::EnvironmentFlatteningService& m_environmentFlatteningService;
58 
59  void UpdateCells(float deltaSeconds, const dv3& cameraEcefLocation, const dv3& ecefInterestPoint);
60  void CreateAndAddSimulationCell(const Resources::Roads::Navigation::NavigationGraph& navGraph);
61  void RemoveSimulationCellForKey(const Streaming::MortonKey& key);
62 
63  void NavigationGraphAdded(const Resources::Roads::Navigation::NavigationGraph& navGraph);
64  void NavigationGraphRemoved(const Resources::Roads::Navigation::NavigationGraph& navGraph);
65 
68  };
69  }
70 }