2018-01-15 07:52:22 -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-15 07:52:22 -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-15 07:52:22 -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-15 07:52:22 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
2018-01-17 01:00:36 -06:00
|
|
|
|
|
|
|
#include "Rim3dView.h"
|
2018-12-14 06:41:35 -06:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmPtrField.h"
|
2018-01-17 01:00:36 -06:00
|
|
|
|
2019-11-26 04:35:21 -06:00
|
|
|
class RimExtrudedCurveIntersection;
|
2018-04-18 03:10:39 -05:00
|
|
|
class RimRegularLegendConfig;
|
2018-02-01 10:45:22 -06:00
|
|
|
class RimTernaryLegendConfig;
|
2018-03-13 10:16:41 -05:00
|
|
|
class RivSimWellPipesPartMgr;
|
2018-03-14 04:33:10 -05:00
|
|
|
class RivWellHeadPartMgr;
|
2018-03-20 07:12:20 -05:00
|
|
|
class RivWellPathPartMgr;
|
2019-11-26 04:51:54 -06:00
|
|
|
class RivExtrudedCurveIntersectionPartMgr;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class ModelBasicList;
|
|
|
|
class OverlayItem;
|
|
|
|
} // namespace cvf
|
2018-01-15 07:52:22 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2018-01-15 07:52:22 -06:00
|
|
|
//==================================================================================================
|
2018-01-17 01:00:36 -06:00
|
|
|
class Rim2dIntersectionView : public Rim3dView
|
2018-01-15 07:52:22 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2018-01-15 07:52:22 -06:00
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
Rim2dIntersectionView( void );
|
|
|
|
~Rim2dIntersectionView( void ) override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-11-26 06:56:02 -06:00
|
|
|
void setVisible( bool isVisible );
|
|
|
|
void setIntersection( RimExtrudedCurveIntersection* intersection );
|
2019-11-26 04:35:21 -06:00
|
|
|
RimExtrudedCurveIntersection* intersection() const;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isUsingFormationNames() const override;
|
|
|
|
void scheduleGeometryRegen( RivCellSetEnum geometryType ) override;
|
|
|
|
RimCase* ownerCase() const override;
|
|
|
|
void selectOverlayInfoConfig() override {}
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2020-02-12 04:13:38 -06:00
|
|
|
RimViewLinker* assosiatedViewLinker() const override { return nullptr; }
|
|
|
|
RimViewController* viewController() const override { return nullptr; }
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isTimeStepDependentDataVisible() const override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void update3dInfo();
|
|
|
|
void updateName();
|
2018-02-15 06:00:33 -06:00
|
|
|
|
2020-04-07 07:28:55 -05:00
|
|
|
const RivExtrudedCurveIntersectionPartMgr* flatIntersectionPartMgr() const;
|
|
|
|
cvf::Vec3d transformToUtm( const cvf::Vec3d& unscaledPointInFlatDomain ) const;
|
2018-03-06 08:14:54 -06:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const override;
|
2018-03-06 08:14:54 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool showDefiningPoints() const;
|
2018-03-12 03:21:27 -05:00
|
|
|
|
2018-04-18 03:32:51 -05:00
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
2019-09-06 03:40:57 -05:00
|
|
|
bool handleOverlayItemPicked( const cvf::OverlayItem* pickedOverlayItem ) const;
|
2018-04-18 03:32:51 -05:00
|
|
|
|
2018-01-25 10:37:22 -06:00
|
|
|
protected:
|
2019-10-31 10:37:16 -05:00
|
|
|
void onUpdateLegends() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
bool isGridVisualizationMode() const override;
|
2019-11-01 04:13:32 -05:00
|
|
|
void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override;
|
2019-10-31 09:32:30 -05:00
|
|
|
void onCreateDisplayModel() override;
|
|
|
|
void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
|
|
|
|
void onClampCurrentTimestep() override;
|
2019-11-01 04:13:32 -05:00
|
|
|
void onUpdateDisplayModelForCurrentTimeStep() override;
|
2019-10-31 09:32:30 -05:00
|
|
|
void onUpdateStaticCellColors() override;
|
|
|
|
void onUpdateScaleTransform() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::Transform* scaleTransform() override;
|
2019-10-31 09:32:30 -05:00
|
|
|
void onResetLegendsInViewer() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void onLoadDataAndUpdate() override;
|
2019-10-11 08:54:19 -05:00
|
|
|
bool isWindowVisible() const override;
|
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-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2022-05-29 06:01:27 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
bool hasResults();
|
2019-11-08 03:39:40 -06:00
|
|
|
|
2021-04-14 21:14:51 -05:00
|
|
|
size_t onTimeStepCountRequested() override;
|
2018-01-25 10:37:22 -06:00
|
|
|
|
2018-12-14 06:41:35 -06:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
QString createAutoName() const override;
|
|
|
|
QString getName() const;
|
|
|
|
void setName( const QString& name );
|
2018-02-01 10:45:22 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
|
2018-02-01 10:45:22 -06:00
|
|
|
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
|
|
|
|
|
2019-11-26 04:35:21 -06:00
|
|
|
caf::PdmPtrField<RimExtrudedCurveIntersection*> m_intersection;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-11-26 04:51:54 -06:00
|
|
|
cvf::ref<RivExtrudedCurveIntersectionPartMgr> m_flatIntersectionPartMgr;
|
2019-11-26 06:56:02 -06:00
|
|
|
cvf::ref<RivSimWellPipesPartMgr> m_flatSimWellPipePartMgr;
|
|
|
|
cvf::ref<RivWellHeadPartMgr> m_flatWellHeadPartMgr;
|
|
|
|
cvf::ref<RivWellPathPartMgr> m_flatWellpathPartMgr;
|
|
|
|
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
|
|
|
|
cvf::ref<cvf::Transform> m_scaleTransform;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmProxyValueField<QString> m_nameProxy;
|
|
|
|
caf::PdmField<bool> m_showDefiningPoints;
|
|
|
|
caf::PdmField<bool> m_showAxisLines;
|
2018-04-30 07:47:44 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmPointer<caf::PdmObject> m_legendObjectToSelect;
|
2019-01-16 08:56:04 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const static cvf::Mat4d sm_defaultViewMatrix;
|
2018-01-23 07:23:28 -06:00
|
|
|
};
|