7 #include "VectorMath.h"
11 #include <unordered_map>
23 typedef std::pair<std::string, std::string> SemanticStringPair;
24 typedef std::pair<std::string, v4> SemanticColorPair;
25 typedef std::pair<std::string, float> SemanticScalarPair;
26 typedef std::pair<std::string, bool> SemanticBooleanPair;
31 Rendering::LayerIds::Values renderableLayer,
36 Rendering::LayerIds::Values renderableLayer,
38 const std::vector<SemanticStringPair>& strings,
39 const std::vector<SemanticColorPair>& colors,
40 const std::vector<SemanticScalarPair>& scalars);
45 const std::vector<SemanticStringPair>& strings,
46 const std::vector<SemanticColorPair>& colors,
47 const std::vector<SemanticScalarPair>& scalars);
50 const std::vector<SemanticStringPair>& strings,
51 const std::vector<SemanticColorPair>& colors,
52 const std::vector<SemanticScalarPair>& scalars,
53 const std::vector<SemanticBooleanPair>& booleans);
59 std::string MaterialName()
const {
return m_materialName; }
61 bool HasString(
const std::string& semantic)
const;
62 bool HasColor(
const std::string& semantic)
const;
63 bool HasScalar(
const std::string& semantic)
const;
64 bool HasBoolean(
const std::string& semantic)
const;
66 std::string GetString(
const std::string& semantic)
const;
67 v4 GetColor(
const std::string& semantic)
const;
68 float GetScalar(
const std::string& semantic)
const;
69 bool GetBoolean(
const std::string& semantic)
const;
71 std::string GetStringOrDefault(
const std::string& semantic,
const std::string& defaultValue)
const;
72 v4 GetColorOrDefault(
const std::string& semantic,
const v4& defaultValue)
const;
73 float GetScalarOrDefault(
const std::string& semantic,
const float defaultValue)
const;
74 bool GetBooleanOrDefault(
const std::string& semantic,
const bool defaultValue)
const;
76 const std::unordered_map<std::string, std::string>& GetStrings()
const {
return m_strings; }
77 const std::unordered_map<std::string, v4>& GetColors()
const {
return m_colors; }
78 const std::unordered_map<std::string, float>& GetScalars()
const {
return m_scalars; }
79 const std::unordered_map<std::string, bool>& GetBooleans()
const {
return m_booleans; }
83 const std::string& materialName,
84 const std::unordered_map<std::string, std::string>& strings,
85 const std::unordered_map<std::string, v4>& colors,
86 const std::unordered_map<std::string, float>& scalars,
87 const std::unordered_map<std::string, bool>& booleans);
89 std::string m_materialName;
91 std::unordered_map<std::string, std::string> m_strings;
92 std::unordered_map<std::string, v4> m_colors;
93 std::unordered_map<std::string, float> m_scalars;
94 std::unordered_map<std::string, bool> m_booleans;