|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Base class for spline interpolations with C1 (first order parametric) continuity 更多...
#include <qwt_spline.h>
Public 成员函数 | |
| QwtSplineC1 () | |
| Constructor | |
| ~QwtSplineC1 () override | |
| Destructor | |
| virtual QPainterPath | painterPath (const QPolygonF &) const override |
| Calculate an interpolated painter path | |
| virtual QVector< QLineF > | bezierControlLines (const QPolygonF &) const override |
| Interpolate a curve with Bezier curves | |
| virtual QPolygonF | equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const 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 |
| Calculate the slope at the beginning of the spline | |
| virtual double | slopeAtEnd (const QPolygonF &, double slopeBefore) const |
| Calculate the slope at the end of the spline | |
Public 成员函数 继承自 QwtSplineG1 | |
| QwtSplineG1 () | |
| Constructor | |
| ~QwtSplineG1 () override | |
| Destructor | |
Public 成员函数 继承自 QwtSplineInterpolating | |
| QwtSplineInterpolating () | |
| Constructor | |
| ~QwtSplineInterpolating () override | |
| Destructor | |
| virtual QPolygonF | polygon (const QPolygonF &, double tolerance) const override |
| Interpolate a curve by a polygon | |
Public 成员函数 继承自 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) | |
额外继承的成员函数 | |
Public 类型 继承自 QwtSpline | |
| enum | BoundaryType { ConditionalBoundaries , PeriodicPolygon , ClosedPolygon } |
| Boundary type specifying the spline at its endpoints 更多... | |
| enum | BoundaryPosition { AtBeginning , AtEnd } |
| position of a boundary condition 更多... | |
| enum | BoundaryCondition { Clamped1 , Clamped2 , Clamped3 , LinearRunout } |
| Boundary condition 更多... | |
Base class for spline interpolations with C1 (first order parametric) continuity
All interpolations with C1 continuity are based on rules for finding the first derivative at some control points.
For 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).
|
overridevirtual |
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.
| [in] | points | Control points |
被 QwtSplineC2, QwtSplineLocal , 以及 QwtSplineCubic 重载.
|
overridevirtual |
Find an interpolated polygon with "equidistant" points
The implementation is optimized for non-parametric curves (QwtSplineParametrization::ParameterX) and falls back to QwtSpline::equidistantPolygon() otherwise.
| [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) |
被 QwtSplineC2 重载.
|
overridevirtual |
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.
| [in] | points | Control points |
被 QwtSplineC2, QwtSplineCubic , 以及 QwtSplineLocal 重载.
|
virtual |
Calculate the interpolating polynomials for a non-parametric spline
C1 spline interpolations are based on finding values for the first derivatives at the control points. The interpolating polynomials can be calculated from the first derivatives using QwtSplinePolynomial::fromSlopes().
The default implementation is a two-pass calculation. In derived classes it might be overloaded by a one-pass implementation.
| [in] | points | Control points |
被 QwtSplineC2, QwtSplineCubic , 以及 QwtSplineLocal 重载.
|
virtual |
Calculate the slope at the beginning of the spline
| [in] | points | Control points |
| [in] | slopeNext | Value of the first derivative at the second point |
|
virtual |
Calculate the slope at the end of the spline
| [in] | points | Control points |
| [in] | 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 |
在 QwtSplineC2, QwtSplineCubic , 以及 QwtSplineLocal 内被实现.