diff --git a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.cpp index d25564bbae..de91f8a223 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.cpp @@ -38,7 +38,7 @@ RivCrossSectionGeometryGenerator::RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection, std::vector > &polylines, const cvf::Vec3d& extrusionDirection, - const RivCrossSectionHexGridIntf* grid) + const RivIntersectionHexGridInterface* grid) : m_crossSection(crossSection), m_polyLines(polylines), m_extrusionDirection(extrusionDirection), @@ -180,7 +180,7 @@ void RivCrossSectionGeometryGenerator::calculateArrays() if (cvx.isVxIdsNative) { m_triVxToCellCornerWeights.push_back( - RivVertexWeights(cvx.clippedEdgeVx1Id, cvx.clippedEdgeVx2Id, cvx.normDistFromEdgeVx1)); + RivIntersectionVertexWeights(cvx.clippedEdgeVx1Id, cvx.clippedEdgeVx2Id, cvx.normDistFromEdgeVx1)); } else { @@ -188,7 +188,7 @@ void RivCrossSectionGeometryGenerator::calculateArrays() caf::HexGridIntersectionTools::ClipVx cvx2 = hexPlaneCutTriangleVxes[cvx.clippedEdgeVx2Id]; m_triVxToCellCornerWeights.push_back( - RivVertexWeights(cvx1.clippedEdgeVx1Id, cvx1.clippedEdgeVx2Id, cvx1.normDistFromEdgeVx1, + RivIntersectionVertexWeights(cvx1.clippedEdgeVx1Id, cvx1.clippedEdgeVx2Id, cvx1.normDistFromEdgeVx1, cvx2.clippedEdgeVx1Id, cvx2.clippedEdgeVx2Id, cvx2.normDistFromEdgeVx1, cvx.normDistFromEdgeVx1)); @@ -356,7 +356,7 @@ const std::vector& RivCrossSectionGeometryGenerator::triangleToCellIndex //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector& RivCrossSectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const +const std::vector& RivCrossSectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const { CVF_ASSERT(m_triangleVxes->size()); return m_triVxToCellCornerWeights; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.h b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.h index a599388267..8467cb56a8 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionGeometryGenerator.h @@ -49,7 +49,7 @@ public: RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection, std::vector > &polylines, const cvf::Vec3d& extrusionDirection, - const RivCrossSectionHexGridIntf* grid ); + const RivIntersectionHexGridInterface* grid ); ~RivCrossSectionGeometryGenerator(); @@ -63,7 +63,7 @@ public: // Mapping between cells and geometry const std::vector& triangleToCellIndex() const; - const std::vector& triangleVxToCellCornerInterpolationWeights() const; + const std::vector& triangleVxToCellCornerInterpolationWeights() const; const RimCrossSection* crossSection() const; @@ -73,7 +73,7 @@ private: const cvf::Vec3d extrDir, std::vector* adjustedPolyline); - cvf::cref m_hexGrid; + cvf::cref m_hexGrid; const std::vector > m_polyLines; cvf::Vec3d m_extrusionDirection; @@ -81,7 +81,7 @@ private: cvf::ref m_triangleVxes; cvf::ref m_cellBorderLineVxes; std::vector m_triangleToCellIdxMap; - std::vector m_triVxToCellCornerWeights; + std::vector m_triVxToCellCornerWeights; const RimCrossSection* m_crossSection; }; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.cpp b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.cpp index 7808b77a9f..411abbc222 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.cpp @@ -164,7 +164,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex) // Do a "Hack" to show elm nodal and not nodal POR results if (resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar") resVarAddress.resultPosType = RIG_ELEMENT_NODAL; - const std::vector &vertexWeights = m_crossSectionGenerator->triangleVxToCellCornerInterpolationWeights(); + const std::vector &vertexWeights = m_crossSectionGenerator->triangleVxToCellCornerInterpolationWeights(); const std::vector& resultValues = caseData->femPartResults()->resultValues(resVarAddress, 0, (int)timeStepIndex); bool isElementNodalResult = !(resVarAddress.resultPosType == RIG_NODAL); RigFemPart* femPart = caseData->femParts()->part(0); @@ -191,7 +191,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex) /// //-------------------------------------------------------------------------------------------------- void RivCrossSectionPartMgr::calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords, - const std::vector &vertexWeights, + const std::vector &vertexWeights, const std::vector &resultValues, bool isElementNodalResult, const RigFemPart* femPart, @@ -506,7 +506,7 @@ void RivCrossSectionPartMgr::computeData() if (polyLines.size() > 0) { cvf::Vec3d direction = extrusionDirection(polyLines[0]); - cvf::ref hexGrid = createHexGridInterface(); + cvf::ref hexGrid = createHexGridInterface(); m_crossSectionGenerator = new RivCrossSectionGeometryGenerator(m_rimCrossSection, polyLines, direction, hexGrid.p()); } } @@ -514,7 +514,7 @@ void RivCrossSectionPartMgr::computeData() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RivCrossSectionPartMgr::createHexGridInterface() +cvf::ref RivCrossSectionPartMgr::createHexGridInterface() { RimEclipseView* eclipseView; @@ -523,7 +523,7 @@ cvf::ref RivCrossSectionPartMgr::createHexGridInterf { RigMainGrid* grid = NULL; grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); - return new RivEclipseCrossSectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); + return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); } RimGeoMechView* geoView; @@ -531,7 +531,7 @@ cvf::ref RivCrossSectionPartMgr::createHexGridInterf if (geoView) { RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0); - return new RivFemCrossSectionGrid(femPart); + return new RivFemIntersectionGrid(femPart); } return NULL; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.h b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.h index 979145f058..8e6c39de22 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivCrossSectionPartMgr.h @@ -68,12 +68,12 @@ private: const RigResultAccessor* resultAccessor, const cvf::ScalarMapper* mapper); static void calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords, - const std::vector &vertexWeights, + const std::vector &vertexWeights, const std::vector &resultValues, bool isElementNodalResult, const RigFemPart* femPart, const cvf::ScalarMapper* mapper); - cvf::ref createHexGridInterface(); + cvf::ref createHexGridInterface(); private: const RimCrossSection* m_rimCrossSection; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.cpp b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.cpp index d9483eb70b..37bc797ef7 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.cpp @@ -26,7 +26,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RivEclipseCrossSectionGrid::RivEclipseCrossSectionGrid(const RigMainGrid * mainGrid, +RivEclipseIntersectionGrid::RivEclipseIntersectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells) : m_mainGrid(mainGrid), @@ -39,7 +39,7 @@ RivEclipseCrossSectionGrid::RivEclipseCrossSectionGrid(const RigMainGrid * mainG //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::Vec3d RivEclipseCrossSectionGrid::displayOffset() const +cvf::Vec3d RivEclipseIntersectionGrid::displayOffset() const { return m_mainGrid->displayModelOffset(); } @@ -47,7 +47,7 @@ cvf::Vec3d RivEclipseCrossSectionGrid::displayOffset() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::BoundingBox RivEclipseCrossSectionGrid::boundingBox() const +cvf::BoundingBox RivEclipseIntersectionGrid::boundingBox() const { return m_mainGrid->boundingBox(); } @@ -55,7 +55,7 @@ cvf::BoundingBox RivEclipseCrossSectionGrid::boundingBox() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivEclipseCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector* intersectedCells) const +void RivEclipseIntersectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector* intersectedCells) const { m_mainGrid->findIntersectingCells(intersectingBB, intersectedCells); } @@ -63,7 +63,7 @@ void RivEclipseCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& i //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RivEclipseCrossSectionGrid::useCell(size_t cellIndex) const +bool RivEclipseIntersectionGrid::useCell(size_t cellIndex) const { const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex]; if (m_showInactiveCells) @@ -75,7 +75,7 @@ bool RivEclipseCrossSectionGrid::useCell(size_t cellIndex) const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivEclipseCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const +void RivEclipseIntersectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const { m_mainGrid->cellCornerVertices(cellIndex, cellCorners); } @@ -83,7 +83,7 @@ void RivEclipseCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivEclipseCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const +void RivEclipseIntersectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const { const caf::SizeTArray8& cornerIndicesSource = m_mainGrid->globalCellArray()[cellIndex].cornerIndices(); memcpy(cornerIndices, cornerIndicesSource.data(), 8); @@ -92,7 +92,7 @@ void RivEclipseCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t corn //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RivFemCrossSectionGrid::RivFemCrossSectionGrid(const RigFemPart * femPart) : m_femPart(femPart) +RivFemIntersectionGrid::RivFemIntersectionGrid(const RigFemPart * femPart) : m_femPart(femPart) { } @@ -100,7 +100,7 @@ RivFemCrossSectionGrid::RivFemCrossSectionGrid(const RigFemPart * femPart) : m_f //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::Vec3d RivFemCrossSectionGrid::displayOffset() const +cvf::Vec3d RivFemIntersectionGrid::displayOffset() const { return cvf::Vec3d::ZERO; } @@ -108,7 +108,7 @@ cvf::Vec3d RivFemCrossSectionGrid::displayOffset() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::BoundingBox RivFemCrossSectionGrid::boundingBox() const +cvf::BoundingBox RivFemIntersectionGrid::boundingBox() const { return m_femPart->boundingBox(); } @@ -116,7 +116,7 @@ cvf::BoundingBox RivFemCrossSectionGrid::boundingBox() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivFemCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector* intersectedCells) const +void RivFemIntersectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector* intersectedCells) const { m_femPart->findIntersectingCells(intersectingBB, intersectedCells); } @@ -124,7 +124,7 @@ void RivFemCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& inter //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RivFemCrossSectionGrid::useCell(size_t cellIndex) const +bool RivFemIntersectionGrid::useCell(size_t cellIndex) const { RigElementType elmType = m_femPart->elementType(cellIndex); @@ -136,7 +136,7 @@ bool RivFemCrossSectionGrid::useCell(size_t cellIndex) const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivFemCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const +void RivFemIntersectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const { RigElementType elmType = m_femPart->elementType(cellIndex); if (!(elmType == HEX8 || elmType == HEX8P)) return; @@ -157,7 +157,7 @@ void RivFemCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cel //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivFemCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const +void RivFemIntersectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const { RigElementType elmType = m_femPart->elementType(cellIndex); if (!(elmType == HEX8 || elmType == HEX8P)) return; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h index e84317c858..3c81989cd1 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivHexGridIntersectionTools.h @@ -32,7 +32,7 @@ class RigMainGrid; //-------------------------------------------------------------------------------------------------- /// Interface definition used to compute the geometry for planes intersecting a grid //-------------------------------------------------------------------------------------------------- -class RivCrossSectionHexGridIntf : public cvf::Object +class RivIntersectionHexGridInterface : public cvf::Object { public: virtual cvf::Vec3d displayOffset() const = 0; @@ -46,10 +46,10 @@ public: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -class RivEclipseCrossSectionGrid : public RivCrossSectionHexGridIntf +class RivEclipseIntersectionGrid : public RivIntersectionHexGridInterface { public: - RivEclipseCrossSectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells); + RivEclipseIntersectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells); virtual cvf::Vec3d displayOffset() const; virtual cvf::BoundingBox boundingBox() const; @@ -67,10 +67,10 @@ private: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -class RivFemCrossSectionGrid : public RivCrossSectionHexGridIntf +class RivFemIntersectionGrid : public RivIntersectionHexGridInterface { public: - RivFemCrossSectionGrid(const RigFemPart * femPart); + RivFemIntersectionGrid(const RigFemPart * femPart); virtual cvf::Vec3d displayOffset() const; virtual cvf::BoundingBox boundingBox() const; @@ -87,10 +87,10 @@ private: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -class RivVertexWeights +class RivIntersectionVertexWeights { public: - explicit RivVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1, + explicit RivIntersectionVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1, size_t edge2Vx1, size_t edge2Vx2, double normDistFromE2V1, double normDistFromE1Cut) : m_count(4) { @@ -105,7 +105,7 @@ public: m_weights[3] = ((float)(normDistFromE2V1*normDistFromE1Cut)); } - explicit RivVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1) : m_count(2) + explicit RivIntersectionVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1) : m_count(2) { m_vxIds[0] = (edge1Vx1); m_vxIds[1] = (edge1Vx2); diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.cpp index 82289bba88..c65629a657 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.cpp @@ -24,7 +24,7 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, const RivCrossSectionHexGridIntf* grid) +RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, const RivIntersectionHexGridInterface* grid) : m_crossSection(intersectionBox), m_hexGrid(grid) { @@ -102,7 +102,7 @@ const std::vector& RivIntersectionBoxGeometryGenerator::triangleToCellIn //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector& RivIntersectionBoxGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const +const std::vector& RivIntersectionBoxGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const { CVF_ASSERT(m_triangleVxes->size()); return m_triVxToCellCornerWeights; diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.h b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.h index 3b6535a62a..f94c598f56 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.h +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxGeometryGenerator.h @@ -42,7 +42,7 @@ class RivIntersectionBoxGeometryGenerator : public cvf::Object { public: RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, - const RivCrossSectionHexGridIntf* grid); + const RivIntersectionHexGridInterface* grid); ~RivIntersectionBoxGeometryGenerator(); @@ -54,20 +54,20 @@ public: // Mapping between cells and geometry const std::vector& triangleToCellIndex() const; - const std::vector& triangleVxToCellCornerInterpolationWeights() const; + const std::vector& triangleVxToCellCornerInterpolationWeights() const; //const RimCrossSection* crossSection() const; private: void calculateArrays(); - cvf::cref m_hexGrid; + cvf::cref m_hexGrid; // Output arrays cvf::ref m_triangleVxes; cvf::ref m_cellBorderLineVxes; std::vector m_triangleToCellIdxMap; - std::vector m_triVxToCellCornerWeights; + std::vector m_triVxToCellCornerWeights; const RimIntersectionBox* m_crossSection; };