All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MapCameraService.h
1 #pragma once
2 
3 #include "IMapCameraService.h"
4 #include "Types.h"
5 #include "CameraState.h"
6 #include "Space.h"
7 #include "MapCameraServiceConfiguration.h"
8 #include "GlobeCamera.h"
9 
10 namespace Eegeo
11 {
12  namespace Camera
13  {
14  namespace MapCamera
15  {
17  {
18  public:
20  const IMapCameraZoomLevels& mapCameraZoomLevels,
21  MapCameraModel& mapCameraModel,
22  MapCameraDerivedStateModel& mapCameraDerivedStateModel,
23  MapCameraStreamingVolumeModel& mapCameraStreamingVolumeModel,
24  MapCameraDistanceFromBoundsCalculator& mapCameraDistanceFromBoundsCalculator,
25  const MapCameraServiceConfiguration& mapCameraServiceConfiguration,
27  );
28 
30 
31  void SetScreenProperties(const Rendering::ScreenProperties& screenProperties);
32 
33  void SetCustomRenderCamera(const Eegeo::Camera::CameraState& cameraState);
34 
35  void ClearCustomRenderCamera();
36 
37  void SetCustomStreamingCamera(const Eegeo::Camera::CameraState& cameraState);
38 
39  void ClearCustomStreamingCamera();
40 
41  void SetIndoorCameraRestriction(bool applyRestriction);
42 
43  void SetVerticallyLocked(bool isVerticallyLocked);
44 
45  void SetScreenSpaceOffset(float screenX, float screenY);
46  void DisableScreenSpaceOffset();
47 
48  const Eegeo::Camera::CameraState& GetCameraState() const;
49 
50  MapCameraPosition GetMapCameraPosition() const;
51 
52  void MoveCamera(const MapCameraUpdate& mapCameraUpdate);
53 
54 
55  MapCameraAnimationId AnimateCamera(
56  const MapCameraUpdate& animationTarget,
57  const MapCameraAnimationOptions& mapCameraAnimationOptions
58  );
59 
60  void CancelAnimation();
61 
62  bool IsAnimating() const;
63 
64  double GetZoomLevel() const;
65 
66  double GetDistanceFromZoomLevel(double zoomLevel) const;
67  double GetZoomLevelFromDistance(double distanceToInterest) const;
68  private:
69  MapCameraPosition BuildMapCameraPositionFromUpdate(const MapCameraUpdate& mapCameraUpdate) const;
70  MapCameraPosition BuildMapCameraPositionForPointOnMap(const MapCameraUpdate& mapCameraUpdate) const;
71  MapCameraPosition BuildMapCameraPositionForPosition(const MapCameraUpdate& mapCameraUpdate) const;
72  MapCameraPosition BuildMapCameraPositionForLatLongBounds(const MapCameraUpdate& mapCameraUpdate) const;
73  MapCameraPosition BuildMapCameraPositionForZoomDelta(const MapCameraUpdate& mapCameraUpdate) const;
74 
75  bool HasNonInterruptibleAnimation() const;
76 
77  const IMapCameraZoomLevels& m_mapCameraZoomLevels;
78  MapCameraModel& m_mapCameraModel;
79  MapCameraDerivedStateModel& m_mapCameraDerivedStateModel;
80  MapCameraStreamingVolumeModel& m_mapCameraStreamingVolumeModel;
81  MapCameraDistanceFromBoundsCalculator& m_mapCameraDistanceFromBoundsCalculator;
82  const MapCameraServiceConfiguration m_mapCameraServiceConfiguration;
83  GlobeCamera::IGlobeCameraScreenSpaceOffsetControl& m_mapCameraScreenSpaceOffsetControl;
84  int m_nextAnimationId;
85  };
86  }
87  }
88 }