MCPcopy Create free account
hub / github.com/TomClabault/HIPRT-Path-Tracer / normalize_texture_paths

Method normalize_texture_paths

src/Scene/SceneParser.cpp:519–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519std::vector<std::pair<aiTextureType, std::string>> SceneParser::normalize_texture_paths(std::vector<std::pair<aiTextureType, std::string>>& paths)
520{
521 std::vector<std::pair<aiTextureType, std::string>> normalized_paths;
522 normalized_paths.reserve(paths.size());
523
524 for (auto pair : paths)
525 {
526 size_t find_index = pair.second.find("%20");
527 while (find_index != (size_t)-1)
528 {
529 pair.second = pair.second.replace(find_index, 3, " ");
530 find_index = pair.second.find("%20");
531 }
532
533 normalized_paths.push_back(pair);
534 }
535
536 return normalized_paths;
537}
538
539CPUMaterial SceneParser::offset_textures_indices(const CPUMaterial& renderer_material, int offset)
540{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected