mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well cell transparency: Turned off well cell transparency when no well pipe is visible.
For results visulaization, cell edge and faults faces. Not yet done for visualization without result colors. p4#: 21462
This commit is contained in:
@@ -276,3 +276,39 @@ caf::PdmFieldHandle* RimWellCollection::objectToggleField()
|
||||
return &active;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<cvf::ubyte>& RimWellCollection::isWellPipesVisible(size_t frameIndex)
|
||||
{
|
||||
calculateIsWellPipesVisible(frameIndex);
|
||||
return m_isWellPipesVisible[frameIndex];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::scheduleIsWellPipesVisibleRecalculation()
|
||||
{
|
||||
m_isWellPipesVisible.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellCollection::calculateIsWellPipesVisible(size_t frameIndex)
|
||||
{
|
||||
if (m_isWellPipesVisible.size() > frameIndex && m_isWellPipesVisible[frameIndex].size()) return;
|
||||
|
||||
if (m_isWellPipesVisible.size() <= frameIndex)
|
||||
m_isWellPipesVisible.resize(frameIndex+1);
|
||||
|
||||
if (m_isWellPipesVisible[frameIndex].size() <= wells().size())
|
||||
m_isWellPipesVisible[frameIndex].resize(wells().size(), false);
|
||||
|
||||
for (size_t i = 0; i < wells().size(); ++i)
|
||||
{
|
||||
m_isWellPipesVisible[frameIndex][i] = wells[i]->calculateWellPipeVisibility(frameIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user