mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-28 01:41:42 -06:00
adjustments
This commit is contained in:
parent
924916fdd7
commit
2a1d8379a5
@ -36,7 +36,7 @@ CAF_PDM_ABSTRACT_SOURCE_INIT(RimPlotCellFilter, "RimPlotCellFilter");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCellFilter::RimPlotCellFilter()
|
||||
{
|
||||
CAF_PDM_InitFieldNoDefault(&m_filterType, "FilterType", "Filter Type", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_filterMode, "FilterMode", "Filter Mode", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -50,7 +50,7 @@ void RimPlotCellFilter::updateCellVisibility(size_t timeStepIndex, cvf::UByteArr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCellFilter::FilterModeType RimPlotCellFilter::filterType() const
|
||||
RimPlotCellFilter::FilterModeType RimPlotCellFilter::filterMode() const
|
||||
{
|
||||
return m_filterType();
|
||||
return m_filterMode();
|
||||
}
|
||||
|
@ -41,11 +41,11 @@ public:
|
||||
RimPlotCellFilter();
|
||||
|
||||
void updateCellVisibility(size_t timeStepIndex, cvf::UByteArray* cellVisibility);
|
||||
FilterModeType filterType() const;
|
||||
FilterModeType filterMode() const;
|
||||
|
||||
protected:
|
||||
virtual void updateCellVisibilityFromFilter(size_t timeStepIndex, cvf::UByteArray* cellVisibility) = 0;
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<FilterModeType>> m_filterType;
|
||||
caf::PdmField<caf::AppEnum<FilterModeType>> m_filterMode;
|
||||
};
|
||||
|
@ -128,14 +128,14 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter(size_t timeStepIn
|
||||
double scalarValue = cellResultValues[cellResultIndex];
|
||||
if (lowerBound <= scalarValue && scalarValue <= upperBound)
|
||||
{
|
||||
if (filterType() == RimPlotCellFilter::EXCLUDE)
|
||||
if (filterMode() == RimPlotCellFilter::EXCLUDE)
|
||||
{
|
||||
(*visibleCells)[reservoirCellIndex] = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (filterType() == RimPlotCellFilter::INCLUDE)
|
||||
if (filterMode() == RimPlotCellFilter::INCLUDE)
|
||||
{
|
||||
(*visibleCells)[reservoirCellIndex] = false;
|
||||
}
|
||||
|
@ -1,13 +1,27 @@
|
||||
@startuml
|
||||
package Rim {
|
||||
|
||||
PdmObject <|-- RimPlotCellFilter
|
||||
RimPlotCellFilter <|-- RimPlotCellRangeFilter
|
||||
RimPlotCellFilter <|-- RimPlotCellPropertyFilter
|
||||
RimPlotCellFilter <|-- RimPlotCellRegionFilter
|
||||
|
||||
|
||||
class RimPlotCellFilter
|
||||
{
|
||||
bool isCellAcceptedByFilter(size_t reservoirCellIndex);
|
||||
void updateCellVisibilityFromFilter(size_t timeStepIndex,
|
||||
cvf::UByteArray* cellVisibility)
|
||||
|
||||
FilterModeType filterMode() const;
|
||||
}
|
||||
|
||||
RimPlotCellFilter <|-- RimPlotCellPropertyFilter
|
||||
RimPlotCellFilter <|-- RimPlotCellFilterCollection
|
||||
|
||||
RimPlotCellFilterCollection -> RimPlotCellFilter
|
||||
class RimPlotCellFilterCollection
|
||||
{
|
||||
std::vector<RimCellFilter*> m_filters
|
||||
}
|
||||
|
||||
RimPlotCellFilter <|-- RimPlotCellRegionFilter_planned
|
||||
RimPlotCellFilter <|-- RimPlotCellRangeFilter_planned
|
||||
|
||||
|
||||
@enduml
|
||||
|
Loading…
Reference in New Issue
Block a user