From 7ede074386e7f4de581d9bf4cba5411c9c70aad5 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Fri, 18 Jan 2019 08:55:13 +0100 Subject: [PATCH] #3970 Contour Maps: Remove a wrong false && that was added to test performance but caused the fix not to be effective. --- .../RivContourMapProjectionPartMgr.cpp | 4 ++-- .../RivContourMapProjectionPartMgr.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp b/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp index f7a0fe5620..091c4ab2e0 100644 --- a/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.cpp @@ -396,7 +396,7 @@ std::vector> const cvf::Vec3d& localVertex2 = m_contourLinePolygons[i][j].vertices[nextVertex]; cvf::Vec3d lineCenter = (localVertex1 + localVertex2) * 0.5; - if (false && previousLevel && lineOverlapsWithPreviousContourLevel(lineCenter, previousLevel)) + if (previousLevel && lineOverlapsWithPreviousContourLevel(lineCenter, previousLevel)) { continue; } @@ -522,7 +522,7 @@ bool RivContourMapProjectionPartMgr::lineOverlapsWithPreviousContourLevel( { const int64_t jump = 50; CVF_ASSERT(previousLevel); - double tolerance = 1.0e-3 * m_contourMapProjection->sampleSpacing(); + double tolerance = 1.0e-2 * m_contourMapProjection->sampleSpacing(); for (const RimContourMapProjection::ContourPolygon& edgePolygon : *previousLevel) { std::pair closestIndex(0, std::numeric_limits::infinity()); diff --git a/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.h b/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.h index 3a6b26e679..8eaf61ddea 100644 --- a/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivContourMapProjectionPartMgr.h @@ -53,13 +53,13 @@ public: private: - static cvf::ref createTextLabel(const cvf::Color3f& textColor, const cvf::Color3f& backgroundColor); - cvf::ref createProjectionMapPart(const caf::DisplayCoordTransform* displayCoordTransform) const; - std::vector>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform, const std::vector>& labelBBoxes) const; - std::vector> createContourLabels(const cvf::Camera* camera, const caf::DisplayCoordTransform* displayCoordTransform, std::vector>* labelBBoxes) const; - cvf::ref createPickPointVisDrawable(const caf::DisplayCoordTransform* displayCoordTransform) const; - bool lineOverlapsWithPreviousContourLevel(const cvf::Vec3d& lineCenter, - const RimContourMapProjection::ContourPolygons* previousLevel) const; + static cvf::ref createTextLabel(const cvf::Color3f& textColor, const cvf::Color3f& backgroundColor); + cvf::ref createProjectionMapPart(const caf::DisplayCoordTransform* displayCoordTransform) const; + std::vector>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform, const std::vector>& labelBBoxes) const; + std::vector> createContourLabels(const cvf::Camera* camera, const caf::DisplayCoordTransform* displayCoordTransform, std::vector>* labelBBoxes) const; + cvf::ref createPickPointVisDrawable(const caf::DisplayCoordTransform* displayCoordTransform) const; + bool lineOverlapsWithPreviousContourLevel(const cvf::Vec3d& lineCenter, + const RimContourMapProjection::ContourPolygons* previousLevel) const; private: caf::PdmPointer m_contourMapProjection;