All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SceneGraphCellRepository.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "MortonKey.h"
7 #include "Streaming.h"
8 #include <vector>
9 
10 namespace Eegeo
11 {
12  namespace Streaming
13  {
15  {
16  static const int MAX_REFINE_DEPTH = 14;
17 
18  std::vector<MortonKey> m_cellKeysPresentInScene;
19  std::vector<ISceneGraphCellCallback*> m_addedCallbacks;
20  std::vector<ISceneGraphCellCallback*> m_removalCallbacks;
21 
22  void CallAddedCallbacks(const MortonKey& key) const;
23  void CallRemovalCallbacks(const MortonKey& key) const;
24 
25  std::vector<MortonKey> m_cellsAdded;
26  std::vector<MortonKey> m_cellsRemoved;
27  std::vector<MortonKey> m_clampedCells;
28 
29  public:
30 
31  void GetCellsInSceneGraph(std::vector<MortonKey>& output) const; // Not used. Should go.
32  bool IsCellInSceneGraph(const MortonKey& key) const; // Should go but used.
33 
34  void RegisterAddedCallback(ISceneGraphCellCallback* callback);
35  void UnregisterAddedCallback(ISceneGraphCellCallback* callback);
36 
37  void RegisterRemovalCallback(ISceneGraphCellCallback* callback);
38  void UnregisterRemovalCallback(ISceneGraphCellCallback* callback);
39 
40  void UpdateCells(std::vector<MortonKey>& cellKeysInSceneGraph);
41  };
42  }
43 }