From 46f02f938473842e7b25b97b05ab4a390e4444c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Fri, 6 Sep 2013 15:05:41 +0200 Subject: [PATCH] Renaming and comments p4#: 22333 --- .../RivReservoirViewPartMgr.cpp | 7 +++-- .../RivReservoirViewPartMgr.h | 26 +++++++++---------- .../RimCellRangeFilterCollection.cpp | 12 ++++----- .../RimCellRangeFilterCollection.h | 2 +- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp index a50b45c917..79edf81b8f 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.cpp @@ -218,7 +218,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL { if (frameIndex >= m_propFilteredGeometryFramesNeedsRegen.size() || m_propFilteredGeometryFramesNeedsRegen[frameIndex]) { - createPropertyFilteredGeometry(frameIndex); + createPropertyFilteredNoneWellCellGeometry(frameIndex); } m_propFilteredGeometryFrames[frameIndex]->appendPartsToModel(model, gridIndices); } @@ -381,7 +381,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex) +void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t frameIndex) { RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData(); @@ -390,9 +390,12 @@ void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex) m_propFilteredGeometryFrames.resize(frameIndex + 1); m_propFilteredGeometryFramesNeedsRegen.resize(frameIndex + 1, true); } + if ( m_propFilteredGeometryFrames[frameIndex].isNull()) m_propFilteredGeometryFrames[frameIndex] = new RivReservoirPartMgr; + m_propFilteredGeometryFrames[frameIndex]->clearAndSetReservoir(res); m_propFilteredGeometryFrames[frameIndex]->setTransform(m_scaleTransform.p()); + std::vector grids; res->allGrids(&grids); diff --git a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h index b66d1abe27..fa82524662 100644 --- a/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivReservoirViewPartMgr.h @@ -39,18 +39,18 @@ public: enum ReservoirGeometryCacheType { - ACTIVE, - ALL_WELL_CELLS, - VISIBLE_WELL_CELLS, - VISIBLE_WELL_FENCE_CELLS, - INACTIVE, - RANGE_FILTERED, - RANGE_FILTERED_INACTIVE, - RANGE_FILTERED_WELL_CELLS, - VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER, - VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER, - PROPERTY_FILTERED, - PROPERTY_FILTERED_WELL_CELLS // Includes RANGE_FILTERED_WELL_CELLS and VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER and VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER + 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(); @@ -72,7 +72,7 @@ private: void createGeometry(ReservoirGeometryCacheType geometryType); void computeVisibility(cvf::UByteArray* cellVisibility, ReservoirGeometryCacheType geometryType, RigGridBase* grid, size_t gridIdx); - void createPropertyFilteredGeometry(size_t frameIndex); + void createPropertyFilteredNoneWellCellGeometry(size_t frameIndex); void createPropertyFilteredWellGeometry(size_t frameIndex); void clearGeometryCache(ReservoirGeometryCacheType geomType); diff --git a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp index 2d2bb080fa..c40b519a45 100644 --- a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.cpp @@ -42,8 +42,8 @@ RimCellRangeFilterCollection::RimCellRangeFilterCollection() CAF_PDM_InitObject("Cell Range Filters", ":/CellFilter_Range.png", "", ""); CAF_PDM_InitFieldNoDefault(&rangeFilters, "RangeFilters", "Range Filters", "", "", ""); - CAF_PDM_InitField(&active, "Active", true, "Active", "", "", ""); - active.setUiHidden(true); + CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", ""); + isActive.setUiHidden(true); } //-------------------------------------------------------------------------------------------------- @@ -146,7 +146,7 @@ RigActiveCellInfo* RimCellRangeFilterCollection::activeCellInfo() const //-------------------------------------------------------------------------------------------------- void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - updateUiIconFromState(active); + updateUiIconFromState(isActive); CVF_ASSERT(m_reservoirView); @@ -209,7 +209,7 @@ void RimCellRangeFilterCollection::remove(RimCellRangeFilter* rangeFilter) //-------------------------------------------------------------------------------------------------- bool RimCellRangeFilterCollection::hasActiveFilters() const { - if (!active) return false; + if (!isActive()) return false; std::list< caf::PdmPointer< RimCellRangeFilter > >::const_iterator it; for (it = rangeFilters.v().begin(); it != rangeFilters.v().end(); ++it) @@ -225,7 +225,7 @@ bool RimCellRangeFilterCollection::hasActiveFilters() const //-------------------------------------------------------------------------------------------------- caf::PdmFieldHandle* RimCellRangeFilterCollection::objectToggleField() { - return &active; + return &isActive; } //-------------------------------------------------------------------------------------------------- @@ -233,7 +233,7 @@ caf::PdmFieldHandle* RimCellRangeFilterCollection::objectToggleField() //-------------------------------------------------------------------------------------------------- bool RimCellRangeFilterCollection::hasActiveIncludeFilters() const { - if (!active) return false; + if (!isActive) return false; std::list< caf::PdmPointer< RimCellRangeFilter > >::const_iterator it; for (it = rangeFilters.v().begin(); it != rangeFilters.v().end(); ++it) diff --git a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h index 64d995cf87..211c410e8c 100644 --- a/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h +++ b/ApplicationCode/ProjectDataModel/RimCellRangeFilterCollection.h @@ -35,7 +35,7 @@ public: virtual ~RimCellRangeFilterCollection(); // Fields - caf::PdmField active; + caf::PdmField isActive; caf::PdmField< std::list< caf::PdmPointer< RimCellRangeFilter > > > rangeFilters; // Methods