#2578 Fix avoid UTM coordinates in 2D intersection View (behind the scenes)

This commit is contained in:
Jacob Støren
2018-03-06 15:14:54 +01:00
parent b13422d28b
commit 91daf49e8a
5 changed files with 22 additions and 4 deletions

View File

@@ -144,14 +144,16 @@ void RivIntersectionGeometryGenerator::calculateSegementTransformPrLinePoint()
cvf::Vec3d p2 = polyLine[idxToNextP];
cvf::Mat4d sectionLocalCS = calculateSectionLocalFlatteningCS(p1, p2, m_extrusionDirection);
if ( pLineIdx == 0 && lIdx == 0 ) previousSectionOrigo = sectionLocalCS.translation();
previousSectionFlattenedEndPosX += (sectionLocalCS.translation() - previousSectionOrigo).length();
previousSectionOrigo = sectionLocalCS.translation();
invSectionCS = sectionLocalCS.getInverted();
cvf::Vec3d flattenedTranslation(previousSectionFlattenedEndPosX, 0.0, 0.0);
invSectionCS.setTranslation(invSectionCS.translation() + flattenedTranslation - displayOffset);
invSectionCS.setTranslation(invSectionCS.translation() + flattenedTranslation );
}
size_t inc = 0;
@@ -210,6 +212,8 @@ void RivIntersectionGeometryGenerator::calculateArrays()
if (polyLine.size() < 2) continue;
size_t lineCount = polyLine.size();
//size_t lIdx = 0;
//while ( lIdx < lineCount - 1)
for (size_t lIdx = 0; lIdx < lineCount - 1; ++lIdx)
{
size_t idxToNextP = indexToNextValidPoint(polyLine, m_extrusionDirection, lIdx);
@@ -402,6 +406,7 @@ void RivIntersectionGeometryGenerator::calculateArrays()
}
}
}
// lIdx = idxToNextP;
}
}
m_triangleVxes->assign(triangleVertices);