QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
QwtSplineInterpolating类 参考abstract

Base class for spline interpolation 更多...

#include <qwt_spline.h>

类 QwtSplineInterpolating 继承关系图:
QwtSpline QwtSplineG1 QwtSplineC1 QwtSplinePleasing QwtSplineC2 QwtSplineLocal QwtSplineCubic

Public 成员函数

 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 成员函数 继承自 QwtSpline
 QwtSpline ()
 Constructor
 
virtual ~QwtSpline ()
 Destructor
 
void setParametrization (int type)
 Set parametrization by type
 
void setParametrization (QwtSplineParametrization *)
 Set parametrization object
 
const QwtSplineParametrizationparametrization () 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 interpolation

Spline interpolation is the process of interpolating a set of points piecewise with polynomials. The initial set of points is preserved.

成员函数说明

◆ bezierControlLines()

QVector< QLineF > QwtSplineInterpolating::bezierControlLines ( const QPolygonF &  points) const
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.

参数
pointsControl points
返回
Control points of the interpolating Bezier curves

QwtSplineC1, QwtSplineC2, QwtSplineLocal, QwtSplinePleasing , 以及 QwtSplineCubic 内被实现.

◆ equidistantPolygon()

QPolygonF QwtSplineInterpolating::equidistantPolygon ( const QPolygonF &  points,
double  distance,
bool  withNodes 
) const
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]pointsControl nodes of the spline
[in]distanceDistance between 2 points according to the parametrization
[in]withNodesWhen true, also add the control nodes (even if not being equidistant)
返回
Interpolating polygon
参见
bezierControlLines()

QwtSplineC1 , 以及 QwtSplineC2 重载.

◆ painterPath()

QPainterPath QwtSplineInterpolating::painterPath ( const QPolygonF &  points) const
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]pointsControl points
返回
Painter path that can be rendered by QPainter
注解
Derived spline classes might overload painterPath() to avoid the extra loops for converting results into a QPainterPath
参见
bezierControlLines()

实现了 QwtSpline.

QwtSplineC1, QwtSplineC2, QwtSplineCubic, QwtSplineLocal , 以及 QwtSplinePleasing 重载.

◆ polygon()

QPolygonF QwtSplineInterpolating::polygon ( const QPolygonF &  points,
double  tolerance 
) const
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]pointsControl points
[in]toleranceMaximum for the accepted error of the approximation
返回
Polygon approximating the interpolating polynomials
参见
bezierControlLines(), QwtSplineBezier::toPolygon()

重载 QwtSpline .


该类的文档由以下文件生成: