///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2017 Statoil 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 "cvfMatrix4.h" #include "cvfObject.h" #include "cvfVector3.h" #include "cafPdmPointer.h" #include #include namespace cvf { class ModelBasicList; class DrawableGeo; class Part; class Color3f; class ScalarMapper; class Transform; } // namespace cvf namespace caf { class DisplayCoordTransform; } class RimFracture; class RimFractureTemplate; class RimMeshFractureTemplate; class RimEclipseView; class RigFractureCell; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- class RivWellFracturePartMgr : public cvf::Object { public: RivWellFracturePartMgr( RimFracture* well ); ~RivWellFracturePartMgr() override; void appendGeometryPartsToModel( cvf::ModelBasicList* model, const RimEclipseView& eclView ); const QString resultInfoText( const RimEclipseView& activeView, cvf::Vec3d domainIntersectionPoint ) const; const RigFractureCell* getFractureCellAtDomainCoord( cvf::Vec3d domainCoord ) const; private: cvf::ref createEllipseSurfacePart( const RimEclipseView& activeView ); cvf::ref createStimPlanColorInterpolatedSurfacePart( const RimEclipseView& activeView ); cvf::ref createSingleColorSurfacePart( const std::vector& triangleIndices, const std::vector& nodeCoords, const cvf::Color3f& color ); cvf::ref createStimPlanElementColorSurfacePart( const RimEclipseView& activeView ); cvf::ref createContainmentMaskPart( const RimEclipseView& activeView ); cvf::ref createMaskOfFractureOutsideGrid( const RimEclipseView& activeView ); void appendFracturePerforationLengthParts( const RimEclipseView& activeView, cvf::ModelBasicList* model ); cvf::ref createStimPlanMeshPart( const RimEclipseView& activeView ); cvf::ref createStimPlanMeshDrawable( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView ); void createVisibleFracturePolygons( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView ); std::vector fractureBorderPolygon(); static cvf::ref createScalarMapperPart( cvf::DrawableGeo* drawableGeo, const cvf::ScalarMapper* scalarMapper, RimFracture* fracture, bool disableLighting ); static std::vector transformToFractureDisplayCoords( const std::vector& polygon, cvf::Mat4d m, const caf::DisplayCoordTransform& displayCoordTransform ); static cvf::ref buildDrawableGeoFromTriangles( const std::vector& triangleIndices, const std::vector& nodeCoords ); static cvf::ref createLocalTransformFromTranslation( const cvf::Vec3d& translation ); static void addPartAtPositiveAndNegativeTranslation( cvf::ModelBasicList* model, cvf::Part* part, const cvf::Vec3d& translation ); private: caf::PdmPointer m_rimFracture; std::vector> m_visibleFracturePolygons; };