///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) Statoil ASA // Copyright (C) Ceetron Solutions AS // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "cafPdmPointer.h" #include "RivHexGridIntersectionTools.h" #include "cvfArray.h" #include "cvfBoundingBox.h" #include "cvfObject.h" #include "cvfVector3.h" #include #include class RigMainGrid; class RigActiveCellInfo; class RigResultAccessor; class RigSurface; class RimSurfaceInView; class RivIntersectionHexGridInterface; class RivIntersectionVertexWeights; namespace cvf { class ScalarMapper; class DrawableGeo; } // namespace cvf class RivSurfaceIntersectionGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF { public: RivSurfaceIntersectionGeometryGenerator( RimSurfaceInView* surfInView, const RivIntersectionHexGridInterface* grid ); ~RivSurfaceIntersectionGeometryGenerator() override; // Generate geometry cvf::ref generateSurface(); cvf::ref createMeshDrawable(); cvf::ref createFaultMeshDrawable(); const std::vector>& faultMeshLabelAndAnchorPositions(); RimSurfaceInView* intersection() const; // GeomGen Interface bool isAnyGeometryPresent() const override; const std::vector& triangleToCellIndex() const override; const std::vector& triangleVxToCellCornerInterpolationWeights() const override; const cvf::Vec3fArray* triangleVxes() const override; private: void calculateArrays(); RimSurfaceInView* m_surfaceInView; cvf::ref m_usedSurfaceData; // Store the reference to the old data, to know when new data has arrived. cvf::cref m_hexGrid; // Output arrays cvf::ref m_triangleVxes; cvf::ref m_cellBorderLineVxes; cvf::ref m_faultCellBorderLineVxes; std::vector m_triangleToCellIdxMap; std::vector m_triVxToCellCornerWeights; std::vector> m_faultMeshLabelAndAnchorPositions; };