///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2022- 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 "cafPdmField.h" #include "cafPdmObjectHandle.h" #include "cafPdmObjectMethod.h" #include "cafPdmPtrField.h" #include #include "cvfVector3.h" class RivIntersectionGeometryGeneratorInterface; class RimExtrudedCurveIntersection; //================================================================================================== /// //================================================================================================== class RimcTriangleGeometry : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: enum class GeometryType { FULL_3D, PROJECTED_TO_PLANE, }; public: RimcTriangleGeometry(); static RimcTriangleGeometry* createFromVertices( const std::vector& vertices ); static RimcTriangleGeometry* createFromVerticesAndConnections( const std::vector& vertices, const std::vector& connections ); void setMeshVertices( const std::vector& meshVertices ); void setFaultMeshVertices( const std::vector& faultMeshVertices ); void setDisplayModelOffset( const cvf::Vec3d& offset ); private: static std::tuple, std::vector, std::vector> assignCoordinatesToSeparateVectors( const std::vector& vertices ); private: caf::PdmField> m_x; caf::PdmField> m_y; caf::PdmField> m_z; caf::PdmField> m_connections; caf::PdmField> m_meshX; caf::PdmField> m_meshY; caf::PdmField> m_meshZ; caf::PdmField> m_faultMeshX; caf::PdmField> m_faultMeshY; caf::PdmField> m_faultMeshZ; caf::PdmField m_displayModelOffset; }; //================================================================================================== /// //================================================================================================== class RimcExtrudedCurveIntersection_geometry : public caf::PdmObjectMethod { CAF_PDM_HEADER_INIT; public: RimcExtrudedCurveIntersection_geometry( caf::PdmObjectHandle* self ); caf::PdmObjectHandle* execute() override; bool resultIsPersistent() const override; std::unique_ptr defaultResult() const override; static std::unique_ptr createGeometryGenerator( RimExtrudedCurveIntersection* intersection, RimcTriangleGeometry::GeometryType geometryType ); private: caf::PdmField> m_geometryType; }; //================================================================================================== /// //================================================================================================== class RimcExtrudedCurveIntersection_geometryResult : public caf::PdmObjectMethod { CAF_PDM_HEADER_INIT; public: RimcExtrudedCurveIntersection_geometryResult( caf::PdmObjectHandle* self ); caf::PdmObjectHandle* execute() override; bool resultIsPersistent() const override; std::unique_ptr defaultResult() const override; private: caf::PdmField> m_geometryType; };