|
std::vector< ID3D11ShaderResourceView * > & | Get (TextureType type) const |
|
std::vector< std::wstring > | GetPaths (TextureType type) const |
|
ID3D11ShaderResourceView * | GetTexture (TextureType type, int index) const |
|
std::wstring | GetTexturePath (TextureType type, int index) const |
|
void | ReleaseAll () |
|
void | AssignTexture (TextureContainer &textContainer, ID3D11ShaderResourceView *texture, const std::wstring paths, int index) |
|
Definition at line 33 of file model_class.h.
◆ AssignTexture()
void TextureContainer::AssignTexture |
( |
TextureContainer & | textContainer, |
|
|
ID3D11ShaderResourceView * | texture, |
|
|
const std::wstring | paths, |
|
|
int | index ) |
|
inline |
Definition at line 105 of file model_class.h.
106 {
107 switch (index)
108 {
109 case 0:
110 textContainer.diffuse.push_back(texture);
111 textContainer.diffusePaths.push_back(paths);
112 break;
113 case 1:
114 textContainer.normal.push_back(texture);
115 textContainer.normalPaths.push_back(paths);
116 break;
117 case 2:
118 textContainer.specular.push_back(texture);
119 textContainer.specularPaths.push_back(paths);
120 break;
121 case 3:
122 textContainer.alpha.push_back(texture);
123 textContainer.alphaPaths.push_back(paths);
124 break;
125 default:
126 textContainer.diffuse.push_back(texture);
127 textContainer.diffusePaths.push_back(paths);
128 break;
129 }
130 }
◆ Get()
std::vector< ID3D11ShaderResourceView * > & TextureContainer::Get |
( |
TextureType | type | ) |
const |
|
inline |
Definition at line 50 of file model_class.h.
50 {
51 switch (type) {
52 case TextureType::Diffuse: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(diffuse);
53 case TextureType::Normal: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(normal);
54 case TextureType::Specular: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(specular);
55 case TextureType::Alpha: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(alpha);
56 default: return const_cast<std::vector<ID3D11ShaderResourceView*>&>(diffuse);
57 }
58 }
◆ GetPaths()
std::vector< std::wstring > TextureContainer::GetPaths |
( |
TextureType | type | ) |
const |
|
inline |
Definition at line 61 of file model_class.h.
61 {
62 switch (type)
63 {
64 case TextureType::Diffuse: return std::vector<std::wstring>(diffusePaths);
65 case TextureType::Normal: return std::vector<std::wstring>(normalPaths);
66 case TextureType::Specular: return std::vector<std::wstring>(specularPaths);
67 case TextureType::Alpha: return std::vector<std::wstring>(alphaPaths);
68 default: return std::vector<std::wstring>(diffusePaths);
69 }
70 }
◆ GetTexture()
ID3D11ShaderResourceView * TextureContainer::GetTexture |
( |
TextureType | type, |
|
|
int | index ) const |
|
inline |
Definition at line 74 of file model_class.h.
74 {
75 auto& vec = Get(type);
76 if (index >= 0 && index < vec.size())
77 return vec[index];
78 return nullptr;
79 }
◆ GetTexturePath()
std::wstring TextureContainer::GetTexturePath |
( |
TextureType | type, |
|
|
int | index ) const |
|
inline |
Definition at line 82 of file model_class.h.
83 {
84 std::vector<std::wstring> path = GetPaths(type);
85 if (index >= 0 && index < path.size())
86 return path[index];
87 return L"";
88 }
◆ ReleaseAll()
void TextureContainer::ReleaseAll |
( |
| ) |
|
|
inline |
Definition at line 92 of file model_class.h.
92 {
93 ReleaseVector(diffuse);
94 ReleaseVector(normal);
95 ReleaseVector(specular);
96 ReleaseVector(alpha);
97
98 ReleaseVector(diffusePaths);
99 ReleaseVector(normalPaths);
100 ReleaseVector(specularPaths);
101 ReleaseVector(alphaPaths);
102 }
◆ alpha
std::vector<ID3D11ShaderResourceView*> TextureContainer::alpha |
◆ alphaPaths
std::vector<std::wstring> TextureContainer::alphaPaths |
◆ diffuse
std::vector<ID3D11ShaderResourceView*> TextureContainer::diffuse |
◆ diffusePaths
std::vector<std::wstring> TextureContainer::diffusePaths |
◆ normal
std::vector<ID3D11ShaderResourceView*> TextureContainer::normal |
◆ normalPaths
std::vector<std::wstring> TextureContainer::normalPaths |
◆ specular
std::vector<ID3D11ShaderResourceView*> TextureContainer::specular |
◆ specularPaths
std::vector<std::wstring> TextureContainer::specularPaths |
The documentation for this struct was generated from the following file: