From 6c15468c87b83c95bfe6c83162ac5a4ca0353cd9 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 30 Jul 2014 17:21:31 -0700 Subject: [PATCH] Fix for sizing. --- libraries/metavoxels/src/MetavoxelData.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/metavoxels/src/MetavoxelData.cpp b/libraries/metavoxels/src/MetavoxelData.cpp index 8860d30c93..a0b1f1efb0 100644 --- a/libraries/metavoxels/src/MetavoxelData.cpp +++ b/libraries/metavoxels/src/MetavoxelData.cpp @@ -580,8 +580,7 @@ void MetavoxelData::readDelta(const MetavoxelData& reference, const MetavoxelLOD *this = reference; QHash remainingRoots = _roots; - glm::vec3 minimum = getMinimum(); - + bool changed; in >> changed; if (changed) { @@ -594,7 +593,8 @@ void MetavoxelData::readDelta(const MetavoxelData& reference, const MetavoxelLOD expand(); } } - + + glm::vec3 minimum = getMinimum(); forever { AttributePointer attribute; in >> attribute; @@ -634,6 +634,7 @@ void MetavoxelData::readDelta(const MetavoxelData& reference, const MetavoxelLOD // read subdivisions for the remaining roots if there's any chance of a collapse if (!(lod.position == referenceLOD.position && lod.threshold <= referenceLOD.threshold)) { + glm::vec3 minimum = getMinimum(); for (QHash::const_iterator it = remainingRoots.constBegin(); it != remainingRoots.constEnd(); it++) { MetavoxelStreamBase base = { it.key(), in, lod, referenceLOD };