Base class for a spline interpolation. More...
#include <qwt_spline.h>
Public Member Functions | |
virtual QVector< QLineF > | bezierControlLines (const QPolygonF &points) const =0 |
Interpolate a curve with Bezier curves. More... | |
virtual QPolygonF | equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const |
Find an interpolated polygon with "equidistant" points. More... | |
virtual QPainterPath | painterPath (const QPolygonF &) const |
Interpolate a curve with Bezier curves. More... | |
virtual QPolygonF | polygon (const QPolygonF &, double tolerance) const |
Interpolate a curve by a polygon. More... | |
QwtSplineInterpolating () | |
Constructor. More... | |
virtual | ~QwtSplineInterpolating () |
Destructor. More... | |
Public Member Functions inherited from QwtSpline | |
int | boundaryCondition (BoundaryPosition) const |
BoundaryType | boundaryType () const |
double | boundaryValue (BoundaryPosition) const |
virtual uint | locality () const |
const QwtSplineParametrization * | parametrization () const |
QwtSpline () | |
Constructor. More... | |
void | setBoundaryCondition (BoundaryPosition, int condition) |
Define the condition for an endpoint of the spline. More... | |
void | setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0) |
Define the condition at the endpoints of a spline. More... | |
void | setBoundaryType (BoundaryType) |
void | setBoundaryValue (BoundaryPosition, double value) |
Define the boundary value. More... | |
void | setParametrization (int type) |
void | setParametrization (QwtSplineParametrization *) |
virtual | ~QwtSpline () |
Destructor. More... | |
Additional Inherited Members | |
Public Types inherited from QwtSpline | |
enum | BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout } |
Boundary condition. More... | |
enum | BoundaryPosition { AtBeginning, AtEnd } |
enum | BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon } |
Base class for a spline interpolation.
Spline interpolation is the process of interpolating a set of points piecewise with polynomials. The initial set of points is preserved.
Definition at line 189 of file qwt_spline.h.
QwtSplineInterpolating::QwtSplineInterpolating | ( | ) |
Constructor.
Definition at line 709 of file qwt_spline.cpp.
|
virtual |
Destructor.
Definition at line 714 of file qwt_spline.cpp.
|
pure 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 |
Implemented in QwtSplineC2, QwtSplineC1, QwtSplineLocal, QwtSplineCubic, and QwtSplinePleasing.
|
virtual |
Find an interpolated polygon with "equidistant" points.
When withNodes is disabled all points of the resulting polygon will be equidistant according to the parametrization.
When withNodes is enabled the resulting polygon will also include the control points and the interpolated points are always aligned to the control point before ( points[i] + i * distance ).
The implementation calculates bezier curves first and calculates the interpolated points in a second run.
points | Control nodes of the spline |
distance | Distance between 2 points according to the parametrization |
withNodes | When true, also add the control nodes ( even if not being equidistant ) |
Reimplemented in QwtSplineC2, and QwtSplineC1.
Definition at line 861 of file qwt_spline.cpp.
|
virtual |
Interpolate a curve with Bezier curves.
Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.
The implementation calculates the Bezier control lines first and converts them into painter path elements in an additional loop.
points | Control points |
Implements QwtSpline.
Reimplemented in QwtSplineC2, QwtSplineC1, QwtSplineLocal, QwtSplineCubic, and QwtSplinePleasing.
Definition at line 746 of file qwt_spline.cpp.
|
virtual |
Interpolate a curve by a polygon.
Interpolates a polygon piecewise with Bezier curves approximating them by polygons.
The approximation is based on "Piecewise Linear Approximation of Bézier Curves" by Roger Willcocks ( http://www.rops.org )
points | Control points |
tolerance | Maximum for the accepted error of the approximation |
Reimplemented from QwtSpline.
Definition at line 803 of file qwt_spline.cpp.