Added well pipe visibility filter based on cell visibility.

Only show pipes with wells with open connections in visible cells
p4#: 21349
This commit is contained in:
Jacob Støren
2013-04-22 09:13:37 +02:00
parent 638e82d24c
commit 6cac031fff
11 changed files with 304 additions and 212 deletions

View File

@@ -646,18 +646,8 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellColor(ReservoirGeometryCacheType geometryType, size_t timeStepIndex, cvf::Color4f color)
{
if (geometryType == PROPERTY_FILTERED)
{
m_propFilteredGeometryFrames[timeStepIndex]->updateCellColor(color );
}
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
{
m_propFilteredWellGeometryFrames[timeStepIndex]->updateCellColor(color );
}
else
{
m_geometries[geometryType].updateCellColor(color);
}
RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex );
pmgr->updateCellColor(color);
}
//--------------------------------------------------------------------------------------------------
@@ -676,35 +666,40 @@ void RivReservoirViewPartMgr::updateCellColor(ReservoirGeometryCacheType geometr
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellResultColor(ReservoirGeometryCacheType geometryType, size_t timeStepIndex, RimResultSlot* cellResultSlot)
{
if (geometryType == PROPERTY_FILTERED)
{
m_propFilteredGeometryFrames[timeStepIndex]->updateCellResultColor(timeStepIndex, cellResultSlot);
}
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
{
m_propFilteredWellGeometryFrames[timeStepIndex]->updateCellResultColor(timeStepIndex, cellResultSlot);
}
else
{
m_geometries[geometryType].updateCellResultColor(timeStepIndex, cellResultSlot);
}
RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex );
pmgr->updateCellResultColor(timeStepIndex, cellResultSlot);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellEdgeResultColor(ReservoirGeometryCacheType geometryType, size_t timeStepIndex, RimResultSlot* cellResultSlot, RimCellEdgeResultSlot* cellEdgeResultSlot)
{
RivReservoirPartMgr * pmgr = reservoirPartManager( geometryType, timeStepIndex );
pmgr->updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::cref<cvf::UByteArray> RivReservoirViewPartMgr::cellVisibility(ReservoirGeometryCacheType geometryType, size_t gridIndex, size_t timeStepIndex) const
{
RivReservoirPartMgr * pmgr = (const_cast<RivReservoirViewPartMgr*>(this))->reservoirPartManager( geometryType, timeStepIndex );
return pmgr->cellVisibility(gridIndex).p();
}
RivReservoirPartMgr * RivReservoirViewPartMgr::reservoirPartManager(ReservoirGeometryCacheType geometryType, size_t timeStepIndex )
{
if (geometryType == PROPERTY_FILTERED)
{
m_propFilteredGeometryFrames[timeStepIndex]->updateCellEdgeResultColor( timeStepIndex, cellResultSlot, cellEdgeResultSlot );
return m_propFilteredGeometryFrames[timeStepIndex].p();
}
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
{
m_propFilteredWellGeometryFrames[timeStepIndex]->updateCellEdgeResultColor( timeStepIndex, cellResultSlot, cellEdgeResultSlot );
return m_propFilteredWellGeometryFrames[timeStepIndex].p();
}
else
{
m_geometries[geometryType].updateCellEdgeResultColor(timeStepIndex, cellResultSlot, cellEdgeResultSlot );
return &m_geometries[geometryType];
}
}
}