2015-04-20 09:02:33 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
|
//
|
|
|
|
|
// 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-16 09:37:08 +01:00
|
|
|
#include "RimGridView.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2015-04-20 09:02:33 +02:00
|
|
|
#include "cafAppEnum.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
|
#include "cafPdmField.h"
|
2015-04-20 09:02:33 +02:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2015-04-20 16:56:26 +02:00
|
|
|
#include "cafPdmFieldCvfMat4d.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmPointer.h"
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2015-04-27 13:51:22 +02:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
2015-07-31 18:58:23 +02:00
|
|
|
class RigFemPart;
|
2018-04-25 08:14:48 +02:00
|
|
|
class RigFemPartCollection;
|
2015-04-20 09:02:33 +02:00
|
|
|
class Rim3dOverlayInfoConfig;
|
2015-07-31 18:58:23 +02:00
|
|
|
class RimCellRangeFilterCollection;
|
2015-04-27 13:51:22 +02:00
|
|
|
class RimGeoMechCase;
|
2015-07-31 18:58:23 +02:00
|
|
|
class RimGeoMechCellColors;
|
|
|
|
|
class RimGeoMechPropertyFilterCollection;
|
2018-04-25 08:14:48 +02:00
|
|
|
class RimGeoMechResultDefinition;
|
|
|
|
|
class RimRegularLegendConfig;
|
2018-02-05 09:28:16 +01:00
|
|
|
class RimTensorResults;
|
2015-07-31 18:58:23 +02:00
|
|
|
class RiuViewer;
|
2015-04-27 13:51:22 +02:00
|
|
|
class RivGeoMechPartMgr;
|
2015-05-22 17:01:59 +02:00
|
|
|
class RivGeoMechVizLogic;
|
2018-02-08 16:43:12 +01:00
|
|
|
class RivTensorResultPartMgr;
|
2015-05-21 15:39:44 +02:00
|
|
|
|
2015-05-08 10:38:10 +02:00
|
|
|
namespace cvf {
|
2015-05-22 17:01:59 +02:00
|
|
|
class CellRangeFilter;
|
2015-07-31 18:58:23 +02:00
|
|
|
class Transform;
|
2015-05-08 10:38:10 +02:00
|
|
|
}
|
2015-04-20 09:02:33 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2018-01-12 14:12:31 +01:00
|
|
|
class RimGeoMechView : public RimGridView
|
2015-04-20 09:02:33 +02:00
|
|
|
{
|
2015-05-08 10:38:10 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-04-20 09:02:33 +02:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
RimGeoMechView(void);
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimGeoMechView(void) override;
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2015-04-27 13:51:22 +02:00
|
|
|
void setGeoMechCase(RimGeoMechCase* gmCase);
|
2015-05-08 10:38:10 +02:00
|
|
|
RimGeoMechCase* geoMechCase();
|
2018-10-18 19:45:57 +02:00
|
|
|
RimCase* ownerCase() const override;
|
2015-04-30 14:19:43 +02:00
|
|
|
|
2015-08-27 22:54:37 +02:00
|
|
|
caf::PdmChildField<RimGeoMechCellColors*> cellResult;
|
2016-10-18 07:31:02 +02:00
|
|
|
RimGeoMechResultDefinition* cellResultResultDefinition();
|
2015-08-27 22:54:37 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
2015-11-12 10:48:13 +01:00
|
|
|
|
|
|
|
|
RimGeoMechPropertyFilterCollection* geoMechPropertyFilterCollection();
|
|
|
|
|
const RimGeoMechPropertyFilterCollection* geoMechPropertyFilterCollection() const;
|
2015-08-27 22:54:37 +02:00
|
|
|
void setOverridePropertyFilterCollection(RimGeoMechPropertyFilterCollection* pfc);
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2018-01-25 17:37:22 +01:00
|
|
|
bool isTimeStepDependentDataVisible() const override ;
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
cvf::Transform* scaleTransform() override;
|
|
|
|
|
void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
2015-09-23 14:35:35 +02:00
|
|
|
void updateIconStateForFilterCollections();
|
2015-07-01 12:07:01 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel) override;
|
2015-11-23 07:24:50 +01:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
bool isUsingFormationNames() const override;
|
2016-09-12 11:36:59 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
|
2017-08-24 09:27:08 +02:00
|
|
|
|
2018-04-18 10:10:39 +02:00
|
|
|
void updateLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex);
|
2018-02-01 17:45:22 +01:00
|
|
|
|
2018-02-08 16:43:12 +01:00
|
|
|
const cvf::ref<RivGeoMechVizLogic> vizLogic() const;
|
|
|
|
|
const RimTensorResults* tensorResults() const;
|
2018-02-20 13:38:45 +01:00
|
|
|
RimTensorResults* tensorResults();
|
2018-02-08 16:43:12 +01:00
|
|
|
|
2018-04-18 10:32:51 +02:00
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
|
|
|
|
|
2018-04-25 08:14:48 +02:00
|
|
|
const RigFemPartCollection* femParts() const;
|
|
|
|
|
RigFemPartCollection* femParts();
|
|
|
|
|
|
2018-05-18 21:38:49 +02:00
|
|
|
void convertCameraPositionFromOldProjectFiles();
|
2018-05-18 19:23:36 +02:00
|
|
|
|
2015-10-19 12:10:18 +02:00
|
|
|
protected:
|
2018-10-18 19:45:57 +02:00
|
|
|
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
|
|
|
|
void onLoadDataAndUpdate() override;
|
2017-10-31 12:49:14 +01:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
2015-10-19 12:10:18 +02:00
|
|
|
|
2015-07-01 12:07:01 +02:00
|
|
|
private:
|
2018-10-18 19:45:57 +02:00
|
|
|
void createDisplayModel() override;
|
|
|
|
|
void updateScaleTransform() override;
|
2015-05-22 17:01:59 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void clampCurrentTimestep() override;
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void updateCurrentTimeStep() override;
|
|
|
|
|
void updateStaticCellColors() override;
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void resetLegendsInViewer() override;
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2018-04-09 11:51:30 +02:00
|
|
|
void updateLegends() override;
|
2015-05-13 22:42:11 +02:00
|
|
|
|
2018-04-18 10:10:39 +02:00
|
|
|
void updateTensorLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex);
|
2018-02-20 13:38:45 +01:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
void initAfterRead() override;
|
2015-05-13 22:55:07 +02:00
|
|
|
|
2015-09-14 16:14:44 +02:00
|
|
|
|
2018-02-05 09:28:16 +01:00
|
|
|
caf::PdmChildField<RimTensorResults*> m_tensorResults;
|
2015-08-27 22:54:37 +02:00
|
|
|
caf::PdmChildField<RimGeoMechPropertyFilterCollection*> m_propertyFilterCollection;
|
|
|
|
|
caf::PdmPointer<RimGeoMechPropertyFilterCollection> m_overridePropertyFilterCollection;
|
|
|
|
|
|
2015-05-08 10:38:10 +02:00
|
|
|
caf::PdmPointer<RimGeoMechCase> m_geomechCase;
|
2015-05-22 17:01:59 +02:00
|
|
|
cvf::ref<RivGeoMechVizLogic> m_vizLogic;
|
2015-05-13 13:03:22 +02:00
|
|
|
cvf::ref<cvf::Transform> m_scaleTransform;
|
2015-04-27 13:51:22 +02:00
|
|
|
|
2018-02-08 16:43:12 +01:00
|
|
|
cvf::ref<RivTensorResultPartMgr> m_tensorPartMgr;
|
2015-04-20 09:02:33 +02:00
|
|
|
};
|
2015-04-27 13:51:22 +02:00
|
|
|
|