mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4580 Import Eclipse RFT data as part of ensemble import
This commit is contained in:
@@ -142,6 +142,21 @@ cvf::Color3f RiaColorTools::fromQColorTo3f(QColor color)
|
||||
return cvf::Color3f(color.redF(), color.greenF(), color.blueF());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::blendCvfColors(const cvf::Color3f& color1,
|
||||
const cvf::Color3f& color2,
|
||||
int weight1 /*= 1*/,
|
||||
int weight2 /*= 1*/)
|
||||
{
|
||||
CVF_ASSERT(weight1 > 0 && weight2 > 0);
|
||||
int weightsum = weight1 + weight2;
|
||||
return cvf::Color3f((color1.r() * weight1 + color2.r() * weight2) / weightsum,
|
||||
(color1.g() * weight1 + color2.g() * weight2) / weightsum,
|
||||
(color1.b() * weight1 + color2.b() * weight2) / weightsum);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user