All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsStreamingModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Interiors.h"
7 #include "InteriorsMaterials.h"
8 #include "Rendering.h"
9 #include "Modules.h"
10 #include "CityThemes.h"
11 #include "AsyncTexturing.h"
12 #include "Collision.h"
13 #include "IdTypes.h"
14 #include "Lighting.h"
15 #include "Helpers.h"
16 #include "Labels.h"
17 #include "LabelLayer.h"
18 #include "ICallback.h"
19 #include "Config.h"
20 #include "Icons.h"
21 #include "ChunkedFileFormat.h"
22 
23 #include <string>
24 #include "PropStreamingService.h"
25 
26 namespace Eegeo
27 {
28  namespace Modules
29  {
30  namespace Map
31  {
32  namespace Layers
33  {
35  {
36  public:
37  virtual ~InteriorsStreamingModule();
38 
39  static InteriorsStreamingModule* Create(Modules::Core::RenderingModule& renderingModule,
40  Core::FontsModule& fontsModule,
41  Icons::IconsModule& iconsModule,
42  Labels::LabelsModule& labelsModule,
43  Modules::Map::Layers::InteriorsModelModule& interiorsModelModule,
44  Modules::Map::Layers::InteriorsMaterialsModule& interiorsMaterialsModule,
47  Rendering::IMeshUploadService* pMeshUploadService,
48  Helpers::IFileIO& fileIO,
49  const Eegeo::Config::PlatformConfig& platformConfig,
50  Web::IWebLoadRequestFactory& webLoadRequestFactory,
52  const Web::ApiTokenModel& apiTokenModel
53  );
54 
55  virtual Resources::Interiors::InteriorsStreaming& GetInteriorsStream() const;
56 
57  virtual Resources::Interiors::Markers::InteriorMarkersCellResourceBuilder& GetInteriorMarkersCellResourceBuilder() const;
58 
59  virtual Labels::LabelLayer::IdType GetLabelLayerId() const { return m_labelLayerId; }
60 
61  virtual Labels::LabelLayer::IdType GetInteriorMarkerLabelLayerId() const { return m_interiorMarkerLabelLayerId; }
62 
63  virtual void Update(float dt);
64 
65  virtual Resources::Interiors::PropStreamingService& GetPropStreamingService() const;
66 
67  virtual Resources::Interiors::PropResourceRepository& GetPropResourceRepository() const;
68 
69  virtual Resources::Interiors::Webservice::IInteriorEntitiesWebService& GetInteriorEntitiesWebService() const;
70 
71  virtual Resources::Interiors::Builder::InteriorRenderableService& GetInteriorRenderableService() const;
72 
73  private:
74 
80  Resources::Interiors::Markers::InteriorMarkersCellResourceBuilder* pInteriorMarkersCellResourceBuilder,
81  Resources::Interiors::Builder::IInteriorLabelAnchorCategoryMapperFactory* pInteriorLabelAnchorCategoryMapperFactory,
84  Resources::Interiors::IInteriorLabelCategoryLoader* pInteriorLabelCategoryLoader,
85  Resources::Interiors::IInteriorLabelCategoryParser* pInteriorLabelCategoryParser,
86  Resources::Interiors::IUpdatableLoader& interiorLabelCategoryLoaderUpdatable,
88  Labels::LabelModelSource* pInteriorMarkerLabelModelSource,
90  const Labels::LabelAnchorCategory* pIndoorMarkerLabelAnchorCategory,
91  const Labels::LabelLayer::IdType labelLayerId,
92  const Labels::LabelLayer::IdType interiorMarkerLabelLayerId,
93  Resources::Interiors::PropResourceRepository* pPropResourceRepository,
94  Resources::Interiors::PropStreamingService* pPropStreamingService,
96 
97 
98  void OnLabelCategoryLoadCompleted(const Resources::Interiors::InteriorLabelCategoryLoaderResult& result);
99 
100  void LoadLabelCategories(const std::string& interiorLabelCategoriesUrl);
101 
102 
103  Resources::Interiors::InteriorsStreaming* m_pInteriorsStreaming;
104 
105  Resources::Interiors::Builder::ChunkedInteriorsBuilder* m_pChunkedInteriorsBuilder;
108  Resources::Interiors::Builder::InteriorRenderableService* m_pInteriorRenderableService;
109  Resources::Interiors::Markers::InteriorMarkersCellResourceBuilder* m_pInteriorMarkersCellResourceBuilder;
110  Resources::Interiors::Builder::IInteriorLabelAnchorCategoryMapperFactory* m_pInteriorLabelAnchorCategoryMapperFactory;
111  Resources::Interiors::Builder::IInteriorLabelAnchorCategoryMapper* m_pInteriorLabelAnchorCategoryMapper;
113  Resources::Interiors::IInteriorLabelCategoryLoader* m_pInteriorLabelCategoryLoader;
114  Resources::Interiors::IInteriorLabelCategoryParser* m_pInteriorLabelCategoryParser;
115  Resources::Interiors::IUpdatableLoader& m_interiorLabelCategoryLoaderUpdatable;
116  Resources::Interiors::PropStreamingService* m_pPropStreamingService;
118  Resources::Interiors::PropResourceRepository* m_pPropResourceRepository;
119 
120  Resources::Interiors::Markers::IInteriorMarkerLabelBuilder* m_pInteriorMarkerLabelBuilder;
121  Labels::LabelModelSource* m_pInteriorMarkerLabelModelSource;
122  Resources::Interiors::Markers::InteriorMarkerLabelController* m_pInteriorMarkerLabelController;
123  const Labels::LabelAnchorCategory* m_pIndoorMarkerLabelAnchorCategory;
124 
125  const Labels::LabelLayer::IdType m_labelLayerId;
126  const Labels::LabelLayer::IdType m_interiorMarkerLabelLayerId;
127 
128  bool m_interiorLabelCategoriesLoaded;
129 
131  };
132  }
133  }
134  }
135 }