From 0c05c93a72226d7e89a8bc51468cfcde34f75ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Thu, 27 Sep 2018 14:47:15 +0200 Subject: [PATCH] #3420 Result info. Fix cordinate system translations. Renaming to improve readability --- .../RigFemPartResultsCollection.cpp | 10 +++++----- .../RigFemPartResultsCollection.h | 2 +- .../RimGeoMechGeometrySelectionItem.cpp | 2 +- .../RimEclipseGeometrySelectionItem.cpp | 4 ++-- .../RimEclipseGeometrySelectionItem.h | 2 +- .../UserInterface/RiuFemResultTextBuilder.cpp | 17 +++++++++-------- .../UserInterface/RiuFemResultTextBuilder.h | 4 ++-- .../RiuFemTimeHistoryResultAccessor.cpp | 12 ++++++------ .../RiuFemTimeHistoryResultAccessor.h | 6 +++--- .../UserInterface/RiuResultTextBuilder.cpp | 18 +++++++++--------- .../UserInterface/RiuResultTextBuilder.h | 4 ++-- .../RiuSelectionChangedHandler.cpp | 16 +++++++++++----- .../UserInterface/RiuSelectionManager.cpp | 12 ++++++------ .../UserInterface/RiuSelectionManager.h | 10 +++++----- 14 files changed, 63 insertions(+), 56 deletions(-) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index 85dcabcc25..4a6021ab55 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -2625,7 +2625,7 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar RigFemResultPosEnum resultPosition, int elementIndex, int m_face, - const cvf::Vec3d& m_intersectionPoint) + const cvf::Vec3d& intersectionPointInDomain) { m_resultIndexToClosestResult = -1; m_closestNodeId = -1; @@ -2643,8 +2643,8 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar for ( int lNodeIdx = 0; lNodeIdx < elmNodeCount; ++lNodeIdx ) { int nodeIdx = elmentConn[lNodeIdx]; - cvf::Vec3f nodePos = femPart->nodes().coordinates[nodeIdx]; - float dist = (nodePos - cvf::Vec3f(m_intersectionPoint)).lengthSquared(); + cvf::Vec3f nodePosInDomain = femPart->nodes().coordinates[nodeIdx]; + float dist = (nodePosInDomain - cvf::Vec3f(intersectionPointInDomain)).lengthSquared(); if ( dist < minDist ) { closestLocalNode = lNodeIdx; @@ -2694,8 +2694,8 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator(RigFemPar for ( int faceNodIdx = 0; faceNodIdx < faceNodeCount; ++faceNodIdx ) { int nodeIdx = elmNodeIndices[localElmNodeIndicesForFace[faceNodIdx]]; - cvf::Vec3f nodePos = femPart->nodes().coordinates[nodeIdx]; - float dist = (nodePos - cvf::Vec3f(m_intersectionPoint)).lengthSquared(); + cvf::Vec3f nodePosInDomain = femPart->nodes().coordinates[nodeIdx]; + float dist = (nodePosInDomain - cvf::Vec3f(intersectionPointInDomain)).lengthSquared(); if ( dist < minDist ) { closestLocFaceNode = faceNodIdx; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h index 560c62ed2b..8268be176a 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.h @@ -159,7 +159,7 @@ public: RigFemResultPosEnum resultPosition, int elementIndex, int m_face, - const cvf::Vec3d& m_intersectionPoint); + const cvf::Vec3d& intersectionPointInDomain); int resultIndexToClosestResult() { return m_resultIndexToClosestResult; } int closestNodeId() { return m_closestNodeId; } diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp index 2ba10104ad..39bfb88364 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RimGeoMechGeometrySelectionItem.cpp @@ -69,7 +69,7 @@ void RimGeoMechGeometrySelectionItem::setFromSelectionItem(const RiuGeoMechSelec m_intersectionTriangle_1 = cvf::Vec3d(selectionItem->m_intersectionTriangle[1]); m_intersectionTriangle_2 = cvf::Vec3d(selectionItem->m_intersectionTriangle[2]); - m_localIntersectionPoint = selectionItem->m_localIntersectionPoint; + m_localIntersectionPoint = selectionItem->m_localIntersectionPointInDisplay; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp index 3692c6dfa5..5d5701a1eb 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp @@ -39,7 +39,7 @@ RimEclipseGeometrySelectionItem::RimEclipseGeometrySelectionItem() CAF_PDM_InitFieldNoDefault(&m_eclipseCase, "EclipseCase", "Eclipse Case", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_gridIndex, "GridIndex", "Grid Index", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_cellIndex, "CellIndex", "Cell Index", "", "", ""); - CAF_PDM_InitFieldNoDefault(&m_localIntersectionPoint, "LocalIntersectionPoint", "local Intersection Point", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_localIntersectionPointInDisplay, "LocalIntersectionPoint", "local Intersection Point", "", "", ""); } //-------------------------------------------------------------------------------------------------- @@ -56,7 +56,7 @@ void RimEclipseGeometrySelectionItem::setFromSelectionItem(const RiuEclipseSelec { m_gridIndex = selectionItem->m_gridIndex; m_cellIndex = selectionItem->m_gridLocalCellIndex; - m_localIntersectionPoint = selectionItem->m_localIntersectionPoint; + m_localIntersectionPointInDisplay = selectionItem->m_localIntersectionPointInDisplay; m_eclipseCase = selectionItem->m_view->eclipseCase(); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h index faf69a1146..a4d4f20d01 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.h @@ -51,6 +51,6 @@ private: caf::PdmField m_gridIndex; caf::PdmField m_cellIndex; - caf::PdmField m_localIntersectionPoint; + caf::PdmField m_localIntersectionPointInDisplay; }; diff --git a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp index f00611921b..d56068d09e 100644 --- a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.cpp @@ -56,16 +56,16 @@ RiuFemResultTextBuilder::RiuFemResultTextBuilder(RimGeoMechView* reservoirView, m_cellIndex = cellIndex; m_timeStepIndex = timeStepIndex; - m_intersectionPoint = cvf::Vec3d::UNDEFINED; + m_intersectionPointInDisplay = cvf::Vec3d::UNDEFINED; m_face = cvf::StructGridInterface::NO_FACE; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuFemResultTextBuilder::setIntersectionPoint(cvf::Vec3d intersectionPoint) +void RiuFemResultTextBuilder::setIntersectionPointInDisplay(cvf::Vec3d intersectionPointInDisplay) { - m_intersectionPoint = intersectionPoint; + m_intersectionPointInDisplay = intersectionPointInDisplay; } //-------------------------------------------------------------------------------------------------- @@ -153,13 +153,13 @@ QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator) QString formattedText; if (m_2dIntersectionView) { - formattedText.sprintf("Horizontal length from well start: %.2f", m_intersectionPoint.x()); + formattedText.sprintf("Horizontal length from well start: %.2f", m_intersectionPointInDisplay.x()); text += formattedText + itemSeparator; - cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(m_intersectionPoint); + cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(m_intersectionPointInDisplay); if (!t.isZero()) { - cvf::Vec3d intPt = m_intersectionPoint.getTransformedPoint(t); + cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint(t); formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", intPt.x(), intPt.y(), -intPt.z()); text += formattedText; } @@ -167,7 +167,7 @@ QString RiuFemResultTextBuilder::geometrySelectionText(QString itemSeparator) else { cvf::ref transForm = m_reservoirView->displayCoordTransform(); - cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPoint); + cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPointInDisplay); formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", domainCoord.x(), domainCoord.y(), -domainCoord.z()); text += formattedText; @@ -386,11 +386,12 @@ QString RiuFemResultTextBuilder::closestNodeResultText(RimGeoMechResultDefinitio RigFemPart* femPart = geomData->femParts()->part(m_gridIndex); RigFemResultPosEnum activeResultPosition = resultColors->resultPositionType(); + cvf::Vec3d intersectionPointInDomain = m_reservoirView->displayCoordTransform()->translateToDomainCoord(m_intersectionPointInDisplay); RigFemClosestResultIndexCalculator closestIndexCalc(femPart, activeResultPosition, m_cellIndex, m_face, - m_intersectionPoint); + intersectionPointInDomain); int resultIndex = closestIndexCalc.resultIndexToClosestResult(); int closestNodeId = closestIndexCalc.closestNodeId(); int closestElmNodResIdx = closestIndexCalc.closestElementNodeResIdx(); diff --git a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h index 9754516c9d..6d1953b16e 100644 --- a/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h +++ b/ApplicationCode/UserInterface/RiuFemResultTextBuilder.h @@ -45,7 +45,7 @@ class RiuFemResultTextBuilder public: RiuFemResultTextBuilder(RimGeoMechView* reservoirView, int gridIndex, int cellIndex, int timeStepIndex); void setFace(int face); - void setIntersectionPoint(cvf::Vec3d intersectionPoint); + void setIntersectionPointInDisplay(cvf::Vec3d intersectionPointInDisplay); void setIntersectionTriangle(const std::array& triangle); void set2dIntersectionView(Rim2dIntersectionView* intersectionView); @@ -75,5 +75,5 @@ private: bool m_isIntersectionTriangleSet; std::array m_intersectionTriangle; - cvf::Vec3d m_intersectionPoint; + cvf::Vec3d m_intersectionPointInDisplay; }; diff --git a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp index 9f7d3a3a73..619847387a 100644 --- a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp +++ b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.cpp @@ -37,13 +37,13 @@ RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor(RigGeoMechCaseD size_t gridIndex, int elementIndex, int face, - const cvf::Vec3d& intersectionPoint) + const cvf::Vec3d& intersectionPointInDomain) : m_geoMechCaseData(geomData), m_femResultAddress(femResultAddress), m_gridIndex(gridIndex), m_elementIndex(elementIndex), m_face(face), - m_intersectionPoint(intersectionPoint), + m_intersectionPointInDomain(intersectionPointInDomain), m_hasIntersectionTriangle(false) { computeTimeHistoryData(); @@ -57,14 +57,14 @@ RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor(RigGeoMechCaseD size_t gridIndex, int elementIndex, int face, - const cvf::Vec3d& intersectionPoint, + const cvf::Vec3d& intersectionPointInDomain, const std::array& intersectionTriangle) : m_geoMechCaseData(geomData), m_femResultAddress(femResultAddress), m_gridIndex(gridIndex), m_elementIndex(elementIndex), m_face(face), - m_intersectionPoint(intersectionPoint), + m_intersectionPointInDomain(intersectionPointInDomain), m_hasIntersectionTriangle(true), m_intersectionTriangle(intersectionTriangle) { @@ -94,7 +94,7 @@ QString RiuFemTimeHistoryResultAccessor::geometrySelectionText() const j++; k++; - cvf::Vec3d domainCoord = m_intersectionPoint; + cvf::Vec3d domainCoord = m_intersectionPointInDomain; text += QString(", ijk[%1, %2, %3] ").arg(i).arg(j).arg(k); QString formattedText; @@ -126,7 +126,7 @@ void RiuFemTimeHistoryResultAccessor::computeTimeHistoryData() m_femResultAddress.resultPosType, m_elementIndex, m_face, - m_intersectionPoint ); + m_intersectionPointInDomain ); int scalarResultIndex = closestCalc.resultIndexToClosestResult(); m_closestNodeId = closestCalc.closestNodeId(); diff --git a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h index 6df48f7d66..b3f601fe6a 100644 --- a/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h +++ b/ApplicationCode/UserInterface/RiuFemTimeHistoryResultAccessor.h @@ -36,14 +36,14 @@ public: size_t gridIndex, int elementIndex, int face, - const cvf::Vec3d& intersectionPoint); + const cvf::Vec3d& intersectionPointInDomain); RiuFemTimeHistoryResultAccessor(RigGeoMechCaseData* geomData, RigFemResultAddress femResultAddress, size_t gridIndex, int elementIndex, int face, - const cvf::Vec3d& intersectionPoint, + const cvf::Vec3d& intersectionPointInDomain, const std::array& m_intersectionTriangle); QString geometrySelectionText() const; @@ -62,7 +62,7 @@ private: int m_face; int m_closestNodeId; - cvf::Vec3d m_intersectionPoint; + cvf::Vec3d m_intersectionPointInDomain; bool m_hasIntersectionTriangle; std::array m_intersectionTriangle; diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp index 884eb9ce90..2017ed62b2 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp @@ -57,7 +57,7 @@ RiuResultTextBuilder::RiuResultTextBuilder(RimEclipseView* reservoirView, size_t m_timeStepIndex = timeStepIndex; m_nncIndex = cvf::UNDEFINED_SIZE_T; - m_intersectionPoint = cvf::Vec3d::UNDEFINED; + m_intersectionPointInDisplay = cvf::Vec3d::UNDEFINED; m_face = cvf::StructGridInterface::NO_FACE; } @@ -95,7 +95,7 @@ RiuResultTextBuilder::RiuResultTextBuilder(RimEclipseView* reservoirView, size_t m_timeStepIndex = timeStepIndex; m_nncIndex = cvf::UNDEFINED_SIZE_T; - m_intersectionPoint = cvf::Vec3d::UNDEFINED; + m_intersectionPointInDisplay = cvf::Vec3d::UNDEFINED; m_face = cvf::StructGridInterface::NO_FACE; } @@ -110,9 +110,9 @@ void RiuResultTextBuilder::setNncIndex(size_t nncIndex) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiuResultTextBuilder::setIntersectionPoint(cvf::Vec3d intersectionPoint) +void RiuResultTextBuilder::setIntersectionPointInDisplay(cvf::Vec3d intersectionPointInDisplay) { - m_intersectionPoint = intersectionPoint; + m_intersectionPointInDisplay = intersectionPointInDisplay; } //-------------------------------------------------------------------------------------------------- @@ -226,21 +226,21 @@ QString RiuResultTextBuilder::geometrySelectionText(QString itemSeparator) } } - if (m_intersectionPoint != cvf::Vec3d::UNDEFINED) + if (m_intersectionPointInDisplay != cvf::Vec3d::UNDEFINED) { cvf::ref transForm = m_reservoirView->displayCoordTransform(); - cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPoint); + cvf::Vec3d domainCoord = transForm->translateToDomainCoord(m_intersectionPointInDisplay); QString formattedText; if (m_2dIntersectionView) { - formattedText.sprintf("Horizontal length from well start: %.2f", m_intersectionPoint.x()); + formattedText.sprintf("Horizontal length from well start: %.2f", m_intersectionPointInDisplay.x()); text += formattedText + itemSeparator; - cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(m_intersectionPoint); + cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(m_intersectionPointInDisplay); if (!t.isZero()) { - cvf::Vec3d intPt = m_intersectionPoint.getTransformedPoint(t); + cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint(t); formattedText.sprintf("Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]", intPt.x(), intPt.y(), -intPt.z()); text += formattedText; } diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.h b/ApplicationCode/UserInterface/RiuResultTextBuilder.h index b7a7ec2467..03a54e0efe 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.h +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.h @@ -46,7 +46,7 @@ public: void setFace(cvf::StructGridInterface::FaceType face); void setNncIndex(size_t nncIndex); - void setIntersectionPoint(cvf::Vec3d intersectionPoint); + void setIntersectionPointInDisplay(cvf::Vec3d intersectionPointInDisplay); void set2dIntersectionView(Rim2dIntersectionView* intersectionView); QString mainResultText(); @@ -83,5 +83,5 @@ private: size_t m_nncIndex; - cvf::Vec3d m_intersectionPoint; + cvf::Vec3d m_intersectionPointInDisplay; }; diff --git a/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp b/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp index 4b0d87bffa..69e86f26dd 100644 --- a/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp +++ b/ApplicationCode/UserInterface/RiuSelectionChangedHandler.cpp @@ -52,6 +52,8 @@ #include +#include + #include @@ -160,7 +162,9 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuEclipseSelec curveName += ", "; curveName += QString("Grid index %1").arg(eclipseSelectionItem->m_gridIndex); curveName += ", "; - curveName += RigTimeHistoryResultAccessor::geometrySelectionText(eclipseView->eclipseCase()->eclipseCaseData(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_gridLocalCellIndex); + curveName += RigTimeHistoryResultAccessor::geometrySelectionText(eclipseView->eclipseCase()->eclipseCaseData(), + eclipseSelectionItem->m_gridIndex, + eclipseSelectionItem->m_gridLocalCellIndex); std::vector timeHistoryValues = RigTimeHistoryResultAccessor::timeHistoryValues(eclipseView->eclipseCase()->eclipseCaseData(), eclipseView->cellResult(), eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_gridLocalCellIndex, timeStepDates.size()); @@ -185,6 +189,8 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuGeoMechSelec { std::unique_ptr timeHistResultAccessor; + cvf::Vec3d intersectionPointInDomain = geoMechView->displayCoordTransform()->translateToDomainCoord(geomSelectionItem->m_localIntersectionPointInDisplay); + if ( geomSelectionItem->m_hasIntersectionTriangle ) { timeHistResultAccessor = std::unique_ptr( @@ -193,7 +199,7 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuGeoMechSelec geomSelectionItem->m_gridIndex, static_cast(geomSelectionItem->m_cellIndex), geomSelectionItem->m_elementFace, - geomSelectionItem->m_localIntersectionPoint, + intersectionPointInDomain, geomSelectionItem->m_intersectionTriangle)); } else @@ -204,7 +210,7 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuGeoMechSelec geomSelectionItem->m_gridIndex, static_cast(geomSelectionItem->m_cellIndex), geomSelectionItem->m_elementFace, - geomSelectionItem->m_localIntersectionPoint)); + intersectionPointInDomain)); } QString curveName; @@ -348,7 +354,7 @@ void RiuSelectionChangedHandler::updateResultInfo(const RiuSelectionItem* itemAd RiuResultTextBuilder textBuilder(eclipseView, eclipseSelectionItem->m_gridIndex, eclipseSelectionItem->m_gridLocalCellIndex, eclipseView->currentTimeStep()); textBuilder.setFace(eclipseSelectionItem->m_face); textBuilder.setNncIndex(eclipseSelectionItem->m_nncIndex); - textBuilder.setIntersectionPoint(eclipseSelectionItem->m_localIntersectionPoint); + textBuilder.setIntersectionPointInDisplay(eclipseSelectionItem->m_localIntersectionPointInDisplay); textBuilder.set2dIntersectionView(intersectionView); resultInfo = textBuilder.mainResultText(); @@ -361,7 +367,7 @@ void RiuSelectionChangedHandler::updateResultInfo(const RiuSelectionItem* itemAd RimGeoMechView* geomView = geomSelectionItem->m_view.p(); RiuFemResultTextBuilder textBuilder(geomView, (int)geomSelectionItem->m_gridIndex, (int)geomSelectionItem->m_cellIndex, geomView->currentTimeStep()); - textBuilder.setIntersectionPoint(geomSelectionItem->m_localIntersectionPoint); + textBuilder.setIntersectionPointInDisplay(geomSelectionItem->m_localIntersectionPointInDisplay); textBuilder.setFace(geomSelectionItem->m_elementFace); textBuilder.set2dIntersectionView(intersectionView); if (geomSelectionItem->m_hasIntersectionTriangle) textBuilder.setIntersectionTriangle(geomSelectionItem->m_intersectionTriangle); diff --git a/ApplicationCode/UserInterface/RiuSelectionManager.cpp b/ApplicationCode/UserInterface/RiuSelectionManager.cpp index 87433a276e..39da507361 100644 --- a/ApplicationCode/UserInterface/RiuSelectionManager.cpp +++ b/ApplicationCode/UserInterface/RiuSelectionManager.cpp @@ -163,14 +163,14 @@ RiuEclipseSelectionItem::RiuEclipseSelectionItem(RimEclipseView* view, size_t nncIndex, cvf::Color3f color, cvf::StructGridInterface::FaceType face, - const cvf::Vec3d& localIntersectionPoint) + const cvf::Vec3d& localIntersectionPointInDisplay) : m_view(view), m_gridIndex(gridIndex), m_gridLocalCellIndex(cellIndex), m_nncIndex(nncIndex), m_color(color), m_face(face), - m_localIntersectionPoint(localIntersectionPoint) + m_localIntersectionPointInDisplay(localIntersectionPointInDisplay) { } @@ -182,14 +182,14 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* view, size_t cellIndex, cvf::Color3f color, int elementFace, - const cvf::Vec3d& localIntersectionPoint) + const cvf::Vec3d& localIntersectionPointInDisplay) : m_view(view) , m_gridIndex(gridIndex) , m_cellIndex(cellIndex) , m_color(color) , m_elementFace(elementFace) , m_hasIntersectionTriangle(false) - , m_localIntersectionPoint(localIntersectionPoint) + , m_localIntersectionPointInDisplay(localIntersectionPointInDisplay) { } @@ -201,7 +201,7 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* size_t cellIndex, cvf::Color3f color, int elementFace, - const cvf::Vec3d& localIntersectionPoint, + const cvf::Vec3d& localIntersectionPointInDisplay, const std::array& intersectionTriangle) : m_view(view) , m_gridIndex(gridIndex) @@ -210,7 +210,7 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* , m_elementFace(elementFace) , m_hasIntersectionTriangle(true) , m_intersectionTriangle(intersectionTriangle) - , m_localIntersectionPoint(localIntersectionPoint) + , m_localIntersectionPointInDisplay(localIntersectionPointInDisplay) { } diff --git a/ApplicationCode/UserInterface/RiuSelectionManager.h b/ApplicationCode/UserInterface/RiuSelectionManager.h index fa19b98b7c..64bd1f9374 100644 --- a/ApplicationCode/UserInterface/RiuSelectionManager.h +++ b/ApplicationCode/UserInterface/RiuSelectionManager.h @@ -137,7 +137,7 @@ public: size_t nncIndex, cvf::Color3f color, cvf::StructGridInterface::FaceType face, - const cvf::Vec3d& localIntersectionPoint); + const cvf::Vec3d& localIntersectionPointInDisplay); virtual ~RiuEclipseSelectionItem() {}; @@ -153,7 +153,7 @@ public: size_t m_nncIndex; cvf::Color3f m_color; cvf::StructGridInterface::FaceType m_face; - cvf::Vec3d m_localIntersectionPoint; + cvf::Vec3d m_localIntersectionPointInDisplay; }; @@ -170,14 +170,14 @@ public: size_t cellIndex, cvf::Color3f color, int elementFace, - const cvf::Vec3d& localIntersectionPoint); + const cvf::Vec3d& localIntersectionPointInDisplay); explicit RiuGeoMechSelectionItem(RimGeoMechView* view, size_t gridIndex, size_t cellIndex, cvf::Color3f color, int elementFace, - const cvf::Vec3d& localIntersectionPoint, + const cvf::Vec3d& localIntersectionPointInDisplay, const std::array& intersectionTriangle ); virtual ~RiuGeoMechSelectionItem() {}; @@ -194,7 +194,7 @@ public: int m_elementFace; bool m_hasIntersectionTriangle; std::array m_intersectionTriangle; - cvf::Vec3d m_localIntersectionPoint; + cvf::Vec3d m_localIntersectionPointInDisplay; };