2015-11-18 09:15:13 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-11-18 09:15:13 +01: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 10:40:57 +02:00
|
|
|
//
|
2015-11-18 09:15:13 +01: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 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-11-18 09:15:13 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
#include "cafPdmField.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cafPdmObject.h"
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2018-03-12 09:21:27 +01:00
|
|
|
class Rim3dView;
|
2019-11-26 11:35:21 +01:00
|
|
|
class RimExtrudedCurveIntersection;
|
2019-11-26 13:14:55 +01:00
|
|
|
class RimBoxIntersection;
|
2015-11-19 11:41:16 +01:00
|
|
|
class RimEclipseCellColors;
|
2017-10-13 09:29:42 +02:00
|
|
|
class RimSimWellInView;
|
2018-02-01 17:45:22 +01:00
|
|
|
class RivTernaryScalarMapper;
|
2015-11-19 11:41:16 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
namespace cvf
|
|
|
|
|
{
|
|
|
|
|
class ModelBasicList;
|
|
|
|
|
class Transform;
|
|
|
|
|
class ScalarMapper;
|
|
|
|
|
} // namespace cvf
|
2015-11-18 09:15:13 +01:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-11-18 09:15:13 +01:00
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2016-09-21 10:52:16 +02:00
|
|
|
class RimIntersectionCollection : public caf::PdmObject
|
2015-11-18 09:15:13 +01:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
2016-09-21 10:52:16 +02:00
|
|
|
RimIntersectionCollection();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimIntersectionCollection() override;
|
2015-11-18 09:15:13 +01:00
|
|
|
|
|
|
|
|
caf::PdmField<bool> isActive;
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2019-11-26 11:35:21 +01:00
|
|
|
void appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection, bool allowActiveViewChange = true );
|
|
|
|
|
void appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection );
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
void appendIntersectionBoxAndUpdate( RimBoxIntersection* intersectionBox );
|
|
|
|
|
void appendIntersectionBoxNoUpdate( RimBoxIntersection* intersectionBox );
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool hasActiveIntersectionForSimulationWell( const RimSimWellInView* simWell ) const;
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2016-10-25 09:50:33 +02:00
|
|
|
void updateIntersectionBoxGeometry();
|
|
|
|
|
|
2018-01-23 14:23:28 +01:00
|
|
|
void syncronize2dIntersectionViews();
|
2018-02-01 17:45:22 +01:00
|
|
|
void scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
2018-03-02 11:25:47 +01:00
|
|
|
void recomputeSimWellBranchData();
|
2018-01-23 14:23:28 +01:00
|
|
|
|
2015-11-19 13:40:45 +01:00
|
|
|
// Visualization interface
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2015-11-19 11:41:16 +01:00
|
|
|
void applySingleColorEffect();
|
2019-11-29 09:29:17 +01:00
|
|
|
void updateCellResultColor( bool hasGeneralCellResult, size_t timeStepIndex );
|
2019-09-06 10:40:57 +02:00
|
|
|
void appendPartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
2018-11-06 10:09:30 +01:00
|
|
|
void rebuildGeometry();
|
2015-11-19 11:41:16 +01:00
|
|
|
|
2019-11-26 13:56:02 +01:00
|
|
|
std::vector<RimExtrudedCurveIntersection*> intersections() const;
|
|
|
|
|
std::vector<RimBoxIntersection*> intersectionBoxes() const;
|
2018-02-05 13:23:44 +01:00
|
|
|
|
2015-11-18 09:15:13 +01:00
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|
|
|
|
const QVariant& oldValue,
|
|
|
|
|
const QVariant& newValue ) override;
|
|
|
|
|
caf::PdmFieldHandle* objectToggleField() override;
|
2015-11-19 13:40:45 +01:00
|
|
|
|
|
|
|
|
private:
|
2019-11-26 13:56:02 +01:00
|
|
|
caf::PdmChildArrayField<RimExtrudedCurveIntersection*> m_intersections;
|
|
|
|
|
caf::PdmChildArrayField<RimBoxIntersection*> m_intersectionBoxes;
|
2015-11-18 09:15:13 +01:00
|
|
|
};
|