10 #ifndef QWT_SPLINE_POLYNOMIAL_H 11 #define QWT_SPLINE_POLYNOMIAL_H 16 #include <qmetatype.h> 38 double valueAt(
double x )
const;
39 double slopeAt(
double x )
const;
40 double curvatureAt(
double x )
const;
43 const QPointF& p1,
double m1,
44 const QPointF& p2,
double m2 );
47 double x,
double y,
double m1,
double m2 );
50 const QPointF& p1,
double cv1,
51 const QPointF& p2,
double cv2 );
54 double dx,
double dy,
double cv1,
double cv2 );
90 return ( c3 == other.
c3 ) && ( c2 == other.
c2 ) && ( c1 == other.
c1 );
99 return ( !( *
this == other ) );
110 return ( ( ( c3 * x ) + c2 ) * x + c1 ) *
x;
121 return ( 3.0 * c3 * x + 2.0 * c2 ) * x + c1;
132 return 6.0 * c3 * x + 2.0 * c2;
148 const QPointF& p1,
double m1,
const QPointF& p2,
double m2 )
150 return fromSlopes( p2.x() - p1.x(), p2.y() - p1.y(), m1, m2 );
165 double dx,
double dy,
double m1,
double m2 )
167 const double c2 = ( 3.0 * dy / dx - 2 * m1 - m2 ) / dx;
168 const double c3 = ( ( m2 - m1 ) / dx - 2.0 * c2 ) / ( 3.0 * dx );
186 const QPointF& p1,
double cv1,
const QPointF& p2,
double cv2 )
188 return fromCurvatures( p2.x() - p1.x(), p2.y() - p1.y(), cv1, cv2 );
203 double dx,
double dy,
double cv1,
double cv2 )
205 const double c3 = ( cv2 - cv1 ) / ( 6.0 * dx );
206 const double c2 = 0.5 * cv1;
207 const double c1 = dy / dx - ( c3 * dx + c2 ) * dx;
212 #ifndef QT_NO_DEBUG_STREAM double valueAt(double x) const
double c1
coefficient of the linear summand
constexpr bool operator!=(const optional< T > &lhs, const optional< U > &rhs)
relop
bool operator!=(const QwtSplinePolynomial &) const
double curvatureAt(double x) const
A cubic polynomial without constant term.
double slopeAt(double x) const
double c2
coefficient of the quadratic summand
double c3
coefficient of the cubic summand
bool operator==(const QwtSplinePolynomial &) const
static QwtSplinePolynomial fromSlopes(const QPointF &p1, double m1, const QPointF &p2, double m2)
bool operator==(QwtEventPattern::MousePattern b1, QwtEventPattern::MousePattern b2)
Compare operator.
Q_DECLARE_METATYPE(QwtPoint3D)
Q_DECLARE_TYPEINFO(QwtSplinePolynomial, Q_MOVABLE_TYPE)
static QwtSplinePolynomial fromCurvatures(const QPointF &p1, double cv1, const QPointF &p2, double cv2)
QWT_EXPORT QDebug operator<<(QDebug, const QwtSplinePolynomial &)