#ifndef CUBICSPLINE_H #define CUBICSPLINE_H #include #include #include #include #include class CubicSpline { /// contains x, y and y' of each interpolation point std::vector> points; bool useSlopes; public: CubicSpline(const std::vector>& dataPoints, bool useSlopes, bool minSlopes); float interpolateAt(float x); }; class ColorSpline { /// /// \brief at each position, stores the color value and the channel-wise /// slopes of the spline. /// std::map> points; bool useSlopes; public: ColorSpline(void) = default; ColorSpline(const std::vector>& dataPoints, bool useSlopes, bool minSlopes); RGBColorf interpolateAt(float x) const; }; #endif // CUBICSPLINE_H