|
QWT 7.0.1
|
Base class for spline interpolations providing a first order parametric continuity ( C1 ) between adjoining curves. More...
#include <qwt_spline.h>
Public Member Functions | |
| QwtSplineC1 () | |
| Constructor. | |
| virtual | ~QwtSplineC1 () |
| Destructor. | |
| virtual QPainterPath | painterPath (const QPolygonF &) const QWT_OVERRIDE |
| Calculate an interpolated painter path. | |
| virtual QVector< QLineF > | bezierControlLines (const QPolygonF &) const QWT_OVERRIDE |
| Interpolate a curve with Bezier curves. | |
| virtual QPolygonF | equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const QWT_OVERRIDE |
| Find an interpolated polygon with "equidistant" points. | |
| virtual QVector< QwtSplinePolynomial > | polynomials (const QPolygonF &) const |
| Calculate the interpolating polynomials for a non parametric spline. | |
| virtual QVector< double > | slopes (const QPolygonF &) const =0 |
| Find the first derivative at the control points. | |
| virtual double | slopeAtBeginning (const QPolygonF &, double slopeNext) const |
| virtual double | slopeAtEnd (const QPolygonF &, double slopeBefore) const |
Public Member Functions inherited from QwtSplineG1 | |
| QwtSplineG1 () | |
| Constructor. | |
| virtual | ~QwtSplineG1 () |
| Destructor. | |
Public Member Functions inherited from QwtSplineInterpolating | |
| QwtSplineInterpolating () | |
| Constructor. | |
| virtual | ~QwtSplineInterpolating () |
| Destructor. | |
| virtual QPolygonF | polygon (const QPolygonF &, double tolerance) const QWT_OVERRIDE |
| Interpolate a curve by a polygon. | |
Public Member Functions inherited from QwtSpline | |
| QwtSpline () | |
| Constructor. | |
| virtual | ~QwtSpline () |
| Destructor. | |
| void | setParametrization (int type) |
| Define the parametrization for a parametric spline approximation The default setting is a chordal parametrization. | |
| void | setParametrization (QwtSplineParametrization *) |
| Define the parametrization for a parametric spline approximation The default setting is a chordal parametrization. | |
| const QwtSplineParametrization * | parametrization () const |
| void | setBoundaryType (BoundaryType) |
| Define the boundary type for the endpoints of the approximating spline. | |
| BoundaryType | boundaryType () const |
| void | setBoundaryValue (BoundaryPosition, double value) |
| Define the boundary value. | |
| double | boundaryValue (BoundaryPosition) const |
| void | setBoundaryCondition (BoundaryPosition, int condition) |
| Define the condition for an endpoint of the spline. | |
| int | boundaryCondition (BoundaryPosition) const |
| void | setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0) |
| Define the condition at the endpoints of a spline. | |
| virtual uint | locality () const |
| The locality of an spline interpolation identifies how many adjacent polynomials are affected, when changing the position of one point. | |
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 interpolations providing a first order parametric continuity ( C1 ) between adjoining curves.
All interpolations with C1 continuity are based on rules for finding the 1. derivate at some control points.
In case of non parametric splines those points are the curve points, while for parametric splines the calculation is done twice using a parameter value t.
| QwtSplineC1::QwtSplineC1 | ( | ) |
Constructor.
The default setting is a non closing spline with no parametrization ( QwtSplineParametrization::ParameterX ).
|
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 |
Implements QwtSplineInterpolating.
Reimplemented in QwtSplineC2, QwtSplineLocal, and QwtSplineCubic.
|
virtual |
Find an interpolated polygon with "equidistant" points.
The implementation is optimzed for non parametric curves ( QwtSplineParametrization::ParameterX ) and falls back to QwtSpline::equidistantPolygon() otherwise.
| 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 from QwtSplineInterpolating.
Reimplemented in QwtSplineC2.
|
virtual |
Calculate an interpolated painter path.
Interpolates a polygon piecewise into cubic Bezier curves and returns them as QPainterPath.
The implementation calculates the slopes at the control points and converts them into painter path elements in an additional loop.
| points | Control points |
Reimplemented from QwtSplineInterpolating.
Reimplemented in QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
|
virtual |
Calculate the interpolating polynomials for a non parametric spline.
C1 spline interpolations are based on finding values for the first derivates at the control points. The interpolating polynomials can be calculated from the the first derivates using QwtSplinePolynomial::fromSlopes().
The default implementation is a two pass calculation. In derived classes it might be overloaded by a one pass implementation.
| points | Control points |
Reimplemented in QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
|
virtual |
| points | Control points |
| slopeNext | Value of the first derivative at the second point |
|
virtual |
| points | Control points |
| slopeBefore | Value of the first derivative at the point before the last one |
|
pure virtual |
Find the first derivative at the control points.
| points | Control nodes of the spline |
Implemented in QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.