From 4f22b39a1f2b2ce0789898c2328d7133214830cb Mon Sep 17 00:00:00 2001 From: Micah Date: Wed, 9 Jun 2021 14:43:35 -0400 Subject: [PATCH 1/2] RenderableBillboardsCloud: adding protection for data without colors --- .../rendering/renderablebillboardscloud.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp index a0aa0c4f33..4113d606ff 100644 --- a/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp +++ b/modules/digitaluniverse/rendering/renderablebillboardscloud.cpp @@ -1024,9 +1024,14 @@ std::vector RenderableBillboardsCloud::createDataSlice() { float minColorIdx = std::numeric_limits::max(); float maxColorIdx = -std::numeric_limits::max(); for (const speck::Dataset::Entry& e : _dataset.entries) { - float color = e.data[colorMapInUse]; - minColorIdx = std::min(color, minColorIdx); - maxColorIdx = std::max(color, maxColorIdx); + if (e.data.size() > 0) { + float color = e.data[colorMapInUse]; + minColorIdx = std::min(color, minColorIdx); + maxColorIdx = std::max(color, maxColorIdx); + } else { + minColorIdx = 0; + maxColorIdx = 0; + } } double maxRadius = 0.0; From 4d02b020819ee3d75df1156eb6ca9a049f30e0c1 Mon Sep 17 00:00:00 2001 From: Micah Acinapura Date: Thu, 10 Jun 2021 12:30:53 -0400 Subject: [PATCH 2/2] SpiceManager - initialize default matrix; Update ghoul --- ext/ghoul | 2 +- src/util/spicemanager.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index fcb8e8b964..a3fc819d8f 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit fcb8e8b964c9c176733f4fdc22d117cac8d3f8b2 +Subproject commit a3fc819d8ff19fdda152e89a9401f6f61e8fc88b diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index fa862a73df..d3c430090c 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -678,7 +678,7 @@ glm::dmat3 SpiceManager::frameTransformationMatrix(const std::string& from, ghoul_assert(!to.empty(), "To must not be empty"); // get rotation matrix from frame A - frame B - glm::dmat3 transform; + glm::dmat3 transform = glm::dmat3(1.0); pxform_c( from.c_str(), to.c_str(), @@ -851,7 +851,7 @@ glm::dmat3 SpiceManager::positionTransformMatrix(const std::string& sourceFrame, ghoul_assert(!sourceFrame.empty(), "sourceFrame must not be empty"); ghoul_assert(!destinationFrame.empty(), "destinationFrame must not be empty"); - glm::dmat3 result; + glm::dmat3 result = glm::dmat3(1.0); pxform_c( sourceFrame.c_str(), destinationFrame.c_str(), @@ -883,7 +883,7 @@ glm::dmat3 SpiceManager::positionTransformMatrix(const std::string& sourceFrame, ghoul_assert(!sourceFrame.empty(), "sourceFrame must not be empty"); ghoul_assert(!destinationFrame.empty(), "destinationFrame must not be empty"); - glm::dmat3 result; + glm::dmat3 result = glm::dmat3(1.0); pxfrm2_c( sourceFrame.c_str(),