All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MapCameraAnimator.h
1 #pragma once
2 
3 #include "MapCamera.h"
4 #include "Positioning.h"
5 #include "MapCameraPosition.h"
6 #include "MapCameraAnimationFrame.h"
7 #include "GlobeCamera.h"
8 
9 namespace Eegeo
10 {
11  namespace Camera
12  {
13  namespace MapCamera
14  {
15 
17  {
18  public:
19  static MapCameraAnimator* Create(
20  Positioning::IPointOnMapFactory& pointOnMapFactory,
21  const Positioning::IPositioningViewComponent& positioningViewComponent,
22  const Camera::GlobeCamera::IGlobeCameraDistanceBasedPitchControl& distanceBasedPitchControl
23  );
24 
26 
27  void Begin(
28  const MapCameraPosition& start,
29  const MapCameraPosition& target
30  );
31 
32  MapCameraAnimationFrame CalculateFrame(double interpolationParam);
33 
34  private:
36  Positioning::IPointOnMap* pStartInterestPointOnMap,
37  Positioning::IPointOnMap* pEndInterestPointOnMap,
38  const Positioning::IPositioningViewComponent& positioningViewComponent,
39  const Camera::GlobeCamera::IGlobeCameraDistanceBasedPitchControl& distanceBasedPitchControl
40  );
41 
42  double CalculateTransformedAltitude(const Positioning::IPointOnMap& pointOnMap) const;
43  double CalculateClampedZenithAngle(double desiredZenithAngleDegrees, double distanceToInterest) const;
44 
45  Positioning::IPointOnMap* const m_pStartInterestPointOnMap;
46  Positioning::IPointOnMap* const m_pEndInterestPointOnMap;
47  const Positioning::IPositioningViewComponent& m_positioningViewComponent;
48  const Camera::GlobeCamera::IGlobeCameraDistanceBasedPitchControl& m_distanceBasedPitchControl;
49 
50  MapCameraAnimationFrame m_startFrame;
51  MapCameraPosition m_endMapCameraPosition;
52  };
53  }
54  }
55 }