Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
TrafficCongestion
TrafficCongestionSimulationController.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "Types.h"
6
#include "TrafficCongestion.h"
7
#include "ITrafficCongestionService.h"
8
#include "ITrafficThemeModelObserver.h"
9
#include "TrafficCongestionStateChangedCallback.h"
10
#include "Traffic.h"
11
#include "Navigation.h"
12
#include "NavigationGraphAddedCallback.h"
13
#include "NavigationGraphRemovalCallback.h"
14
#include "MortonKey.h"
15
#include "VectorMathDecl.h"
16
#include "Rendering.h"
17
18
19
namespace
Eegeo
20
{
21
namespace
TrafficCongestion
22
{
23
class
TrafficCongestionSimulationController
24
:
protected
Eegeo::NonCopyable
,
25
public
Eegeo::Traffic::Themes::ITrafficThemeModelObserver
26
{
27
public
:
28
TrafficCongestionSimulationController
(
29
Eegeo::TrafficCongestion::TrafficCongestionModel
& trafficCongestionModel,
30
Eegeo::Traffic::VehicleRenderablesModel
& pVehicleRenderablesModel,
31
Eegeo::TrafficCongestion::TrafficCongestionVehicleFactory
& pVehicleFactory,
32
const
TrafficCongestionConfig
& config,
33
Eegeo::Resources::Roads::Navigation::NavigationGraphRepository
& navGraphRepository,
34
Eegeo::Traffic::Themes::TrafficThemeModel
& trafficThemeModel,
35
Streaming::CameraFrustumStreamingVolume
& streamingVolume);
36
37
~
TrafficCongestionSimulationController
();
38
39
void
Update(
float
dt,
const
dv3
& cameraEcefLocation);
40
void
SubmitForRendering(
Eegeo::Traffic::VehicleRenderer
& vehicleRenderer,
const
dv3
& ecefCameraPosition);
41
42
43
void
ToggleEnable()
44
{
45
m_enabled = !m_enabled;
46
}
47
48
bool
GetEnabled() {
return
m_enabled; }
49
50
void
OnThemeChanged(
const
Eegeo::Traffic::Themes::TrafficThemeModel
& themeModel);
51
void
OnThemeStateChanged(
const
Eegeo::Traffic::Themes::TrafficThemeModel
& themeModel);
52
53
private
:
54
55
56
void
HandleNavGraphAdded(
const
Resources::Roads::Navigation::NavigationGraph
& navGraph);
57
void
HandleNavGraphRemoved(
const
Resources::Roads::Navigation::NavigationGraph
& navGraph);
58
void
HandleTrafficCongestionModelChanged(
const
TrafficCongestion::TrafficCongestionModelCell
& changed);
59
60
typedef
std::map<Eegeo::Streaming::MortonKey, TrafficCongestionSimulationCell*, Streaming::MortonKeyCompare> TMortonKeyToSimulationCellMap;
61
62
Eegeo::TrafficCongestion::TTrafficCongestionStateChangedCallback<TrafficCongestionSimulationController>
m_trafficCongestionModelChangedFunctor;
63
Eegeo::Resources::Roads::Navigation::TNavigationGraphAddedCallback<TrafficCongestionSimulationController>
m_navGraphAddedFunctor;
64
Eegeo::Resources::Roads::Navigation::TNavigationGraphRemovalCallback<TrafficCongestionSimulationController>
m_navGraphRemovedFunctor;
65
66
Eegeo::TrafficCongestion::TrafficCongestionModel
& m_trafficCongestionModel;
67
Eegeo::Traffic::VehicleRenderablesModel
& m_vehicleRenderablesModel;
68
Eegeo::TrafficCongestion::TrafficCongestionVehicleFactory
& m_vehicleFactory;
69
70
const
TrafficCongestionConfig
& m_config;
71
72
TMortonKeyToSimulationCellMap m_keyToSimulationCell;
73
bool
m_enabled;
74
75
Eegeo::Resources::Roads::Navigation::NavigationGraphRepository
& m_navGraphRepository;
76
Traffic::Themes::TrafficThemeModel
& m_trafficThemeModel;
77
Streaming::CameraFrustumStreamingVolume
& m_streamingVolume;
78
};
79
}
80
}
Generated on Sat Jun 10 2023 02:00:34 for eeGeo Platform SDK by
1.8.3.1