merge with dev

This commit is contained in:
Desmis
2020-03-29 18:31:52 +02:00
17 changed files with 705 additions and 87 deletions

View File

@@ -3083,6 +3083,41 @@ void WavCurve::Set(const std::vector<double> &curvePoints)
}
}
Wavblcurve::Wavblcurve() {}
void Wavblcurve::Reset()
{
lutblcurve.reset();
}
void Wavblcurve::Set(const Curve &pCurve)
{
if (pCurve.isIdentity()) {
Reset(); // raise this value if the quality suffers from this number of samples
return;
}
lutblcurve(501); // raise this value if the quality suffers from this number of samples
for (int i = 0; i < 501; i++) {
lutblcurve[i] = pCurve.getVal(double(i) / 500.);
}
}
void Wavblcurve::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();
}
}
WavOpacityCurveRG::WavOpacityCurveRG() {}