|
|
|
|
@ -42,6 +42,9 @@
@@ -42,6 +42,9 @@
|
|
|
|
|
#include "ConfigEnv.h" |
|
|
|
|
#include "cuda/MeshTextureCUDA.h" |
|
|
|
|
#include <sstream> |
|
|
|
|
#include <filesystem> |
|
|
|
|
|
|
|
|
|
namespace fs = std::filesystem; |
|
|
|
|
|
|
|
|
|
// namespace py = pybind11;
|
|
|
|
|
|
|
|
|
|
@ -9589,12 +9592,13 @@ bool Scene::TextureMesh(unsigned nResolutionLevel, unsigned nMinResolution, unsi
@@ -9589,12 +9592,13 @@ bool Scene::TextureMesh(unsigned nResolutionLevel, unsigned nMinResolution, unsi
|
|
|
|
|
printf("id=%s\n", id.c_str()); |
|
|
|
|
|
|
|
|
|
#ifdef MASK_FACE_OCCLUSION |
|
|
|
|
std::string basePath = ""; |
|
|
|
|
size_t lastSlash = baseFileName.find_last_of('/'); |
|
|
|
|
size_t secondLastSlash = baseFileName.find_last_of('/', lastSlash - 1); |
|
|
|
|
if (secondLastSlash == std::string::npos) |
|
|
|
|
basePath = baseFileName; |
|
|
|
|
basePath = baseFileName.substr(0, secondLastSlash + 1); |
|
|
|
|
fs::path p(baseFileName.c_str()); |
|
|
|
|
// 2. 获取父路径 (e.g., /path/to/data/scene)
|
|
|
|
|
fs::path parent = p.parent_path(); |
|
|
|
|
|
|
|
|
|
// 4. 转换为字符串,并附加一个路径分隔符
|
|
|
|
|
// ( / "" 会自动处理,确保 /path/to/data 变为 /path/to/data/ )
|
|
|
|
|
std::string basePath = (parent / "").string(); |
|
|
|
|
|
|
|
|
|
// printf("basePath=%s\n", basePath.c_str());
|
|
|
|
|
|
|
|
|
|
|