2018-01-15 07:52:22 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-01-09 08:21:38 -06:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
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.
|
|
|
|
//
|
|
|
|
// 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
|
2018-01-17 01:00:36 -06:00
|
|
|
|
|
|
|
#include "Rim3dView.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
2018-12-14 06:41:35 -06:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2018-01-17 01:00:36 -06:00
|
|
|
|
|
|
|
class RimIntersection;
|
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;
|
|
|
|
class RivIntersectionPartMgr;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2018-01-17 01:00:36 -06:00
|
|
|
class ModelBasicList;
|
2018-04-30 07:47:44 -05:00
|
|
|
class OverlayItem;
|
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;
|
|
|
|
public:
|
|
|
|
Rim2dIntersectionView(void);
|
2018-10-18 12:45:57 -05:00
|
|
|
~Rim2dIntersectionView(void) override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-01-23 07:23:28 -06:00
|
|
|
void setVisible(bool isVisible);
|
|
|
|
void setIntersection(RimIntersection* intersection);
|
2018-03-14 02:05:38 -05:00
|
|
|
RimIntersection* intersection() const;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-10-18 12:45: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
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
RimViewLinker* assosiatedViewLinker() const override { return nullptr; }
|
|
|
|
RimViewController* viewController() const override { return nullptr; }
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
bool isTimeStepDependentDataVisible() const override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-02-15 07:31:08 -06:00
|
|
|
void update3dInfo();
|
2018-05-03 02:55:08 -05:00
|
|
|
void updateName();
|
2018-02-15 06:00:33 -06:00
|
|
|
|
2018-03-20 07:12:20 -05:00
|
|
|
cvf::ref<RivIntersectionPartMgr> flatIntersectionPartMgr() const;
|
2018-03-21 07:49:58 -05:00
|
|
|
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
|
|
|
|
2018-03-12 03:21:27 -05:00
|
|
|
bool showDefiningPoints() const;
|
|
|
|
|
2018-04-18 03:32:51 -05:00
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
2018-04-30 07:47:44 -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:
|
2018-04-09 04:51:30 -05:00
|
|
|
void updateLegends() override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
bool isGridVisualizationMode() const override;
|
|
|
|
void axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel) override;
|
|
|
|
void createDisplayModel() override;
|
|
|
|
void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
|
|
|
void clampCurrentTimestep() override;
|
|
|
|
void updateCurrentTimeStep() override;
|
|
|
|
void onTimeStepChanged() override;
|
|
|
|
void updateStaticCellColors() override;
|
|
|
|
void updateScaleTransform() override;
|
|
|
|
cvf::Transform* scaleTransform() override;
|
|
|
|
void resetLegendsInViewer() override;
|
|
|
|
void onLoadDataAndUpdate() override;
|
|
|
|
bool isWindowVisible() override;
|
|
|
|
|
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2018-12-14 06:41:35 -06:00
|
|
|
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
2018-10-18 12:45:57 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-01-25 10:37:22 -06:00
|
|
|
bool hasResults();
|
|
|
|
int timeStepCount();
|
|
|
|
|
2018-12-14 06:41:35 -06:00
|
|
|
private:
|
|
|
|
QString createAutoName() const override;
|
|
|
|
QString getName() const;
|
|
|
|
void setName(const QString& name);
|
2018-02-01 10:45:22 -06:00
|
|
|
|
2018-04-18 03:10:39 -05:00
|
|
|
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
|
2018-02-01 10:45:22 -06:00
|
|
|
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
|
|
|
|
|
2018-01-23 07:23:28 -06:00
|
|
|
caf::PdmPtrField<RimIntersection*> m_intersection;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-01-25 10:37:22 -06:00
|
|
|
cvf::ref<RivIntersectionPartMgr> m_flatIntersectionPartMgr;
|
2018-03-13 10:16:41 -05:00
|
|
|
cvf::ref<RivSimWellPipesPartMgr> m_flatSimWellPipePartMgr;
|
2018-03-14 04:33:10 -05:00
|
|
|
cvf::ref<RivWellHeadPartMgr> m_flatWellHeadPartMgr;
|
2018-03-20 07:12:20 -05:00
|
|
|
cvf::ref<RivWellPathPartMgr> m_flatWellpathPartMgr;
|
2018-01-23 07:23:28 -06:00
|
|
|
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
|
|
|
|
cvf::ref<cvf::Transform> m_scaleTransform;
|
2018-01-15 07:52:22 -06:00
|
|
|
|
2018-12-14 06:41:35 -06:00
|
|
|
caf::PdmProxyValueField<QString> m_nameProxy;
|
2018-03-12 03:21:27 -05:00
|
|
|
caf::PdmField<bool> m_showDefiningPoints;
|
2018-11-15 07:58:22 -06:00
|
|
|
caf::PdmField<bool> m_showAxisLines;
|
2018-04-30 07:47:44 -05:00
|
|
|
|
|
|
|
caf::PdmPointer<caf::PdmObject> m_legendObjectToSelect;
|
2018-01-23 07:23:28 -06:00
|
|
|
};
|