All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PointOnMapInteriorComponent.h
1 #pragma once
2 
3 #include "PointOnMapComponent.h"
4 #include "Helpers.h"
5 #include "Interiors.h"
6 #include "InteriorId.h"
7 #include "ICallback.h"
8 
9 namespace Eegeo
10 {
11  namespace Positioning
12  {
14  {
15  public:
17  const Resources::Interiors::InteriorsModelRepository& interiorsModelRepository,
18  const Resources::Interiors::InteriorId& indoorMapId,
19  int indoorMapFloorId,
20  bool matchOnFloorIndex,
21  bool useDefaultFloorIndex);
22 
23  virtual ~PointOnMapInteriorComponent();
24 
25  virtual void NotifyNeedsRefresh(const IPointOnMap& pointOnMap);
26 
27  virtual double GetIndoorMapFloorAltitude() const;
28 
29  virtual double GetIndoorMapBaseAltitude() const;
30 
31  virtual const Resources::Interiors::InteriorId& GetIndoorMapId() const { return m_indoorMapId; }
32 
33  virtual int GetIndoorMapFloorId() const { return m_indoorMapFloorId; }
34 
35  virtual int GetDerivedFloorIndex() const { return m_derivedFloorIndex; }
36 
37  virtual void SetIndoorMapId(const Resources::Interiors::InteriorId& indoorMapId);
38 
39  virtual void SetIndoorMapFloorId(int indoorMapFloorId);
40 
41 
42  private:
43  void Refresh(bool forceUpdate);
44 
45  bool TryUpdateDerivedState(bool forceUpdate);
46 
47  void OnInteriorModelChanged(const Resources::Interiors::InteriorId& interiorId);
48 
49  void UpdateFloorOffset(const Resources::Interiors::InteriorsModel& interiorsModel);
50 
52 
53  const Resources::Interiors::InteriorsModelRepository& m_interiorsModelRepository;
55  int m_indoorMapFloorId;
56 
57  bool m_matchOnFloorIndex;
58  bool m_useDefaultFloorIndex;
59 
61  float m_indoorMapBaseAltitude;
62  float m_indoorMapFloorAltitude;
63 
64  int m_derivedFloorIndex;
65  };
66  }
67 }