All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MapCameraCoordinator.h
1 #pragma once
2 
3 #include "MapCamera.h"
4 #include "Types.h"
5 #include "ICallback.h"
6 #include "Rendering.h"
7 #include "MapLayers.h"
8 #include "Interiors.h"
9 
10 #include <string>
11 
12 namespace Eegeo
13 {
14  namespace Camera
15  {
16  namespace MapCamera
17  {
19  {
20  public:
22  IMapCameraModelChangedEvent& mapCameraModelChangedEvent,
23  IMapCameraModelScreenPropertiesChangedEvent& mapCameraModelScreenPropertiesChangedEvent,
24  IMapCameraTransitionFinishedEvent& mapCameraTransitionFinishedEvent,
25  IMapCameraDerivedStateChangedEvent& mapCameraDerivedStateModelChangedEvent,
26  IMapCameraTransitionGestureInterruptEvent& mapCameraTransitionGestureInterruptEvent,
27  const IMapCameraZoomLevels& mapCameraZoomLevels,
28  MapCameraModel& mapCameraModel,
29  MapCameraDerivedStateModel& mapCameraDerivedStateModel,
30  MapCameraStreamingVolumeModel& mapCameraStreamingVolumeModel,
31  const MapLayers::IMapViewModeModel& mapViewModeModel,
32  MapLayers::MapViewModeChangedEvent& mapViewModeChangedEvent,
33  Resources::Interiors::InteriorSelectionModel& interiorSelectionModel,
34  const Resources::Interiors::Markers::InteriorMarkerModelRepository& interiorMarkerModelRepository,
35  Resources::Interiors::InteriorInteractionModel& interiorInteractionModel,
36  IndoorOutdoorModalCameraController& indoorOutdoorModalCameraController,
38  const bool validateIndoorMapPermission
39  );
40 
42 
43  void EarlyUpdate(float dt);
44 
45  private:
46 
47  void OnMapCameraModelChanged(const MapCameraModelChangedEventMessage& message);
48  void OnMapCameraModelScreenPropertiesChanged(const Rendering::ScreenProperties& screenProperties);
49  void OnDerivedStateChanged();
50  void OnMapViewModeChanged();
51  void OnInteriorInteractionModelChanged();
52  void OnInteriorInteractionStateChanged();
53  void OnMapCameraTransitionFinished(const MapCameraAnimationId& animationId);
54  void OnMapCameraTransitionGestureInterrupt();
55  void OnInteriorMetaDataAdded(const Resources::Interiors::MetaData::InteriorMetaDataModelMessage& message);
56  void SynchroniseMapCameraModelWithInteriorInteractionModel();
57 
58  void UpdateDerivedState();
59 
60  void SetInteriorCameraControllerFocusOrigin();
61  void ExitIndoorMap();
62  void SelectIndoorMapFloor(const MapCameraPosition& mapCameraPosition);
63  void UpdateStreamingVolumeFromDerivedState();
64  bool IsIndoorMapAccessAllowed(const std::string& indoorMapId);
65  bool TryFocusIndoorMapMetaDataLocation(const std::string& indoorMapId);
66 
67  IMapCameraModelChangedEvent& m_mapCameraModelChangedEvent;
68  IMapCameraModelScreenPropertiesChangedEvent& m_mapCameraModelScreenPropertiesChangedEvent;
69  IMapCameraTransitionFinishedEvent& m_mapCameraTransitionFinishedEvent;
70  IMapCameraDerivedStateChangedEvent& m_mapCameraDerivedStateModelChangedEvent;
71  IMapCameraTransitionGestureInterruptEvent& m_mapCameraTransitionGestureInterruptEvent;
72 
73  const IMapCameraZoomLevels& m_mapCameraZoomLevels;
74  MapCameraModel& m_mapCameraModel;
75  MapCameraDerivedStateModel& m_mapCameraDerivedStateModel;
76  MapCameraStreamingVolumeModel& m_mapCameraStreamingVolumeModel;
77 
78  const MapLayers::IMapViewModeModel& m_mapViewModeModel;
79  MapLayers::MapViewModeChangedEvent& m_mapViewModeChangedEvent;
80 
81  Resources::Interiors::InteriorSelectionModel& m_interiorSelectionModel;
82  const Resources::Interiors::Markers::InteriorMarkerModelRepository& m_interiorMarkerModelRepository;
83  Resources::Interiors::InteriorInteractionModel& m_interiorInteractionModel;
84 
85  IndoorOutdoorModalCameraController& m_indoorOutdoorModalCameraController;
87  const bool m_validateIndoorMapPermission;
88 
91  Helpers::TCallback0<MapCameraCoordinator> m_mapCameraDerivedStateModelChangedHandler;
92  Helpers::TCallback0<MapCameraCoordinator> m_mapViewModeChangedHandler;
93  Helpers::TCallback0<MapCameraCoordinator> m_interiorInteractionModelChangedHandler;
94  Helpers::TCallback0<MapCameraCoordinator> m_interiorInteractionStateChangedHandler;
95 
97  Helpers::TCallback0<MapCameraCoordinator> m_mapCameraTransitionGestureInterruptHandler;
99 
100  bool m_needsStreamingVolumeUpdate;
101  };
102  }
103  }
104 }