mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#401) WIP: Prototyped total cell visibility calculation and
calculation of overridden cell visibility.
This commit is contained in:
parent
c8751bebe0
commit
b6fb85e0a4
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#include "RigGeoMechCaseData.h"
|
#include "RigGeoMechCaseData.h"
|
||||||
#include "RigFemPartResultsCollection.h"
|
#include "RigFemPartResultsCollection.h"
|
||||||
|
#include "RimViewLink.h"
|
||||||
|
#include "RimViewLinker.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -166,3 +168,38 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility(cvf::UByteArray* c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RivFemElmVisibilityCalculator::computeOverriddenCellVisibility(cvf::UByteArray* elmVisibilities,
|
||||||
|
const RigFemPart* femPart,
|
||||||
|
RimViewLink* masterViewLink)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
CVF_ASSERT(elmVisibilities != NULL);
|
||||||
|
CVF_ASSERT(femPart != NULL);
|
||||||
|
|
||||||
|
RimView* masterView = masterViewLink->ownerViewLinker()->mainView();
|
||||||
|
cvf::ref<cvf::UByteArray> totCellVisibility = masterView->currentTotalCellVisibility();
|
||||||
|
|
||||||
|
int elmCount = femPart->elementCount();
|
||||||
|
elmVisibilities->resize(elmCount);
|
||||||
|
elmVisibilities->setAll(false);
|
||||||
|
|
||||||
|
RigCaseCellMapper* cellMapper = masterViewLink->cellMapper();
|
||||||
|
|
||||||
|
for (size_t elmIdx = 0; elmIdx < elmCount; ++elmIdx)
|
||||||
|
{
|
||||||
|
// We are assuming that there is only one part.
|
||||||
|
int cellCount = 0;
|
||||||
|
const int* cellIndicesInMasterCase = cellMapper->masterCaseCellIndex(elmIdx, &cellCount);
|
||||||
|
|
||||||
|
for (int mcIdx = 0; mcIdx < cellCount; ++mcIdx)
|
||||||
|
{
|
||||||
|
(*elmVisibilities)[elmIdx] |= (*totCellVisibility)[cellIndicesInMasterCase[mcIdx]]; // If any is visible, show
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ namespace cvf
|
|||||||
|
|
||||||
class RigFemPart;
|
class RigFemPart;
|
||||||
class RimGeoMechPropertyFilterCollection;
|
class RimGeoMechPropertyFilterCollection;
|
||||||
|
class RimViewLink;
|
||||||
|
|
||||||
class RivFemElmVisibilityCalculator
|
class RivFemElmVisibilityCalculator
|
||||||
{
|
{
|
||||||
@ -41,6 +42,11 @@ public:
|
|||||||
int timeStepIndex,
|
int timeStepIndex,
|
||||||
const cvf::UByteArray* rangeFilterVisibility,
|
const cvf::UByteArray* rangeFilterVisibility,
|
||||||
RimGeoMechPropertyFilterCollection* propFilterColl);
|
RimGeoMechPropertyFilterCollection* propFilterColl);
|
||||||
|
|
||||||
|
static void computeOverriddenCellVisibility(cvf::UByteArray* elmVisibilities,
|
||||||
|
const RigFemPart* femPart ,
|
||||||
|
RimViewLink* masterViewLink);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,6 +207,13 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr(RivGeoMechPartMgrCache:
|
|||||||
m_geomechView->propertyFilterCollection()
|
m_geomechView->propertyFilterCollection()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else if (pMgrKey.geometryType() == OVERRIDDEN_CELL_VISIBILITY)
|
||||||
|
{
|
||||||
|
RivFemElmVisibilityCalculator::computeOverriddenCellVisibility(elmVisibility.p(),
|
||||||
|
caseData->femParts()->part(femPartIdx),
|
||||||
|
m_geomechView->controllingViewLink());
|
||||||
|
}
|
||||||
|
|
||||||
else if (pMgrKey.geometryType() == ALL_CELLS)
|
else if (pMgrKey.geometryType() == ALL_CELLS)
|
||||||
{
|
{
|
||||||
RivFemElmVisibilityCalculator::computeAllVisible(elmVisibility.p(), caseData->femParts()->part(femPartIdx));
|
RivFemElmVisibilityCalculator::computeAllVisible(elmVisibility.p(), caseData->femParts()->part(femPartIdx));
|
||||||
@ -224,4 +231,32 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr(RivGeoMechPartMgrCache:
|
|||||||
return partMgrToUpdate;
|
return partMgrToUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RivGeoMechVizLogic::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStepIndex)
|
||||||
|
{
|
||||||
|
size_t gridCount = m_geomechView->geoMechCase()->geoMechData()->femParts()->partCount();
|
||||||
|
|
||||||
|
if (gridCount == 0) return;
|
||||||
|
|
||||||
|
RigFemPart* part = m_geomechView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||||
|
size_t elmCount = part->elementCount();
|
||||||
|
|
||||||
|
totalVisibility->resize(elmCount);
|
||||||
|
totalVisibility->setAll(false);
|
||||||
|
|
||||||
|
std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs = keysToVisiblePartMgrs(timeStepIndex);
|
||||||
|
for (size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx)
|
||||||
|
{
|
||||||
|
RivGeoMechPartMgr* partMgr = m_partMgrCache->partMgr(visiblePartMgrs[pmIdx]);
|
||||||
|
|
||||||
|
cvf::ref<cvf::UByteArray> visibility = partMgr->cellVisibility(0);
|
||||||
|
for (int elmIdx = 0; elmIdx < elmCount; ++ elmIdx)
|
||||||
|
{
|
||||||
|
(*totalVisibility)[elmIdx] |= (*visibility)[elmIdx];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include "cvfArray.h"
|
||||||
#include "cvfObject.h"
|
#include "cvfObject.h"
|
||||||
#include "cvfColor4.h"
|
#include "cvfColor4.h"
|
||||||
#include "RivGeoMechPartMgrCache.h"
|
#include "RivGeoMechPartMgrCache.h"
|
||||||
@ -47,6 +48,7 @@ public:
|
|||||||
void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors);
|
void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors);
|
||||||
void updateStaticCellColors(int timeStepIndex);
|
void updateStaticCellColors(int timeStepIndex);
|
||||||
void scheduleGeometryRegen(RivCellSetEnum geometryType);
|
void scheduleGeometryRegen(RivCellSetEnum geometryType);
|
||||||
|
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStepIndex);
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex);
|
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex);
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "RimEclipseWellCollection.h"
|
#include "RimEclipseWellCollection.h"
|
||||||
|
|
||||||
#include "RivGridPartMgr.h"
|
#include "RivGridPartMgr.h"
|
||||||
|
#include "RimViewLink.h"
|
||||||
|
#include "RimViewLinker.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -59,6 +61,8 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
|||||||
{
|
{
|
||||||
switch (geometryType)
|
switch (geometryType)
|
||||||
{
|
{
|
||||||
|
case OVERRIDDEN_CELL_VISIBILITY:
|
||||||
|
clearGeometryCache(OVERRIDDEN_CELL_VISIBILITY);
|
||||||
case INACTIVE:
|
case INACTIVE:
|
||||||
clearGeometryCache(INACTIVE);
|
clearGeometryCache(INACTIVE);
|
||||||
clearGeometryCache(RANGE_FILTERED_INACTIVE);
|
clearGeometryCache(RANGE_FILTERED_INACTIVE);
|
||||||
@ -184,6 +188,7 @@ void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivReservoirViewPartMgr::clearGeometryCache()
|
void RivReservoirViewPartMgr::clearGeometryCache()
|
||||||
{
|
{
|
||||||
|
clearGeometryCache(OVERRIDDEN_CELL_VISIBILITY);
|
||||||
clearGeometryCache(ACTIVE);
|
clearGeometryCache(ACTIVE);
|
||||||
clearGeometryCache(ALL_WELL_CELLS);
|
clearGeometryCache(ALL_WELL_CELLS);
|
||||||
clearGeometryCache(VISIBLE_WELL_CELLS);
|
clearGeometryCache(VISIBLE_WELL_CELLS);
|
||||||
@ -268,6 +273,9 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
|||||||
|
|
||||||
switch (geometryType)
|
switch (geometryType)
|
||||||
{
|
{
|
||||||
|
case OVERRIDDEN_CELL_VISIBILITY:
|
||||||
|
computeOverriddenCellVisibility(cellVisibility, grid);
|
||||||
|
break;
|
||||||
case ACTIVE:
|
case ACTIVE:
|
||||||
computeNativeVisibility(cellVisibility, grid, activeCellInfo, eclipseCase->wellCellsInGrid(gridIdx), false, false, true, m_reservoirView->showMainGrid() );
|
computeNativeVisibility(cellVisibility, grid, activeCellInfo, eclipseCase->wellCellsInGrid(gridIdx), false, false, true, m_reservoirView->showMainGrid() );
|
||||||
break;
|
break;
|
||||||
@ -582,6 +590,67 @@ void RivReservoirViewPartMgr::computeNativeVisibility(cvf::UByteArray* cellVisib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RivReservoirViewPartMgr::computeOverriddenCellVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid)
|
||||||
|
{
|
||||||
|
|
||||||
|
RimViewLink* masterViewLink = m_reservoirView->controllingViewLink();
|
||||||
|
|
||||||
|
CVF_ASSERT(masterViewLink);
|
||||||
|
|
||||||
|
RimView* masterView = masterViewLink->ownerViewLinker()->mainView();
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// get cell visibility
|
||||||
|
#if 1
|
||||||
|
cvf::ref<cvf::UByteArray> totCellVisibility = masterView->currentTotalCellVisibility();
|
||||||
|
#else
|
||||||
|
// Could get something more like
|
||||||
|
std::vector<std::vector<cvf::UByteArray*> > gridsWithCellSetVisibility = masterView->getAllGridsCurrentCellSetsCellVisibility();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CVF_ASSERT(cellVisibility != NULL);
|
||||||
|
CVF_ASSERT(grid != NULL);
|
||||||
|
|
||||||
|
size_t gridCellCount = grid->cellCount();
|
||||||
|
cellVisibility->resize(gridCellCount);
|
||||||
|
cellVisibility->setAll(false);
|
||||||
|
|
||||||
|
RigCaseCellMapper* cellMapper = masterViewLink->cellMapper();
|
||||||
|
|
||||||
|
for (size_t lcIdx = 0; lcIdx < gridCellCount; ++lcIdx)
|
||||||
|
{
|
||||||
|
#if 1
|
||||||
|
size_t reservoirCellIdx = grid->reservoirCellIndex(lcIdx);
|
||||||
|
int cellCount = 0;
|
||||||
|
const int* cellIndicesInMasterCase = cellMapper->masterCaseCellIndex(reservoirCellIdx, &cellCount);
|
||||||
|
|
||||||
|
for (int mcIdx = 0; mcIdx < cellCount; ++mcIdx)
|
||||||
|
{
|
||||||
|
(*cellVisibility)[lcIdx] |= (*totCellVisibility)[cellIndicesInMasterCase[mcIdx]]; // If any is visible, show
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
const RigGridCells& masterCaseCells = cellMapper->masterCaseGridAndLocalCellIndex(grid->gridIndex, lcIdx);
|
||||||
|
|
||||||
|
for (int mcIdx = 0; mcIdx < masterCaseCells.cellCount(); ++mcIdx)
|
||||||
|
{
|
||||||
|
int cellSetCount = gridsWithCellSetVisibility[ masterCaseCells.gridIndex[mcIdx] ].size();
|
||||||
|
for (int csIdx = 0; csIdx < cellSetCount; ++csIdx)
|
||||||
|
{
|
||||||
|
(*cellVisibility)[lcIdx] |= gridsWithCellSetVisibility[masterCaseCells.gridIndex[mcIdx]][masterCaseCells.cellIndex[mcIdx]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Copy the data from source into destination. This is not trivial to do using cvf::Array ...
|
/// Copy the data from source into destination. This is not trivial to do using cvf::Array ...
|
||||||
|
@ -83,7 +83,10 @@ private:
|
|||||||
static void computeNativeVisibility (cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const RigActiveCellInfo* activeCellInfo, const cvf::UByteArray* cellIsInWellStatuses, bool invalidCellsIsVisible, bool inactiveCellsIsVisible, bool activeCellsIsVisible, bool mainGridIsVisible);
|
static void computeNativeVisibility (cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const RigActiveCellInfo* activeCellInfo, const cvf::UByteArray* cellIsInWellStatuses, bool invalidCellsIsVisible, bool inactiveCellsIsVisible, bool activeCellsIsVisible, bool mainGridIsVisible);
|
||||||
void computeRangeVisibility (RivCellSetEnum geometryType, cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const cvf::UByteArray* nativeVisibility, const RimCellRangeFilterCollection* rangeFilterColl);
|
void computeRangeVisibility (RivCellSetEnum geometryType, cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const cvf::UByteArray* nativeVisibility, const RimCellRangeFilterCollection* rangeFilterColl);
|
||||||
static void computePropertyVisibility(cvf::UByteArray* cellVisibilities, const RigGridBase* grid, size_t timeStepIndex, const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl);
|
static void computePropertyVisibility(cvf::UByteArray* cellVisibilities, const RigGridBase* grid, size_t timeStepIndex, const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl);
|
||||||
static void copyByteArray(cvf::UByteArray* cellVisibilities, const cvf::UByteArray* cellIsWellStatuses );
|
void computeOverriddenCellVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid);
|
||||||
|
|
||||||
|
|
||||||
|
static void copyByteArray(cvf::UByteArray* dest, const cvf::UByteArray* source );
|
||||||
|
|
||||||
RivReservoirPartMgr * reservoirPartManager(RivCellSetEnum geometryType, size_t timeStepIndex );
|
RivReservoirPartMgr * reservoirPartManager(RivCellSetEnum geometryType, size_t timeStepIndex );
|
||||||
|
|
||||||
|
@ -838,11 +838,13 @@ void RimEclipseView::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
|||||||
{
|
{
|
||||||
m_reservoirGridPartManager->scheduleGeometryRegen(geometryType);
|
m_reservoirGridPartManager->scheduleGeometryRegen(geometryType);
|
||||||
|
|
||||||
RimViewLinker* viewLinker = viewLinkerWithDepViews();
|
RimViewLinker* viewLinker = viewLinkerWithMyDepViews();
|
||||||
if (viewLinker)
|
if (viewLinker)
|
||||||
{
|
{
|
||||||
viewLinker->scheduleGeometryRegenForDepViews(geometryType);
|
viewLinker->scheduleGeometryRegenForDepViews(geometryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_currentReservoirCellVisibility = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1547,3 +1549,31 @@ void RimEclipseView::setOverridePropertyFilterCollection(RimEclipsePropertyFilte
|
|||||||
this->scheduleGeometryRegen(PROPERTY_FILTERED);
|
this->scheduleGeometryRegen(PROPERTY_FILTERED);
|
||||||
this->scheduleCreateDisplayModelAndRedraw();
|
this->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimEclipseView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility)
|
||||||
|
{
|
||||||
|
size_t gridCount = this->eclipseCase()->reservoirData()->gridCount();
|
||||||
|
size_t cellCount = this->eclipseCase()->reservoirData()->mainGrid()->cells().size();
|
||||||
|
|
||||||
|
totalVisibility->resize(cellCount);
|
||||||
|
totalVisibility->setAll(false);
|
||||||
|
|
||||||
|
for (size_t gridIdx = 0; gridIdx < gridCount; ++gridIdx)
|
||||||
|
{
|
||||||
|
RigGridBase * grid = this->eclipseCase()->reservoirData()->grid(gridIdx);
|
||||||
|
int gridCellCount = static_cast<int>(grid->cellCount());
|
||||||
|
|
||||||
|
for (size_t gpIdx = 0; gpIdx < m_visibleGridParts.size(); ++gpIdx)
|
||||||
|
{
|
||||||
|
cvf::cref<cvf::UByteArray> visibility = m_reservoirGridPartManager->cellVisibility(m_visibleGridParts[gpIdx], gridIdx, m_currentTimeStep);
|
||||||
|
|
||||||
|
for (int lcIdx = 0; lcIdx < gridCellCount; ++ lcIdx)
|
||||||
|
{
|
||||||
|
(*totalVisibility)[grid->reservoirCellIndex(lcIdx)] |= (*visibility)[lcIdx];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -164,6 +164,8 @@ private:
|
|||||||
|
|
||||||
virtual RimCase* ownerCase();
|
virtual RimCase* ownerCase();
|
||||||
|
|
||||||
|
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility);
|
||||||
|
|
||||||
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
||||||
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
||||||
|
|
||||||
|
@ -516,11 +516,12 @@ void RimGeoMechView::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
|||||||
{
|
{
|
||||||
m_vizLogic->scheduleGeometryRegen(geometryType);
|
m_vizLogic->scheduleGeometryRegen(geometryType);
|
||||||
|
|
||||||
RimViewLinker* viewLinker = viewLinkerWithDepViews();
|
RimViewLinker* viewLinker = viewLinkerWithMyDepViews();
|
||||||
if (viewLinker)
|
if (viewLinker)
|
||||||
{
|
{
|
||||||
viewLinker->scheduleGeometryRegenForDepViews(geometryType);
|
viewLinker->scheduleGeometryRegenForDepViews(geometryType);
|
||||||
}
|
}
|
||||||
|
m_currentReservoirCellVisibility = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -549,3 +550,11 @@ RimGeoMechPropertyFilterCollection* RimGeoMechView::propertyFilterCollection()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimGeoMechView::calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility)
|
||||||
|
{
|
||||||
|
m_vizLogic->calculateCurrentTotalCellVisibility(totalVisibility, m_currentTimeStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -93,6 +93,8 @@ private:
|
|||||||
|
|
||||||
virtual RimCase* ownerCase();
|
virtual RimCase* ownerCase();
|
||||||
|
|
||||||
|
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility);
|
||||||
|
|
||||||
caf::PdmChildField<RimGeoMechPropertyFilterCollection*> m_propertyFilterCollection;
|
caf::PdmChildField<RimGeoMechPropertyFilterCollection*> m_propertyFilterCollection;
|
||||||
caf::PdmPointer<RimGeoMechPropertyFilterCollection> m_overridePropertyFilterCollection;
|
caf::PdmPointer<RimGeoMechPropertyFilterCollection> m_overridePropertyFilterCollection;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ void RimView::updateViewerWidget()
|
|||||||
void RimView::scheduleCreateDisplayModelAndRedraw()
|
void RimView::scheduleCreateDisplayModelAndRedraw()
|
||||||
{
|
{
|
||||||
RiaApplication::instance()->scheduleDisplayModelUpdateAndRedraw(this);
|
RiaApplication::instance()->scheduleDisplayModelUpdateAndRedraw(this);
|
||||||
RimViewLinker* viewLinker = viewLinkerWithDepViews();
|
RimViewLinker* viewLinker = viewLinkerWithMyDepViews();
|
||||||
if (viewLinker)
|
if (viewLinker)
|
||||||
{
|
{
|
||||||
viewLinker->scheduleCreateDisplayModelAndRedrawForDependentViews();
|
viewLinker->scheduleCreateDisplayModelAndRedrawForDependentViews();
|
||||||
@ -723,7 +723,7 @@ bool RimView::isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimViewLinker* RimView::viewLinkerWithDepViews()
|
RimViewLinker* RimView::viewLinkerWithMyDepViews()
|
||||||
{
|
{
|
||||||
RimViewLinker* viewLinker = NULL;
|
RimViewLinker* viewLinker = NULL;
|
||||||
std::vector<caf::PdmObjectHandle*> reffingObjs;
|
std::vector<caf::PdmObjectHandle*> reffingObjs;
|
||||||
@ -739,3 +739,36 @@ RimViewLinker* RimView::viewLinkerWithDepViews()
|
|||||||
return viewLinker;
|
return viewLinker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimViewLink* RimView::controllingViewLink()
|
||||||
|
{
|
||||||
|
RimViewLink* viewLink = NULL;
|
||||||
|
std::vector<caf::PdmObjectHandle*> reffingObjs;
|
||||||
|
|
||||||
|
this->objectsWithReferringPtrFields(reffingObjs);
|
||||||
|
for (size_t i = 0; i < reffingObjs.size(); ++i)
|
||||||
|
{
|
||||||
|
viewLink = dynamic_cast<RimViewLink*>(reffingObjs[i]);
|
||||||
|
if (viewLink) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return viewLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::ref<cvf::UByteArray> RimView::currentTotalCellVisibility()
|
||||||
|
{
|
||||||
|
if (m_currentReservoirCellVisibility.isNull())
|
||||||
|
{
|
||||||
|
m_currentReservoirCellVisibility = new cvf::UByteArray;
|
||||||
|
this->calculateCurrentTotalCellVisibility(m_currentReservoirCellVisibility.p());
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_currentReservoirCellVisibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,11 @@
|
|||||||
|
|
||||||
#include "RivCellSetEnum.h"
|
#include "RivCellSetEnum.h"
|
||||||
|
|
||||||
|
#include "cvfArray.h"
|
||||||
|
#include "cvfBase.h"
|
||||||
|
#include "cvfObject.h"
|
||||||
|
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
class Rim3dOverlayInfoConfig;
|
class Rim3dOverlayInfoConfig;
|
||||||
@ -36,6 +41,7 @@ class RimCase;
|
|||||||
class RimCellRangeFilterCollection;
|
class RimCellRangeFilterCollection;
|
||||||
class RiuViewer;
|
class RiuViewer;
|
||||||
class RimViewLinker;
|
class RimViewLinker;
|
||||||
|
class RimViewLink;
|
||||||
|
|
||||||
namespace cvf
|
namespace cvf
|
||||||
{
|
{
|
||||||
@ -120,6 +126,8 @@ public:
|
|||||||
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) = 0;
|
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) = 0;
|
||||||
void scheduleCreateDisplayModelAndRedraw();
|
void scheduleCreateDisplayModelAndRedraw();
|
||||||
void createDisplayModelAndRedraw();
|
void createDisplayModelAndRedraw();
|
||||||
|
RimViewLink* controllingViewLink();
|
||||||
|
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void loadDataAndUpdate() = 0;
|
virtual void loadDataAndUpdate() = 0;
|
||||||
@ -129,7 +137,7 @@ public:
|
|||||||
virtual caf::PdmFieldHandle* userDescriptionField() { return &name; }
|
virtual caf::PdmFieldHandle* userDescriptionField() { return &name; }
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
RimViewLinker* viewLinkerWithDepViews();
|
RimViewLinker* viewLinkerWithMyDepViews();
|
||||||
void setDefaultView();
|
void setDefaultView();
|
||||||
|
|
||||||
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||||
@ -152,6 +160,7 @@ protected:
|
|||||||
virtual void updateViewerWidgetWindowTitle() = 0;
|
virtual void updateViewerWidgetWindowTitle() = 0;
|
||||||
|
|
||||||
virtual void resetLegendsInViewer() = 0;
|
virtual void resetLegendsInViewer() = 0;
|
||||||
|
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility) = 0;
|
||||||
|
|
||||||
QPointer<RiuViewer> m_viewer;
|
QPointer<RiuViewer> m_viewer;
|
||||||
|
|
||||||
@ -166,13 +175,13 @@ protected:
|
|||||||
|
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||||
|
|
||||||
|
cvf::ref<cvf::UByteArray> m_currentReservoirCellVisibility;
|
||||||
private:
|
private:
|
||||||
static bool isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB);
|
static bool isBoundingBoxesOverlappingOrClose(const cvf::BoundingBox& sourceBB, const cvf::BoundingBox& destBB);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_previousGridModeMeshLinesWasFaults;
|
bool m_previousGridModeMeshLinesWasFaults;
|
||||||
caf::PdmField<bool> m_disableLighting;
|
caf::PdmField<bool> m_disableLighting;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -500,3 +500,15 @@ void RimViewLink::doSyncCellResult()
|
|||||||
linkedViews->updateCellResult();
|
linkedViews->updateCellResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimViewLinker* RimViewLink::ownerViewLinker()
|
||||||
|
{
|
||||||
|
RimViewLinker* viewLinker = NULL;
|
||||||
|
this->firstAnchestorOrThisOfType(viewLinker);
|
||||||
|
CVF_ASSERT(viewLinker);
|
||||||
|
|
||||||
|
return viewLinker;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
class RimView;
|
class RimView;
|
||||||
class RimEclipseView;
|
class RimEclipseView;
|
||||||
class RimGeoMechView;
|
class RimGeoMechView;
|
||||||
|
class RimViewLinker;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@ -44,6 +45,7 @@ public:
|
|||||||
|
|
||||||
RimView* managedView();
|
RimView* managedView();
|
||||||
void setManagedView(RimView* view);
|
void setManagedView(RimView* view);
|
||||||
|
RimViewLinker* ownerViewLinker();
|
||||||
|
|
||||||
// Linked (both ways) properties
|
// Linked (both ways) properties
|
||||||
caf::PdmField<bool> syncCamera;
|
caf::PdmField<bool> syncCamera;
|
||||||
|
Loading…
Reference in New Issue
Block a user