2013-12-03 13:30:32 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-24 00:14:52 -05:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2013-12-03 13:30:32 -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
|
|
|
//
|
2013-12-03 13:30:32 -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>
|
2013-12-03 13:30:32 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "cafAppEnum.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
2013-12-03 13:30:32 -06:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPointer.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
// Include to make Pdm work for cvf::Color
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2014-07-24 03:11:43 -05:00
|
|
|
|
|
|
|
#include <QString>
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2015-05-21 03:05:33 -05:00
|
|
|
class RimEclipseView;
|
2017-10-13 08:01:52 -05:00
|
|
|
class RimFaultInView;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2013-12-03 13:30:32 -06:00
|
|
|
//==================================================================================================
|
2017-10-15 14:20:03 -05:00
|
|
|
class RimFaultInViewCollection : public caf::PdmObject
|
2013-12-03 13:30:32 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
public:
|
2013-12-18 01:57:22 -06:00
|
|
|
enum FaultFaceCullingMode
|
|
|
|
{
|
|
|
|
FAULT_BACK_FACE_CULLING,
|
|
|
|
FAULT_FRONT_FACE_CULLING,
|
|
|
|
FAULT_NO_FACE_CULLING
|
|
|
|
};
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2013-12-18 01:57:22 -06:00
|
|
|
public:
|
2017-10-15 14:20:03 -05:00
|
|
|
RimFaultInViewCollection();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimFaultInViewCollection() override;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
bool isActive() const;
|
|
|
|
void setActive( bool bActive );
|
2022-03-25 12:15:22 -05:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
std::vector<RimFaultInView*> faults() const;
|
|
|
|
cvf::Color3f faultLabelColor() const;
|
|
|
|
caf::AppEnum<FaultFaceCullingMode> faultResult() const;
|
|
|
|
bool showFaultFaces() const;
|
|
|
|
bool showFaultLabel() const;
|
|
|
|
bool showOppositeFaultFaces() const;
|
|
|
|
bool showNNCs() const;
|
|
|
|
bool hideNNCsWhenNoResultIsAvailable() const;
|
2013-12-06 02:08:45 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
void setFaultResult( caf::AppEnum<FaultFaceCullingMode> resultType );
|
|
|
|
void setShouldApplyCellFiltersToFaults( bool bEnabled );
|
|
|
|
void setShowOppositeFaultFaces( bool bEnabled );
|
|
|
|
void setShowFaultLabelWithFieldChanged( bool bEnabled );
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
void syncronizeFaults();
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
bool isGridVisualizationMode() const;
|
|
|
|
bool shouldApplyCellFiltersToFaults() const;
|
|
|
|
bool onlyShowFacesWithDefinedNeighbor() const;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2023-06-05 00:33:04 -05:00
|
|
|
RimFaultInView* findFaultByName( QString name );
|
2014-08-22 02:28:25 -05:00
|
|
|
|
2020-01-29 07:50:41 -06:00
|
|
|
void uiOrderingFaults( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
|
|
|
|
2013-12-04 05:13:01 -06:00
|
|
|
private:
|
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;
|
2021-05-18 07:28:54 -05:00
|
|
|
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
|
|
|
|
|
|
|
RimEclipseView* parentView() const;
|
2014-01-03 01:38:09 -06:00
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
private:
|
2023-06-05 00:33:04 -05:00
|
|
|
caf::PdmField<bool> m_showFaultsOutsideFilters_obsolete;
|
|
|
|
|
|
|
|
caf::PdmField<bool> m_applyCellFilters;
|
|
|
|
caf::PdmField<bool> m_onlyShowWithNeighbor;
|
|
|
|
caf::PdmField<bool> m_showFaultFaces;
|
|
|
|
caf::PdmField<bool> m_showOppositeFaultFaces;
|
|
|
|
caf::PdmField<bool> m_showFaultLabel;
|
|
|
|
caf::PdmField<cvf::Color3f> m_faultLabelColor;
|
|
|
|
caf::PdmField<bool> m_showFaultCollection;
|
|
|
|
caf::PdmField<bool> m_showNNCs;
|
|
|
|
caf::PdmField<bool> m_hideNNCsWhenNoResultIsAvailable;
|
|
|
|
|
|
|
|
caf::PdmField<caf::AppEnum<FaultFaceCullingMode>> m_faultResult;
|
|
|
|
|
|
|
|
caf::PdmChildArrayField<RimFaultInView*> m_faults;
|
2013-12-03 13:30:32 -06:00
|
|
|
};
|