///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2025 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 "RimSurface.h" class RimRegularSurface : public RimSurface { CAF_PDM_HEADER_INIT; public: RimRegularSurface(); bool onLoadData() override; RimSurface* createCopy() override; void setOriginX( double originX ); void setOriginY( double originY ); void setNx( int nx ); void setNy( int ny ); void setDepth( double depth ); void setIncrementX( double incrementX ); void setIncrementY( double incrementY ); void setRotation( double rotation ); void setProperty( const QString& key, const std::vector& values ); bool setPropertyAsDepth( const QString& key ); int nx() const; int ny() const; protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void setFieldsReadOnly( bool enable ); private: bool updateSurfaceData() override; void clearCachedNativeData() override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; private: caf::PdmField m_nx; caf::PdmField m_ny; caf::PdmField m_originX; caf::PdmField m_originY; caf::PdmField m_depth; caf::PdmField m_incrementX; caf::PdmField m_incrementY; caf::PdmField m_rotation; caf::PdmField m_depthProperty; std::vector m_triangleIndices; std::vector m_vertices; std::map> m_properties; };