Moved RivCellSetEnum to a separate file.

Preparations for property filtering
This commit is contained in:
Jacob Støren
2015-06-18 13:09:09 +02:00
parent 8bf90ec27c
commit cfb0bfeb55
14 changed files with 177 additions and 159 deletions

View File

@@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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
enum RivCellSetEnum
{
ALL_CELLS,
ACTIVE, ///< All Active cells without ALL_WELL_CELLS
ALL_WELL_CELLS, ///< All cells ever having a connection to a well (Might be inactive cells as well. Wellhead cells typically)
VISIBLE_WELL_CELLS, ///< ALL_WELL_CELLS && visible well cells including Fence
VISIBLE_WELL_FENCE_CELLS, ///< (! ALL_WELL_CELLS) && visible well cells including Fence
INACTIVE, ///< All inactive cells, but invalid cells might or might not be included
RANGE_FILTERED, ///< ACTIVE Filtered by the set of range filters
RANGE_FILTERED_INACTIVE, ///< INACTIVE Filtered by the set of range filters
RANGE_FILTERED_WELL_CELLS, ///< ALL_WELL_CELLS Filtered by the set of range filters
VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER, ///< VISIBLE_WELL_CELLS && !RANGE_FILTERED_WELL_CELLS
VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER, ///< VISIBLE_WELL_FENCE_CELLS && !RANGE_FILTERED
PROPERTY_FILTERED, ///< (RANGE_FILTERED || VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER) && !ExcludedByPropFilter && IncludedByPropFilter
PROPERTY_FILTERED_WELL_CELLS ///< (!(hasActiveRangeFilters || visibleWellCells) && (*ALL_WELL_CELLS)) || RANGE_FILTERED_WELL_CELLS || VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER
};

View File

@@ -30,6 +30,8 @@
#include "RigGeoMechCaseData.h"
#include "RimCellRangeFilterCollection.h"
#include "RivCellSetEnum.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -127,12 +129,12 @@ void RivGeoMechVizLogic::scheduleGeometryRegen(unsigned short geometryType)
{
switch (geometryType)
{
case RivReservoirViewPartMgr::RANGE_FILTERED:
case RANGE_FILTERED:
m_partMgrCache->scheduleRegeneration(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, 0));
break;
case RivReservoirViewPartMgr::RANGE_FILTERED_INACTIVE:
case RANGE_FILTERED_INACTIVE:
break;
case RivReservoirViewPartMgr::PROPERTY_FILTERED:
case PROPERTY_FILTERED:
break;
}
}

View File

@@ -45,12 +45,7 @@ public:
void updateStaticCellColors();
void scheduleGeometryRegen(unsigned short geometryType);
private:
enum GeometryType
{
ALL_CELLS,
RANGE_FILTERED
};
RivGeoMechPartMgrCache::Key currentPartMgrKey();
cvf::ref<RivGeoMechPartMgrCache> m_partMgrCache;
RimGeoMechView* m_geomechView;

View File

@@ -887,7 +887,7 @@ void RivReservoirViewPartMgr::appendFaultsDynamicGeometryPartsToModel(cvf::Model
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivReservoirViewPartMgr::RivCellSetEnum RivReservoirViewPartMgr::geometryTypeForFaultLabels(const std::vector<RivCellSetEnum>& geometryTypes) const
RivCellSetEnum RivReservoirViewPartMgr::geometryTypeForFaultLabels(const std::vector<RivCellSetEnum>& geometryTypes) const
{
bool hasInactive = false;
for (size_t i = 0; i < geometryTypes.size(); i++)

View File

@@ -24,6 +24,7 @@
#include "cafFixedArray.h"
#include "cvfArray.h"
#include "cafPdmObject.h"
#include "RivCellSetEnum.h"
class RimEclipseView;
class RigGridBase;
@@ -38,22 +39,6 @@ public:
cvf::Transform* scaleTransform() { return m_scaleTransform.p();}
enum RivCellSetEnum
{
ACTIVE, ///< All Active cells without ALL_WELL_CELLS
ALL_WELL_CELLS, ///< All cells ever having a connection to a well (Might be inactive cells as well. Wellhead cells typically)
VISIBLE_WELL_CELLS, ///< ALL_WELL_CELLS && visible well cells including Fence
VISIBLE_WELL_FENCE_CELLS, ///< (! ALL_WELL_CELLS) && visible well cells including Fence
INACTIVE, ///< All inactive cells, but invalid cells might or might not be included
RANGE_FILTERED, ///< ACTIVE Filtered by the set of range filters
RANGE_FILTERED_INACTIVE, ///< INACTIVE Filtered by the set of range filters
RANGE_FILTERED_WELL_CELLS, ///< ALL_WELL_CELLS Filtered by the set of range filters
VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER, ///< VISIBLE_WELL_CELLS && !RANGE_FILTERED_WELL_CELLS
VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER, ///< VISIBLE_WELL_FENCE_CELLS && !RANGE_FILTERED
PROPERTY_FILTERED, ///< (RANGE_FILTERED || VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER) && !ExcludedByPropFilter && IncludedByPropFilter
PROPERTY_FILTERED_WELL_CELLS ///< (!(hasActiveRangeFilters || visibleWellCells) && (*ALL_WELL_CELLS)) || RANGE_FILTERED_WELL_CELLS || VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER
};
void clearGeometryCache();
void scheduleGeometryRegen(RivCellSetEnum geometryType);
cvf::cref<cvf::UByteArray> cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t frameIndex) const;