File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -93,17 +93,14 @@ const StaticVector<std::string>& Material::getTextures(TextureType type) const
9393 }
9494}
9595
96- StaticVector <std::string> Material::getAllTextures ( ) const
96+ void Material::getAllTexturePaths (std::vector <std::string>& texturePaths ) const
9797{
98- StaticVector<std::string> textures;
99- textures.resize (_bumpTextures.size () + _diffuseTextures.size () + _displacementTextures.size () + _normalTextures.size ());
98+ texturePaths.resize (_bumpTextures.size () + _diffuseTextures.size () + _displacementTextures.size () + _normalTextures.size ());
10099
101- auto last = std::copy (_bumpTextures.begin (), _bumpTextures.end (), textures .begin ());
100+ auto last = std::copy (_bumpTextures.begin (), _bumpTextures.end (), texturePaths .begin ());
102101 last = std::copy (_diffuseTextures.begin (), _diffuseTextures.end (), last);
103102 last = std::copy (_displacementTextures.begin (), _displacementTextures.end (), last);
104103 std::copy (_normalTextures.begin (), _normalTextures.end (), last);
105-
106- return textures;
107104}
108105
109106bool Material::hasTextures (TextureType type) const
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ class Material
5454 // / Get textures by type
5555 const StaticVector<std::string>& getTextures (TextureType type) const ;
5656
57- // / Get all textures used in the material
58- StaticVector <std::string> getAllTextures ( ) const ;
57+ // / Get all texture paths used in the material
58+ void getAllTexturePaths (std::vector <std::string>& texturePaths ) const ;
5959
6060 // / Check if material has textures of a given type
6161 bool hasTextures (TextureType type) const ;
You can’t perform that action at this time.
0 commit comments