From e834521b276eda5cff3e422b0372bb1a66e0b98a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 24 Apr 2020 22:23:36 +0200 Subject: Add the spline nodes to the UI. --- src/powermap.cc | 15 +++++++++++++++ src/powermap.h | 4 ++++ 2 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/powermap.cc b/src/powermap.cc index 6ffb74f..db1eafc 100644 --- a/src/powermap.cc +++ b/src/powermap.cc @@ -123,6 +123,21 @@ void Powermap::setShelf(bool enable) } } +PowerPair Powermap::getFixed0() const +{ + return fixed[0]; +} + +PowerPair Powermap::getFixed1() const +{ + return fixed[1]; +} + +PowerPair Powermap::getFixed2() const +{ + return fixed[2]; +} + // This mostly followes the wikipedia article for monotone cubic splines: // https://en.wikipedia.org/wiki/Monotone_cubic_interpolation void Powermap::updateSpline() diff --git a/src/powermap.h b/src/powermap.h index 589573f..aa4cbfc 100644 --- a/src/powermap.h +++ b/src/powermap.h @@ -53,6 +53,10 @@ public: void setFixed2(PowerPair new_value); void setShelf(bool enable); + PowerPair getFixed0() const; + PowerPair getFixed1() const; + PowerPair getFixed2() const; + private: // input parameters (state of this class) std::array fixed; -- cgit v1.2.3