00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #ifndef SPLINE_COEFF 00008 #define SPLINE_COEFF 00009 00010 #include "SplinePair.h" 00011 00014 class SplineCoeff 00015 { 00016 public: 00018 SplineCoeff(double t); 00019 00021 SplineCoeff(double t, 00022 const SplinePair &a, 00023 const SplinePair &b, 00024 const SplinePair &c, 00025 const SplinePair &d); 00026 00028 bool operator<(const SplineCoeff &e) const; 00029 00031 bool operator<(double t) const; 00032 00034 SplinePair a () const; 00035 00037 SplinePair b () const; 00038 00040 SplinePair c () const; 00041 00043 SplinePair d () const; 00044 00046 SplinePair eval(double t) const; 00047 00049 double t () const; 00050 00051 private: 00052 SplineCoeff(); 00053 00054 double m_t; 00055 SplinePair m_a; 00056 SplinePair m_b; 00057 SplinePair m_c; 00058 SplinePair m_d; 00059 }; 00060 00061 #endif // SPLINE_COEFF