///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2023 Equinor ASA // // 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 "cvfArray.h" #include "cvfColor3.h" #include "cvfObject.h" #include "cvfPlane.h" #include "cvfTextureImage.h" #include "cvfVector3.h" #include #include #include class RigGriddedPart3d; class RigFRModelPart { public: RigFRModelPart(){}; ~RigFRModelPart(){}; std::vector rect; cvf::ref texture; }; //================================================================================================== /// /// //================================================================================================== class RigFaultReactivationModel : public cvf::Object { public: enum class ModelParts { HiPart1 = 0, MidPart1, LowPart1, HiPart2, MidPart2, LowPart2 }; enum class GridPart { PART1, PART2 }; public: RigFaultReactivationModel(); ~RigFaultReactivationModel() override; std::vector allModelParts() const; std::vector allGridParts() const; bool isValid() const; void reset(); void setPlane( cvf::Vec3d anchorPoint, cvf::Vec3d normal ); void setFaultPlaneIntersect( cvf::Vec3d faultPlaneTop, cvf::Vec3d faultPlaneBottom ); void setMaxExtentFromAnchor( double maxExtentHorz, double minZ, double maxZ ); void setCellCounts( int horzPart1, int horzPart2, int vertUpper, int vertMiddle, int vertLower ); void setThickness( double thickness ); void updateRects(); cvf::Vec3d normal() const; void setPartColors( cvf::Color3f part1Color, cvf::Color3f part2Color ); std::vector rect( ModelParts part ) const; cvf::ref texture( ModelParts part ) const; const std::vector>& meshLines( GridPart part ) const; std::shared_ptr grid( GridPart part ) const; protected: void generateGrids( cvf::Vec3dArray points ); private: cvf::Vec3d m_planeNormal; cvf::Vec3d m_planeAnchor; cvf::Vec3d m_faultPlaneIntersectTop; cvf::Vec3d m_faultPlaneIntersectBottom; double m_maxHorzExtent; double m_minZ; double m_maxZ; double m_thickness; int m_cellCountHorzPart1; int m_cellCountHorzPart2; int m_cellCountVertUpper; int m_cellCountVertMiddle; int m_cellCountVertLower; std::map> m_cornerIndexes; std::map m_parts; bool m_isValid; std::map> m_3dparts; };