From fc5b18fdf6df8cab84de15e8198cfdc81205f0df Mon Sep 17 00:00:00 2001 From: albertoesmp Date: Tue, 4 Jun 2024 17:25:51 +0200 Subject: [PATCH] DetailedVoxels and XYZ-derived voxels have the same default material. --- .../geometryfilter/DetailedVoxelLoader.cpp | 5 +++-- .../geometryfilter/XYZPointCloudFileLoader.cpp | 11 +++++------ src/main/helios_version.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/assetloading/geometryfilter/DetailedVoxelLoader.cpp b/src/assetloading/geometryfilter/DetailedVoxelLoader.cpp index 3c756bf14..99661ff90 100644 --- a/src/assetloading/geometryfilter/DetailedVoxelLoader.cpp +++ b/src/assetloading/geometryfilter/DetailedVoxelLoader.cpp @@ -67,7 +67,8 @@ void DetailedVoxelLoader::loadDv( } // Prepare default material Material mat; - mat.isGround = false; + // Legacy default material for vegetation studies commented below + /*mat.isGround = false; mat.useVertexColors = true; mat.reflectance = 0.5; mat.specularity = 0.5; @@ -78,7 +79,7 @@ void DetailedVoxelLoader::loadDv( mat.kd[2] = 0.5; mat.kd[3] = 0.5; mat.ks[0] = 0.5; mat.ks[1] = 0.5; mat.ks[2] = 0.5; mat.ks[3] = 0.5; - mat.spectra = "wood"; + mat.spectra = "wood";*/ // Parse detailed voxels VoxelFileParser vfp; diff --git a/src/assetloading/geometryfilter/XYZPointCloudFileLoader.cpp b/src/assetloading/geometryfilter/XYZPointCloudFileLoader.cpp index c30426c46..18f601922 100644 --- a/src/assetloading/geometryfilter/XYZPointCloudFileLoader.cpp +++ b/src/assetloading/geometryfilter/XYZPointCloudFileLoader.cpp @@ -83,13 +83,12 @@ void XYZPointCloudFileLoader::parse(std::string const & filePath){ discardedPointsByNormal = 0; // Material - string matName = "default"; logging::INFO("Adding default material"); Material mat; - mat.useVertexColors = true; - mat.isGround = true; - mat.name = matName; - materials.insert(materials.end(), pair(matName, mat)); + // Legacy default material commented below + /*mat.useVertexColors = true; + mat.isGround = true;*/ + materials.insert(materials.end(), pair(mat.name, mat)); // Open file input stream ifstream ifs; @@ -106,7 +105,7 @@ void XYZPointCloudFileLoader::parse(std::string const & filePath){ firstPass(filePath, ifs); // Second pass - secondPass(filePath, matName, ifs); + secondPass(filePath, mat.name, ifs); // Release if(voxelGrid != nullptr){ diff --git a/src/main/helios_version.cpp b/src/main/helios_version.cpp index 0ccf85e91..c9c8f3fd4 100644 --- a/src/main/helios_version.cpp +++ b/src/main/helios_version.cpp @@ -4,7 +4,7 @@ const char * HELIOS_VERSION = "1.3.0"; -const char * HELIOS_GIT_HASH = "508f2033"; +const char * HELIOS_GIT_HASH = "99f2973f"; const char * getHeliosVersion(){ return HELIOS_VERSION;