GUI for TM wavelet

This commit is contained in:
Desmis
2020-03-22 10:37:21 +01:00
parent d63fb77c8c
commit 1f4613cd3b
13 changed files with 248 additions and 10 deletions

View File

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