|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Base class for spline interpolation. More...
#include <qwt_spline.h>
Public Member Functions | |
| QwtSplineInterpolating () | |
| Constructor. | |
| ~QwtSplineInterpolating () override | |
| Destructor. | |
| virtual QPolygonF | equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const |
| Find an interpolated polygon with "equidistant" points. | |
| virtual QPolygonF | polygon (const QPolygonF &, double tolerance) const override |
| Interpolate a curve by a polygon. | |
| virtual QPainterPath | painterPath (const QPolygonF &) const override |
| Interpolate a curve with Bezier curves. | |
| virtual QVector< QLineF > | bezierControlLines (const QPolygonF &) const =0 |
| Interpolate a curve with Bezier curves. | |
Public Member Functions inherited from QwtSpline | |
| QwtSpline () | |
| Constructor. | |
| virtual | ~QwtSpline () |
| Destructor. | |
| void | setParametrization (int type) |
| Set parametrization by type. | |
| void | setParametrization (QwtSplineParametrization *) |
| Set parametrization object. | |
| const QwtSplineParametrization * | parametrization () const |
| Get parametrization. | |
| void | setBoundaryType (BoundaryType) |
| Set boundary type. | |
| BoundaryType | boundaryType () const |
| Get boundary type. | |
| void | setBoundaryValue (BoundaryPosition, double value) |
| Set boundary value. | |
| double | boundaryValue (BoundaryPosition) const |
| Get boundary value. | |
| void | setBoundaryCondition (BoundaryPosition, int condition) |
| Set boundary condition. | |
| int | boundaryCondition (BoundaryPosition) const |
| Get boundary condition. | |
| void | setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0) |
| Set boundary conditions for both ends. | |
| virtual uint | locality () const |
| Get locality (number of points used for calculation) | |
Additional Inherited Members | |
Public Types inherited from QwtSpline | |
| enum | BoundaryType { ConditionalBoundaries , PeriodicPolygon , ClosedPolygon } |
| Boundary type specifying the spline at its endpoints. More... | |
| enum | BoundaryPosition { AtBeginning , AtEnd } |
| position of a boundary condition More... | |
| enum | BoundaryCondition { Clamped1 , Clamped2 , Clamped3 , LinearRunout } |
| Boundary condition. More... | |
Base class for spline interpolation.
Spline interpolation is the process of interpolating a set of points piecewise with polynomials. The initial set of points is preserved.
|
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 QwtSplineC1, QwtSplineC2, QwtSplineLocal, QwtSplinePleasing, and QwtSplineCubic.
|
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.
| [in] | points | Control nodes of the spline |
| [in] | distance | Distance between 2 points according to the parametrization |
| [in] | withNodes | When true, also add the control nodes (even if not being equidistant) |
Reimplemented in QwtSplineC1, and QwtSplineC2.
|
overridevirtual |
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.
| [in] | points | Control points |
Implements QwtSpline.
Reimplemented in QwtSplineC1, QwtSplineC2, QwtSplineCubic, QwtSplineLocal, and QwtSplinePleasing.
|
overridevirtual |
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 Bezier Curves" by Roger Willcocks ( http://www.rops.org )
| [in] | points | Control points |
| [in] | tolerance | Maximum for the accepted error of the approximation |
Reimplemented from QwtSpline.