All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CityThemeData.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include <map>
6 #include <string>
7 #include "LatLongAltitude.h"
8 #include "TrafficSimulationConfiguration.h"
9 #include "PlaceNameCategoryStyle.h"
10 #include "CityThemeState.h"
11 #include "CityThemeAnimationData.h"
12 #include "InteriorsMaterialsConfiguration.h"
13 
14 namespace Eegeo
15 {
16  namespace Resources
17  {
18  namespace CityThemes
19  {
21  {
22  public:
23 
24  CityThemeId(int manifestGeneration, int themeId);
25  CityThemeId();
26 
27  bool IsValid() const;
28 
29  bool operator ==(const CityThemeId& other) const;
30 
31  bool operator !=(const CityThemeId& other) const;
32 
33  int GetManifestGeneration() const;
34 
35  private:
36 
37  int m_manifestGeneration;
38  int m_themeId;
39  };
40 
42  {
43  public:
44  std::string Name;
45  std::string AssetRoot;
46  Space::LatLong Location;
47  std::string CustomLandmarkTextureRepositoryUrlBase;
48  std::string GlobeViewThemeStateName;
49  float GlobeViewSwitchAltitude;
50  std::vector<std::string> LandmarkTexturePostfixes;
51 
52  float BaseAltitude;
53 
54  std::map<std::string, CityThemeState> States;
55  std::vector<CityThemeAnimationData> Animations;
56  std::vector<Space::LatLong> PolygonBounds;
61  std::map<std::string, Resources::PlaceNames::PlaceNameCategoryStyle> PlaceNameStyleMap;
62 
63  CityThemeData();
64 
65  // Not data in the json, just a helper flag
66  bool IsEmbeddedTheme;
67  CityThemeId Id;
68 
69  bool IsCityThemeStateSupported(const std::string& stateName) const
70  {
71  return States.find(stateName) != States.end();
72  }
73 
74  const CityThemeState& GetCityThemeState(const std::string& stateName) const
75  {
76  return States.at(stateName);
77  }
78 
79  std::map<std::string, std::string> GetLandmarkTexturePathsByState(const std::string& landmarkTextureName) const;
80  };
81 
83  {
84  public:
85  std::vector<CityThemeData*> CityThemes;
86 
88 
89  // Not data in the json, but the source url of the theme (blank if embedded)
90  std::string ManifestUrl;
91 
92  int GetManifestGeneration() const;
93 
94  void DeleteThemes();
95  };
96  }
97  }
98 }