Files
ResInsight/ApplicationLibCode/ProjectDataModel/Surfaces/RimDepthSurface.h
Magne Sjaastad 736bfd9a96 Add Depth Surface
Add Depth surface and initialize the location of the surface based on the first available grid model. Add feature to create Depth surface.
2024-07-24 15:42:25 +02:00

60 lines
2.0 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2024 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimSurface.h"
class RimDepthSurface : public RimSurface
{
CAF_PDM_HEADER_INIT;
public:
RimDepthSurface();
~RimDepthSurface() override;
bool onLoadData() override;
RimSurface* createCopy() override;
void setPlaneExtent( double minX, double minY, double maxX, double maxY );
void setDepth( double depth );
void setDepthSliderLimits( double lower, double upper );
private:
bool updateSurfaceData() override;
void clearCachedNativeData() override;
QString fullName() const 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;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
private:
caf::PdmField<double> m_minX;
caf::PdmField<double> m_maxX;
caf::PdmField<double> m_minY;
caf::PdmField<double> m_maxY;
caf::PdmField<double> m_depth;
caf::PdmField<double> m_depthLowerLimit;
caf::PdmField<double> m_depthUpperLimit;
std::vector<unsigned> m_triangleIndices;
std::vector<cvf::Vec3d> m_vertices;
};