2018-01-16 02:37:08 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-01-09 08:21:38 -06:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-01-16 02:37:08 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-01-16 02:37:08 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-01-16 02:37:08 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Rim3dView.h"
|
|
|
|
|
2018-04-04 15:34:41 -05:00
|
|
|
#include "cvfArray.h"
|
|
|
|
|
2019-01-11 06:03:46 -06:00
|
|
|
class RimEclipseContourMapProjection;
|
2018-04-04 15:34:41 -05:00
|
|
|
class Rim3dOverlayInfoConfig;
|
|
|
|
class RimIntersectionCollection;
|
2019-11-12 04:51:50 -06:00
|
|
|
class RimIntersectionResultsDefinitionCollection;
|
2018-04-04 15:34:41 -05:00
|
|
|
class RimPropertyFilterCollection;
|
|
|
|
class RimGridCollection;
|
2021-01-11 11:47:09 -06:00
|
|
|
class RimCellFilterCollection;
|
2019-11-27 05:05:01 -06:00
|
|
|
class RimWellMeasurementInViewCollection;
|
2020-01-06 04:30:06 -06:00
|
|
|
class RimSurfaceInViewCollection;
|
2023-03-24 09:36:10 -05:00
|
|
|
class RimSeismicSectionCollection;
|
2024-02-12 03:19:52 -06:00
|
|
|
class RimPolygonInViewCollection;
|
2018-04-04 15:34:41 -05:00
|
|
|
|
2018-01-16 02:37:08 -06:00
|
|
|
class RimGridView : public Rim3dView
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2018-01-16 02:37:08 -06:00
|
|
|
public:
|
|
|
|
RimGridView();
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2023-03-31 03:04:17 -05:00
|
|
|
caf::Signal<> cellVisibilityChanged;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void showGridCells( bool enableGridCells );
|
2018-01-16 02:37:08 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
Rim3dOverlayInfoConfig* overlayInfoConfig() const;
|
2018-01-16 02:37:08 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
|
2018-10-23 09:32:40 -05:00
|
|
|
|
2019-11-26 05:30:44 -06:00
|
|
|
RimIntersectionCollection* intersectionCollection() const;
|
2022-03-23 04:59:18 -05:00
|
|
|
virtual RimSurfaceInViewCollection* surfaceInViewCollection() const;
|
2019-11-12 07:00:30 -06:00
|
|
|
RimIntersectionResultsDefinitionCollection* separateIntersectionResultsCollection() const;
|
2020-01-14 06:55:18 -06:00
|
|
|
RimIntersectionResultsDefinitionCollection* separateSurfaceResultsCollection() const;
|
2019-11-27 05:05:01 -06:00
|
|
|
RimWellMeasurementInViewCollection* measurementCollection() const;
|
2023-03-24 09:36:10 -05:00
|
|
|
RimSeismicSectionCollection* seismicSectionCollection() const;
|
2024-02-22 08:13:29 -06:00
|
|
|
RimPolygonInViewCollection* polygonInViewCollection() const;
|
2018-11-23 06:33:59 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual const RimPropertyFilterCollection* propertyFilterCollection() const = 0;
|
2018-10-16 02:53:30 -05:00
|
|
|
|
2021-01-11 11:47:09 -06:00
|
|
|
void cellFiltersUpdated();
|
|
|
|
RimCellFilterCollection* cellFilterCollection();
|
|
|
|
const RimCellFilterCollection* cellFilterCollection() const;
|
|
|
|
|
|
|
|
bool hasOverriddenCellFilterCollection();
|
|
|
|
void setOverrideCellFilterCollection( RimCellFilterCollection* rfc );
|
|
|
|
void replaceCellFilterCollectionWithOverride();
|
2019-04-10 09:13:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isGridVisualizationMode() const override;
|
|
|
|
|
2019-12-03 03:20:45 -06:00
|
|
|
void updateWellMeasurements();
|
2024-02-12 03:19:52 -06:00
|
|
|
void updateViewTreeItems( RiaDefines::ItemIn3dView itemType ) override;
|
2019-12-03 03:20:45 -06:00
|
|
|
|
2019-11-12 07:00:30 -06:00
|
|
|
RimGridCollection* gridCollection() const;
|
2024-06-06 03:47:01 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void updateViewFollowingCellFilterUpdates();
|
|
|
|
void onClearReservoirCellVisibilitiesIfNecessary() override;
|
|
|
|
virtual void calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) = 0;
|
|
|
|
void selectOverlayInfoConfig() override;
|
|
|
|
void clearReservoirCellVisibilities();
|
|
|
|
void addRequiredUiTreeObjects( caf::PdmUiTreeOrdering& uiTreeOrdering );
|
|
|
|
void appendPolygonPartsToModel( caf::DisplayCoordTransform* scaleTransform, const cvf::BoundingBox& boundingBox );
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-11-12 07:00:30 -06:00
|
|
|
void initAfterRead() override;
|
2019-06-21 05:16:09 -05:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
void appendIntersectionsForCurrentTimeStep();
|
|
|
|
void appendIntersectionsToModel( bool cellFiltersActive, bool propertyFiltersActive );
|
|
|
|
|
|
|
|
virtual void calculateCellVisibility( cvf::UByteArray* visibility, std::vector<RivCellSetEnum> geomTypes, int timeStep = 0 ) = 0;
|
|
|
|
|
2019-11-28 03:31:01 -06:00
|
|
|
protected:
|
2020-01-08 04:56:48 -06:00
|
|
|
cvf::ref<cvf::ModelBasicList> m_surfaceVizModel;
|
2023-06-05 00:33:04 -05:00
|
|
|
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
|
2024-02-12 03:19:52 -06:00
|
|
|
cvf::ref<cvf::ModelBasicList> m_polygonVizModel;
|
2020-01-08 04:56:48 -06:00
|
|
|
|
2019-11-28 03:31:01 -06:00
|
|
|
// Fields
|
2019-11-26 05:30:44 -06:00
|
|
|
caf::PdmChildField<RimIntersectionCollection*> m_intersectionCollection;
|
2019-11-12 04:51:50 -06:00
|
|
|
|
2019-11-12 07:00:30 -06:00
|
|
|
caf::PdmChildField<RimIntersectionResultsDefinitionCollection*> m_intersectionResultDefCollection;
|
2020-01-14 06:55:18 -06:00
|
|
|
caf::PdmChildField<RimIntersectionResultsDefinitionCollection*> m_surfaceResultDefCollection;
|
2019-11-12 04:51:50 -06:00
|
|
|
|
2019-11-27 05:05:01 -06:00
|
|
|
caf::PdmChildField<Rim3dOverlayInfoConfig*> m_overlayInfoConfig;
|
|
|
|
caf::PdmChildField<RimGridCollection*> m_gridCollection;
|
|
|
|
caf::PdmChildField<RimWellMeasurementInViewCollection*> m_wellMeasurementCollection;
|
2020-01-06 04:30:06 -06:00
|
|
|
caf::PdmChildField<RimSurfaceInViewCollection*> m_surfaceCollection;
|
2021-01-11 11:47:09 -06:00
|
|
|
caf::PdmChildField<RimCellFilterCollection*> m_cellFilterCollection;
|
|
|
|
caf::PdmChildField<RimCellFilterCollection*> m_overrideCellFilterCollection;
|
2023-03-24 09:36:10 -05:00
|
|
|
caf::PdmChildField<RimSeismicSectionCollection*> m_seismicSectionCollection;
|
2024-02-22 08:13:29 -06:00
|
|
|
caf::PdmChildField<RimPolygonInViewCollection*> m_polygonInViewCollection;
|
2018-11-23 06:33:59 -06:00
|
|
|
|
2018-01-16 02:37:08 -06:00
|
|
|
private:
|
2019-11-28 03:31:01 -06:00
|
|
|
void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
|
|
|
|
|
2024-02-22 08:13:29 -06:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::UByteArray> m_currentReservoirCellVisibility;
|
|
|
|
bool m_previousGridModeMeshLinesWasFaults;
|
2018-01-16 02:37:08 -06:00
|
|
|
};
|