All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VehicleModelNodeRepository.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Rendering.h"
7 #include "Traffic.h"
8 #include <vector>
9 #include <string>
10 #include <set>
11 #include <map>
12 
13 namespace Eegeo
14 {
15  namespace Traffic
16  {
18  {
19  public:
22 
23  void AddVehicleNodesFromModel(Rendering::SceneModels::SceneModel* model, const std::vector<Config::TrafficSimulationVehicleConfiguration>& vehiclesConfigList, std::set<std::string> &nodeSuffixes);
24  IVehicleModel* GetVehicleModel(const std::string& name);
25 
26  int GetCount() const { return static_cast<int>(m_modelNameToModelMap.size()); }
27  bool HasModelForName(const std::string& name) const { return m_modelNameToModelMap.find(name) != m_modelNameToModelMap.end(); }
28 
29  void Clear();
30 
31  private:
32  std::map<const std::string, IVehicleModel*> m_modelNameToModelMap;
33 
34  void AddVehicleToMapIfValid(Rendering::SceneModels::SceneModel *model, const std::string& modelName);
35  };
36  }
37 }