#3970 Contour Maps: Remove a wrong false && that was added to test performance but caused the fix not to be effective.

This commit is contained in:
Gaute Lindkvist 2019-01-18 08:55:13 +01:00
parent b1ad93f4b9
commit 7ede074386
2 changed files with 9 additions and 9 deletions

View File

@ -396,7 +396,7 @@ std::vector<cvf::ref<cvf::Drawable>>
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<int64_t, double> closestIndex(0, std::numeric_limits<double>::infinity());

View File

@ -53,13 +53,13 @@ public:
private:
static cvf::ref<cvf::DrawableText> createTextLabel(const cvf::Color3f& textColor, const cvf::Color3f& backgroundColor);
cvf::ref<cvf::Part> createProjectionMapPart(const caf::DisplayCoordTransform* displayCoordTransform) const;
std::vector<std::vector<cvf::ref<cvf::Drawable>>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform, const std::vector<std::vector<cvf::BoundingBox>>& labelBBoxes) const;
std::vector<cvf::ref<cvf::Drawable>> createContourLabels(const cvf::Camera* camera, const caf::DisplayCoordTransform* displayCoordTransform, std::vector<std::vector<cvf::BoundingBox>>* labelBBoxes) const;
cvf::ref<cvf::DrawableGeo> createPickPointVisDrawable(const caf::DisplayCoordTransform* displayCoordTransform) const;
bool lineOverlapsWithPreviousContourLevel(const cvf::Vec3d& lineCenter,
const RimContourMapProjection::ContourPolygons* previousLevel) const;
static cvf::ref<cvf::DrawableText> createTextLabel(const cvf::Color3f& textColor, const cvf::Color3f& backgroundColor);
cvf::ref<cvf::Part> createProjectionMapPart(const caf::DisplayCoordTransform* displayCoordTransform) const;
std::vector<std::vector<cvf::ref<cvf::Drawable>>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform, const std::vector<std::vector<cvf::BoundingBox>>& labelBBoxes) const;
std::vector<cvf::ref<cvf::Drawable>> createContourLabels(const cvf::Camera* camera, const caf::DisplayCoordTransform* displayCoordTransform, std::vector<std::vector<cvf::BoundingBox>>* labelBBoxes) const;
cvf::ref<cvf::DrawableGeo> createPickPointVisDrawable(const caf::DisplayCoordTransform* displayCoordTransform) const;
bool lineOverlapsWithPreviousContourLevel(const cvf::Vec3d& lineCenter,
const RimContourMapProjection::ContourPolygons* previousLevel) const;
private:
caf::PdmPointer<RimContourMapProjection> m_contourMapProjection;