Merge with dev

This commit is contained in:
Desmis
2020-05-13 08:51:50 +02:00
16 changed files with 1003 additions and 520 deletions

View File

@@ -3152,6 +3152,43 @@ void WavOpacityCurveRG::Set(const std::vector<double> &curvePoints)
}
WavOpacityCurveSH::WavOpacityCurveSH() {}
void WavOpacityCurveSH::Reset()
{
lutOpacityCurveSH.reset();
}
void WavOpacityCurveSH::Set(const Curve &pCurve)
{
if (pCurve.isIdentity()) {
Reset(); // raise this value if the quality suffers from this number of samples
return;
}
lutOpacityCurveSH(501); // raise this value if the quality suffers from this number of samples
for (int i = 0; i < 501; i++) {
lutOpacityCurveSH[i] = pCurve.getVal(double(i) / 500.);
}
}
void WavOpacityCurveSH::Set(const std::vector<double> &curvePoints)
{
if (!curvePoints.empty() && curvePoints[0] > FCT_Linear && curvePoints[0] < FCT_Unchanged) {
FlatCurve tcurve(curvePoints, false, CURVES_MIN_POLY_POINTS / 2);
tcurve.setIdentityValue(0.);
Set(tcurve);
} else {
Reset();
}
}
WavOpacityCurveBY::WavOpacityCurveBY() {}
void WavOpacityCurveBY::Reset()