mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed missing Well cell transparency on faults
This commit is contained in:
parent
82e97da553
commit
2a61073b26
@ -281,15 +281,15 @@ void RivFaultPartMgr::updateCellEdgeResultColor(size_t timeStepIndex, RimResultS
|
||||
|
||||
}
|
||||
|
||||
const int priFaultGeo = 1;
|
||||
const int priNncGeo = 2;
|
||||
const int priMesh = 3;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFaultPartMgr::generatePartGeometry()
|
||||
{
|
||||
const int priFaultGeo = 1;
|
||||
const int priNncGeo = 2;
|
||||
const int priMesh = 3;
|
||||
|
||||
bool useBufferObjects = true;
|
||||
// Surface geometry
|
||||
@ -476,13 +476,20 @@ void RivFaultPartMgr::updatePartEffect()
|
||||
|
||||
if (m_opacityLevel < 1.0f)
|
||||
{
|
||||
// Must be fixed since currently fault drawing relies on internal priorities of the parts
|
||||
CVF_FAIL_MSG("Not implemented");
|
||||
|
||||
// Set priority to make sure this transparent geometry are rendered last
|
||||
if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(100);
|
||||
if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(100);
|
||||
if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(100);
|
||||
if (m_nativeFaultFaces.notNull()) m_nativeFaultFaces->setPriority(100 + priFaultGeo);
|
||||
if (m_oppositeFaultFaces.notNull()) m_oppositeFaultFaces->setPriority(100 + priFaultGeo);
|
||||
if (m_NNCFaces.notNull()) m_NNCFaces->setPriority(100 + priNncGeo);
|
||||
|
||||
if (m_nativeFaultGridLines.notNull())
|
||||
{
|
||||
m_nativeFaultGridLines->setPriority(100 + priMesh);
|
||||
}
|
||||
|
||||
if (m_oppositeFaultGridLines.notNull())
|
||||
{
|
||||
m_oppositeFaultGridLines->setPriority(100 + priMesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
void setCellVisibility(cvf::UByteArray* cellVisibilities);
|
||||
|
||||
void applySingleColorEffect();
|
||||
void setOpacityLevel(float opacity) { m_opacityLevel = opacity; }
|
||||
void updateCellResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot);
|
||||
void updateCellEdgeResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot, RimCellEdgeResultSlot* cellEdgeResultSlot);
|
||||
|
||||
|
@ -233,3 +233,14 @@ void RivReservoirFaultsPartMgr::setFaultForceVisibility(bool forceVisibility)
|
||||
m_forceVisibility = forceVisibility;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::setOpacityLevel(float opacity)
|
||||
{
|
||||
for (size_t i = 0; i < m_faultParts.size(); i++)
|
||||
{
|
||||
m_faultParts[i]->setOpacityLevel(opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
void setCellVisibility(cvf::UByteArray* cellVisibilities);
|
||||
void setFaultForceVisibility(bool isFilterGenerated);
|
||||
|
||||
void setOpacityLevel(float opacity);
|
||||
void applySingleColorEffect();
|
||||
void updateColors(size_t timeStepIndex, RimResultSlot* cellResultSlot);
|
||||
void updateCellEdgeResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot,
|
||||
|
@ -98,6 +98,7 @@ void RivReservoirPartMgr::updateCellColor(cvf::Color4f color)
|
||||
|
||||
if (m_faultsPartMgr.notNull())
|
||||
{
|
||||
m_faultsPartMgr->setOpacityLevel(color.a());
|
||||
m_faultsPartMgr->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user