All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HeatmapShapeController.h
1 #pragma once
2 
3 #include "HeatmapShapes.h"
4 #include "Types.h"
5 #include "ICallback.h"
6 #include "HeatmapShapeArgs.h"
7 #include "MapCamera.h"
8 
9 namespace Eegeo
10 {
11  namespace Shapes
12  {
13  namespace Heatmaps
14  {
16  {
17  public:
19  IHeatmapGeometryChangedEvent& heatmapGeometryChangedEvent,
20  IHeatmapGradientChangedEvent& heatmapGradientChangedEvent,
21  IHeatmapDataChangedEvent& heatmapDataChangedEvent,
22  IHeatmapUniformsChangedEvent& heatmapUniformsChangedEvent,
23  HeatmapShapeArgs::ShapeModelChangedEvent& shapeModelChangedEvent,
24  const HeatmapShapeArgs::ShapeModelRepository& shapeModelRepository,
25  const HeatmapShapeArgs::ShapeViewRepository& shapeViewRepository,
26  const Eegeo::Camera::MapCamera::IMapCameraService& mapCameraService
27  );
28 
30 
31  void Update();
32  private:
33  void OnHeatmapGeometryChanged(const HeatmapShapeModelChangedMessage& message);
34  void OnHeatmapGradientChanged(const HeatmapShapeModelChangedMessage& message);
35  void OnHeatmapDataChanged(const HeatmapShapeModelChangedMessage& message);
36  void OnHeatmapUniformsChanged(const HeatmapShapeModelChangedMessage& message);
37  void OnShapeModelChanged(const HeatmapShapeArgs::ShapeModelChangedMessage& message);
38 
39  bool IsPendingViewRecreate(IShapeModel::IdType heatmapId) const;
40  bool CanHandle(IShapeModel::IdType heatmapId) const;
41  void UpdateInterpolatedDensityByZoom(const HeatmapShapeModel& heatmapModel, double zoom) const;
42 
43  IHeatmapGeometryChangedEvent& m_heatmapGeometryChangedEvent;
44  IHeatmapGradientChangedEvent& m_heatmapGradientChangedEvent;
45  IHeatmapDataChangedEvent& m_heatmapDataChangedEvent;
46  IHeatmapUniformsChangedEvent& m_heatmapUniformsChangedEvent;
47  HeatmapShapeArgs::ShapeModelChangedEvent& m_shapeModelChangedEvent;
48  const HeatmapShapeArgs::ShapeModelRepository& m_shapeModelRepository;
49  const HeatmapShapeArgs::ShapeViewRepository& m_shapeViewRepository;
50  const Eegeo::Camera::MapCamera::IMapCameraService& m_mapCameraService;
56 
57  std::vector<IShapeModel::IdType> m_pendingViewRecreate;
58  std::vector<HeatmapShapeModel*> m_needUpdateDensityByZoom;
59  };
60  }
61  }
62 }