All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorLabelModel.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Interiors.h"
6 #include "Labels.h"
7 #include "Types.h"
8 #include "IAnchoredLabelSource.h"
9 #include "ICallback.h"
10 #include "CallbackCollection.h"
11 
12 #include <vector>
13 
14 namespace Eegeo
15 {
16  namespace Resources
17  {
18  namespace Interiors
19  {
21  {
22  public:
24 
25 
26  virtual ~IInteriorLabelModelObserver() {;}
27 
28  virtual void RegisterLabelSourceAddedCallback(CallbackType& callback) = 0;
29  virtual void RegisterLabelSourceRemovedCallback(CallbackType& callback) = 0;
30 
31  virtual void UnregisterLabelSourceAddedCallback(CallbackType& callback) = 0;
32  virtual void UnregisterLabelSourceRemovedCallback(CallbackType& callback) = 0;
33  };
34 
35 
37  {
38  public:
40 
42 
43  void UpdateTransforms(const m44& floorTransform, const dv3& floorTransformPivot);
44 
45  void AddLabelsForFloorCells(const std::vector<const InteriorsFloorCell*>& floorCells);
46  void RemoveLabelsForFloorCells();
47 
48 
49 
50  void NotifyInteriorFloorCellAdded(const InteriorsFloorCell& interiorFloorCell);
51  void NotifyInteriorFloorCellRemoved(const InteriorsFloorCell& interiorFloorCell);
52 
53  void RegisterLabelSourceAddedCallback(CallbackType& callback);
54  void RegisterLabelSourceRemovedCallback(CallbackType& callback);
55 
56  void UnregisterLabelSourceAddedCallback(CallbackType& callback);
57  void UnregisterLabelSourceRemovedCallback(CallbackType& callback);
58 
59  private:
60  void AddLabelsForFloorCell(const InteriorsFloorCell& floorCell);
61  void RemoveLabelsForFloorCell(const InteriorsFloorCell& floorCell);
62 
63  void NotifyAdded(const Labels::IAnchoredLabelSource* pAnchoredLabelSource);
64  void NotifyRemoved(const Labels::IAnchoredLabelSource* pAnchoredLabelSource);
65 
66  typedef std::vector<Labels::TransformedLabelCellModel*> LabelCellModelVector;
67  LabelCellModelVector m_labelSourcesForFloors;
68 
71 
72  };
73  }
74  }
75 }