2015-11-18 02:15:13 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-11-18 02:15:13 -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
|
|
|
//
|
2015-11-18 02:15:13 -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>
|
2015-11-18 02:15:13 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmObject.h"
|
2015-11-18 02:15:13 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
#include "cvfArray.h"
|
|
|
|
|
2022-01-05 08:52:04 -06:00
|
|
|
#include "RimIntersectionEnums.h"
|
|
|
|
|
2018-03-12 03:21:27 -05:00
|
|
|
class Rim3dView;
|
2022-01-05 08:52:04 -06:00
|
|
|
class RimEclipseView;
|
2019-11-26 04:35:21 -06:00
|
|
|
class RimExtrudedCurveIntersection;
|
2019-11-26 06:14:55 -06:00
|
|
|
class RimBoxIntersection;
|
2015-11-19 04:41:16 -06:00
|
|
|
class RimEclipseCellColors;
|
2017-10-13 02:29:42 -05:00
|
|
|
class RimSimWellInView;
|
2018-02-01 10:45:22 -06:00
|
|
|
class RivTernaryScalarMapper;
|
2015-11-19 04:41:16 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class ModelBasicList;
|
|
|
|
class Transform;
|
|
|
|
class ScalarMapper;
|
|
|
|
} // namespace cvf
|
2015-11-18 02:15:13 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-11-18 02:15:13 -06:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2016-09-21 03:52:16 -05:00
|
|
|
class RimIntersectionCollection : public caf::PdmObject
|
2015-11-18 02:15:13 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2016-09-21 03:52:16 -05:00
|
|
|
RimIntersectionCollection();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimIntersectionCollection() override;
|
2015-11-18 02:15:13 -06:00
|
|
|
|
2019-11-26 04:35:21 -06:00
|
|
|
void appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection, bool allowActiveViewChange = true );
|
|
|
|
void appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection );
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2019-11-26 06:14:55 -06:00
|
|
|
void appendIntersectionBoxAndUpdate( RimBoxIntersection* intersectionBox );
|
|
|
|
void appendIntersectionBoxNoUpdate( RimBoxIntersection* intersectionBox );
|
2015-11-19 06:40:45 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool hasActiveIntersectionForSimulationWell( const RimSimWellInView* simWell ) const;
|
2020-01-21 08:13:29 -06:00
|
|
|
bool hasAnyActiveSeparateResults();
|
2015-11-19 06:40:45 -06:00
|
|
|
|
2016-10-25 02:50:33 -05:00
|
|
|
void updateIntersectionBoxGeometry();
|
|
|
|
|
2024-04-04 02:16:57 -05:00
|
|
|
void synchronize2dIntersectionViews();
|
2018-02-01 10:45:22 -06:00
|
|
|
void scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
2018-01-23 07:23:28 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
bool shouldApplyCellFiltersToIntersections() const;
|
|
|
|
|
2015-11-19 06:40:45 -06:00
|
|
|
// Visualization interface
|
2015-11-18 02:15:13 -06:00
|
|
|
|
2015-11-19 04:41:16 -06:00
|
|
|
void applySingleColorEffect();
|
2023-01-18 07:42:33 -06:00
|
|
|
void updateCellResultColor( bool hasGeneralCellResult, int timeStepIndex );
|
2019-09-06 03:40:57 -05:00
|
|
|
void appendPartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
2023-06-05 00:33:04 -05:00
|
|
|
void appendDynamicPartsToModel( cvf::ModelBasicList* model,
|
|
|
|
cvf::Transform* scaleTransform,
|
|
|
|
size_t timeStepIndex,
|
|
|
|
cvf::UByteArray* visibleCells = nullptr );
|
|
|
|
void clearGeometry();
|
2015-11-19 04:41:16 -06:00
|
|
|
|
2019-11-26 06:56:02 -06:00
|
|
|
std::vector<RimExtrudedCurveIntersection*> intersections() const;
|
|
|
|
std::vector<RimBoxIntersection*> intersectionBoxes() const;
|
2018-02-05 06:23:44 -06:00
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
2020-05-18 09:02:27 -05:00
|
|
|
|
2022-02-07 11:38:19 -06:00
|
|
|
void onChildAdded( caf::PdmFieldHandle* containerForNewObject ) override;
|
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
bool isActive() const;
|
|
|
|
|
2015-11-18 02:15:13 -06:00
|
|
|
protected:
|
2023-02-26 03:48:40 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmFieldHandle* objectToggleField() override;
|
2022-01-05 08:52:04 -06:00
|
|
|
|
2021-10-05 07:28:00 -05:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2022-01-05 08:52:04 -06:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2023-02-26 03:48:40 -06:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
2023-06-08 02:13:22 -05:00
|
|
|
void initAfterRead() override;
|
2015-11-19 06:40:45 -06:00
|
|
|
|
|
|
|
private:
|
2022-01-05 08:52:04 -06:00
|
|
|
RimEclipseView* eclipseView() const;
|
2022-01-16 16:56:00 -06:00
|
|
|
void rebuild3dView() const;
|
2022-01-05 08:52:04 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
caf::PdmField<bool> m_isActive;
|
|
|
|
|
2019-11-26 06:56:02 -06:00
|
|
|
caf::PdmChildArrayField<RimExtrudedCurveIntersection*> m_intersections;
|
|
|
|
caf::PdmChildArrayField<RimBoxIntersection*> m_intersectionBoxes;
|
2022-01-05 08:52:04 -06:00
|
|
|
|
2022-01-16 16:56:00 -06:00
|
|
|
caf::PdmField<bool> m_depthThresholdOverridden;
|
|
|
|
caf::PdmField<double> m_depthUpperThreshold;
|
|
|
|
caf::PdmField<double> m_depthLowerThreshold;
|
|
|
|
caf::PdmField<caf::AppEnum<RimIntersectionFilterEnum>> m_depthFilterType;
|
2023-05-25 01:14:43 -05:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
caf::PdmField<bool> m_applyCellFilters;
|
|
|
|
|
2023-05-25 01:14:43 -05:00
|
|
|
caf::PdmField<bool> m_kFilterOverridden;
|
|
|
|
caf::PdmField<QString> m_kFilterStr;
|
2015-11-18 02:15:13 -06:00
|
|
|
};
|