All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MapCameraAnimationOptionsBuilder.h
1 #pragma once
2 
3 #include "MapCamera.h"
4 #include "Types.h"
5 #include "MapCameraAnimationOptions.h"
6 
7 namespace Eegeo
8 {
9  namespace Camera
10  {
11  namespace MapCamera
12  {
13  static inline MapCameraAnimationOptions MakeDefaultMapCameraAnimationOptions()
14  {
15  return{ 0.33, 500.0, 1.0, 2.0, 5000.0, false, false, true, true };
16  }
17 
19  {
20  public:
21  MapCameraAnimationOptionsBuilder(const MapCameraAnimationOptions& defaultOptions = MakeDefaultMapCameraAnimationOptions());
22 
23  MapCameraAnimationOptionsBuilder& SetDuration(double durationSeconds);
24  MapCameraAnimationOptionsBuilder& SetSnapDistanceThreshold(double snapDistanceMetres);
25  MapCameraAnimationOptionsBuilder& SetSnapIfDistanceExceedsThreshold(bool snapIfDistanceExceedsThreshold);
26  MapCameraAnimationOptionsBuilder& SetInterruptByGestureAllowed(bool interruptByGestureAllowed);
27  // remove if possible - added as workaround for behaviour expected by wrld.js / eegeo-js-example, rely on blocking during transitions
28  MapCameraAnimationOptionsBuilder& SetInterruptByApiAllowed(bool interruptByApiAllowed);
29  MapCameraAnimationOptionsBuilder& SetMinDuration(double minDurationSeconds);
30  MapCameraAnimationOptionsBuilder& SetMaxDuration(double maxDurationSeconds);
31  MapCameraAnimationOptionsBuilder& SetPreferredAnimationSpeed(double animationSpeedMetersPerSecond);
32 
34  private:
35 
36  double m_durationSeconds;
37  double m_preferredAnimationSpeed;
38  double m_minDuration;
39  double m_maxDuration;
40  double m_snapDistanceThreshold;
41  bool m_hasExplicitDuration;
42  bool m_snapIfDistanceExceedsThreshold;
43  bool m_interruptByGestureAllowed;
44  bool m_interruptByApiAllowed;
45 
46  };
47  }
48  }
49 }