All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PointOnMapController.h
1 #pragma once
2 
3 #include "Positioning.h"
4 #include "Types.h"
5 #include "Terrain.h"
6 #include "Collision.h"
7 #include "ICallback.h"
8 #include "Interiors.h"
9 #include "IEvent.h"
10 #include "MapLayers.h"
11 #include "Rendering.h"
12 #include "Streaming.h"
13 
14 #include <set>
15 #include <vector>
16 
17 namespace Eegeo
18 {
19  namespace Positioning
20  {
22  {
23  public:
24  PointOnMapController(Collision::ICollisionBvhProvider& terrainCollisionRepository,
25  Resources::Interiors::IInteriorViewModelObserver& interiorViewModelObserver,
26  Resources::Interiors::InteriorsModelRepository& interiorsModelRepository,
27  MapLayers::MapViewModeChangedEvent& mapViewModeChangedEvent,
28  Rendering::EnvironmentFlatteningService& environmentFlatteningService,
29  TerrainHeightResourceChangedEvent& terrainHeightResourceChangedEvent,
30  InteriorModelChangedEvent& interiorModelChangedEvent,
31  PositioningViewComponentChangedEvent& positioningViewComponentChangedEvent);
32 
33  virtual ~PointOnMapController();
34 
35  virtual void Update(float dt);
36 
37  private:
38  void OnTerrainCollisionCellAdded(const Streaming::MortonKey& key, const Collision::CollisionBvh&);
39 
40  void OnInteriorViewModelChanged();
41 
42  void OnInteriorModelRepositoryAdded(Resources::Interiors::InteriorsModel& interiorModel);
43 
44  void OnEnvironmentFlatteningServiceChanged();
45 
46  void OnMapViewModelChanged();
47 
48  Collision::ICollisionBvhProvider& m_terrainCollisionRepository;
49  Resources::Interiors::IInteriorViewModelObserver& m_interiorViewModelObserver;
50  Resources::Interiors::InteriorsModelRepository& m_interiorsModelRepository;
51 
52  MapLayers::MapViewModeChangedEvent& m_mapViewModeChangedEvent;
53  Rendering::EnvironmentFlatteningService& m_environmentFlatteningService;
54 
55 
56  TerrainHeightResourceChangedEvent& m_terrainHeightResourceChangedEvent;
57  InteriorModelChangedEvent& m_interiorModelChangedEvent;
58  PositioningViewComponentChangedEvent& m_positioningViewComponentChangedEvent;
59 
61  Helpers::TCallback0<PointOnMapController> m_interiorViewModelChangedCallback;
63  Helpers::TCallback0<PointOnMapController> m_environmentFlatteningServiceChangedCallback;
64  Helpers::TCallback0<PointOnMapController> m_mapViewModeModelChangedCallback;
65 
66  std::set<Streaming::MortonKey> m_terrainCollisionResourcesChanged;
67  bool m_interiorViewModelChanged;
68  std::set<Resources::Interiors::InteriorId> m_interiorModelsChanged;
69  bool m_environmentFlatteningChanged;
70  bool m_mapViewModeChanged;
71  };
72 
73 
74  }
75 }