All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MaterialRepository.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 "IMaterialRepository.h"
8 #include <string>
9 #include <unordered_map>
10 
11 namespace Eegeo
12 {
13  namespace Rendering
14  {
16  {
17  public:
18 
20  void AddMaterial(Rendering::Materials::IMaterial* material);
21  void RemoveMaterial(Rendering::Materials::IMaterial* material);
22  bool ContainsMaterial(const std::string& materialName) const;
23  Rendering::Materials::IMaterial* GetMaterial(const std::string& materialName) const;
24  std::vector<Rendering::Materials::IMaterial*> GetMaterials() const;
25  private:
26  typedef std::unordered_map<std::string, Rendering::Materials::IMaterial*> TNameToMaterial;
27  TNameToMaterial m_materials;
28 
29  };
30  }
31 }