From 3e122a972e1082d9b69ec9021df3938a71783b38 Mon Sep 17 00:00:00 2001 From: RedShip Date: Fri, 31 Jan 2025 21:24:06 +0100 Subject: [PATCH] ~ | relativ epath --- srcs/class/BVH.cpp | 4 ++-- srcs/class/ObjParser.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srcs/class/BVH.cpp b/srcs/class/BVH.cpp index be3036e..f709fc6 100644 --- a/srcs/class/BVH.cpp +++ b/srcs/class/BVH.cpp @@ -6,7 +6,7 @@ /* By: ycontre +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/16 21:48:48 by TheRed #+# #+# */ -/* Updated: 2025/01/25 14:25:57 by tomoron ### ########.fr */ +/* Updated: 2025/01/31 19:30:54 by ycontre ### ########.fr */ /* */ /* ************************************************************************** */ @@ -78,7 +78,7 @@ void BVH::subdivide(std::vector &triangles) if (_primitive_count <= 4) return ; - const int num_test_per_axis = 10; + const int num_test_per_axis = 5; int best_axis = 0; float best_pos = 0; diff --git a/srcs/class/ObjParser.cpp b/srcs/class/ObjParser.cpp index 022d998..d1165df 100644 --- a/srcs/class/ObjParser.cpp +++ b/srcs/class/ObjParser.cpp @@ -6,7 +6,7 @@ /* By: ycontre +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/16 15:00:33 by tomoron #+# #+# */ -/* Updated: 2025/01/29 18:26:31 by ycontre ### ########.fr */ +/* Updated: 2025/01/31 19:53:44 by ycontre ### ########.fr */ /* */ /* ************************************************************************** */ @@ -321,7 +321,7 @@ void ObjParser::parseMtl(std::stringstream &input_line, Scene &scene) throw std::runtime_error("OBJ: syntax error while getting material texture"); mat->texture_index = scene.getTextures().size(); - scene.addTexture("scenes/obj/" + path); + scene.addTexture(getFilePath(_filename) + path); } else std::cerr << "unsupported material setting : " << identifier << std::endl;