A spline with C1 continuity. More...
#include <qwt_spline_local.h>
Public Types | |
enum | Type { Cardinal, ParabolicBlending, Akima, PChip } |
Spline interpolation type. More... | |
Public Member Functions | |
virtual QVector< QLineF > | bezierControlLines (const QPolygonF &) const |
Interpolate a curve with Bezier curves. | |
virtual uint | locality () const |
virtual QPainterPath | painterPath (const QPolygonF &) const |
Interpolate a curve with Bezier curves. | |
virtual QVector < QwtSplinePolynomial > | polynomials (const QPolygonF &) const |
Calculate the interpolating polynomials for a non parametric spline. | |
QwtSplineLocal (Type type) | |
Constructor. | |
virtual QVector< double > | slopes (const QPolygonF &) const |
Find the first derivative at the control points. | |
Type | type () const |
virtual | ~QwtSplineLocal () |
Destructor. | |
Private Attributes | |
const Type | d_type |
A spline with C1 continuity.
QwtSplineLocal offers several standard algorithms for interpolating a curve with polynomials having C1 continuity at the control points. All algorithms are local in a sense, that changing one control point only few polynomials.
Definition at line 24 of file qwt_spline_local.h.
enum QwtSplineLocal::Type |
Spline interpolation type.
All type of spline interpolations are lightweight algorithms calculating the slopes at a point by looking 1 or 2 points back and ahead.
Definition at line 34 of file qwt_spline_local.h.
QwtSplineLocal::QwtSplineLocal | ( | Type | type | ) |
Constructor.
type | Spline type, specifying the type of interpolation |
Definition at line 448 of file qwt_spline_local.cpp.
QwtSplineLocal::~QwtSplineLocal | ( | ) | [virtual] |
Destructor.
Definition at line 459 of file qwt_spline_local.cpp.
QVector< QLineF > QwtSplineLocal::bezierControlLines | ( | const QPolygonF & | points | ) | const [virtual] |
Interpolate a curve with Bezier curves.
Interpolates a polygon piecewise with cubic Bezier curves and returns the 2 control points of each curve as QLineF.
points | Control points |
Reimplemented from QwtSplineC1.
Definition at line 500 of file qwt_spline_local.cpp.
uint QwtSplineLocal::locality | ( | ) | const [virtual] |
The locality of an spline interpolation identifies how many adjacent polynoms are affected, when changing the position of one point.
The Cardinal, ParabolicBlending and PChip algorithms have a locality of 1, while the Akima interpolation has a locality of 2.
Reimplemented from QwtSpline.
Definition at line 550 of file qwt_spline_local.cpp.
QPainterPath QwtSplineLocal::painterPath | ( | const QPolygonF & | points | ) | const [virtual] |
Interpolate a curve with Bezier curves.
Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.
points | Control points |
Reimplemented from QwtSplineC1.
Definition at line 480 of file qwt_spline_local.cpp.
QVector< QwtSplinePolynomial > QwtSplineLocal::polynomials | ( | const QPolygonF & | points | ) | const [virtual] |
Calculate the interpolating polynomials for a non parametric spline.
points | Control points |
Reimplemented from QwtSplineC1.
Definition at line 535 of file qwt_spline_local.cpp.
QVector< double > QwtSplineLocal::slopes | ( | const QPolygonF & | points | ) | const [virtual] |
Find the first derivative at the control points.
points | Control nodes of the spline |
Implements QwtSplineC1.
Definition at line 519 of file qwt_spline_local.cpp.
QwtSplineLocal::Type QwtSplineLocal::type | ( | ) | const |
Definition at line 466 of file qwt_spline_local.cpp.
const Type QwtSplineLocal::d_type [private] |
Definition at line 80 of file qwt_spline_local.h.