#1252 Add and use transparent color for both ellipse and stim plan objects

This commit is contained in:
Magne Sjaastad
2017-02-23 10:15:56 +01:00
parent 5ccde99cb3
commit 7f75f7e509
3 changed files with 33 additions and 7 deletions

View File

@@ -89,10 +89,19 @@ void RivWellFracturePartMgr::updatePartGeometry(caf::DisplayCoordTransform* disp
m_part = new cvf::Part;
m_part->setDrawable(geo.p());
caf::SurfaceEffectGenerator surfaceGen(cvf::Color4f(cvf::Color3f(cvf::Color3::BROWN)), caf::PO_1);
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
cvf::Color4f fractureColor = cvf::Color4f(cvf::Color3f(cvf::Color3::BROWN));
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(RiaApplication::instance()->activeReservoirView());
if (activeView)
{
fractureColor = cvf::Color4f(activeView->stimPlanColors->defaultColor(), activeView->stimPlanColors->opacityLevel());
}
caf::SurfaceEffectGenerator surfaceGen(fractureColor, caf::PO_1);
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
m_part->setEffect(eff.p());
m_part->setPriority(RivPartPriority::PartType::Transparent);
}
}
@@ -201,8 +210,7 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor
}
else
{
cvf::Color4f fractureColor = cvf::Color4f(cvf::Color3f(cvf::Color3::BROWN));
fractureColor.a() = opacityLevel;
cvf::Color4f fractureColor = cvf::Color4f(activeView->stimPlanColors->defaultColor(), opacityLevel);
caf::SurfaceEffectGenerator surfaceGen(fractureColor, caf::PO_1);
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();