BRE12
DrawableObjectLoader.h
1 #pragma once
2 
3 #include <string>
4 #include <unordered_map>
5 #include <vector>
6 
7 #include <SceneLoader\DrawableObject.h>
8 #include <SceneLoader\MaterialTechnique.h>
9 
10 namespace YAML {
11 class Node;
12 }
13 
14 namespace BRE {
15 class MaterialPropertiesLoader;
16 class MaterialTechniqueLoader;
17 class ModelLoader;
18 
20 public:
21  using DrawableObjectsByModelName = std::unordered_map<std::string, std::vector<DrawableObject>>;
22 
23  DrawableObjectLoader(const MaterialPropertiesLoader& materialPropertiesLoader,
24  const MaterialTechniqueLoader& materialTechniqueLoader,
25  const ModelLoader& modelLoader)
26  : mMaterialPropertiesLoader(materialPropertiesLoader)
27  , mMaterialTechniqueLoader(materialTechniqueLoader)
28  , mModelLoader(modelLoader)
29  {}
30 
32  const DrawableObjectLoader& operator=(const DrawableObjectLoader&) = delete;
34  DrawableObjectLoader& operator=(DrawableObjectLoader&&) = delete;
35 
36  void LoadDrawableObjects(const YAML::Node& rootNode) noexcept;
37 
38  const DrawableObjectsByModelName& GetDrawableObjectsByModelNameByTechniqueType(
39  const MaterialTechnique::TechniqueType techniqueType) const noexcept
40  {
41  return mDrawableObjectsByModelName[techniqueType];
42  }
43 
44 private:
45  DrawableObjectsByModelName mDrawableObjectsByModelName[MaterialTechnique::NUM_TECHNIQUES];
46 
47  const MaterialPropertiesLoader& mMaterialPropertiesLoader;
48  const MaterialTechniqueLoader& mMaterialTechniqueLoader;
49  const ModelLoader& mModelLoader;
50 };
51 }
52 
Definition: Camera.cpp:8
Definition: MaterialTechniqueLoader.h:15
Definition: DrawableObjectLoader.h:19
Definition: ModelLoader.h:16
Definition: DrawableObjectLoader.h:10
Definition: MaterialPropertiesLoader.h:13
Definition: node.h:29