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

A spline with C1 continuity 更多...

#include <qwt_spline_local.h>

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

Public 类型

enum  Type { Cardinal , ParabolicBlending , Akima , PChip }
 Spline interpolation type 更多...
 
- 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 更多...
 

Public 成员函数

 QwtSplineLocal (Type type)
 Constructor with spline type
 
 ~QwtSplineLocal () override
 Destructor
 
Type type () const
 Get spline type
 
virtual uint locality () const override
 Get locality (number of points used for calculation)
 
virtual QPainterPath painterPath (const QPolygonF &) const override
 Get painter path from polygon
 
virtual QVector< QLineF > bezierControlLines (const QPolygonF &) const override
 Get Bezier control lines
 
virtual QVector< QwtSplinePolynomialpolynomials (const QPolygonF &) const override
 Get polynomials from polygon
 
virtual QVector< double > slopes (const QPolygonF &) const override
 Get slopes at control points
 
- Public 成员函数 继承自 QwtSplineC1
 QwtSplineC1 ()
 Constructor
 
 ~QwtSplineC1 () override
 Destructor
 
virtual QPolygonF equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const override
 Find an interpolated polygon with "equidistant" 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 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
 

详细描述

A spline with C1 continuity

QwtSplineLocal offers several standard algorithms for interpolating a curve with polynomials having C1 continuity at the control points. All algorithms are local in a sense, that changing one control point only few polynomials.

成员枚举类型说明

◆ Type

Spline interpolation type

All type of spline interpolations are lightweight algorithms calculating the slopes at a point by looking 1 or 2 points back and ahead.

枚举值
Cardinal 

A cardinal spline

The cardinal spline interpolation is a very cheap calculation with a locality of 1.

ParabolicBlending 

Parabolic blending is a cheap calculation with a locality of 1. Sometimes it is also called Cubic Bessel interpolation.

Akima 

The algorithm of H.Akima is a calculation with a locality of 2.

PChip 

Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) is an algorithm that is popular because of being offered by MATLAB.

It preserves the shape of the data and respects monotonicity. It has a locality of 1.

构造及析构函数说明

◆ QwtSplineLocal()

QwtSplineLocal::QwtSplineLocal ( Type  type)
explicit

Constructor with spline type

Constructor

参数
[in]typeSpline type, specifying the type of interpolation
参见
type()

成员函数说明

◆ bezierControlLines()

QVector< QLineF > QwtSplineLocal::bezierControlLines ( const QPolygonF &  points) const
overridevirtual

Get Bezier control lines

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 .

◆ locality()

uint QwtSplineLocal::locality ( ) const
overridevirtual

Get locality (number of points used for calculation)

Get the locality of the spline interpolation

The locality of an spline interpolation identifies how many adjacent polynomials are affected, when changing the position of one point.

The Cardinal, ParabolicBlending and PChip algorithms have a locality of 1, while the Akima interpolation has a locality of 2.

返回
1 or 2.

重载 QwtSpline .

◆ painterPath()

QPainterPath QwtSplineLocal::painterPath ( const QPolygonF &  points) const
overridevirtual

Get painter path from polygon

Interpolate a curve with Bezier curves

Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.

参数
pointsControl points
返回
Painter path, that can be rendered by QPainter

重载 QwtSplineC1 .

◆ polynomials()

QVector< QwtSplinePolynomial > QwtSplineLocal::polynomials ( const QPolygonF &  points) const
overridevirtual

Get polynomials from polygon

Calculate the interpolating polynomials for a non parametric spline

参数
pointsControl points
返回
Interpolating polynomials
注解
The x coordinates need to be increasing or decreasing
The implementation simply calls QwtSplineC1::polynomials(), but is intended to be replaced by a one pass calculation some day.

重载 QwtSplineC1 .

◆ slopes()

QVector< double > QwtSplineLocal::slopes ( const QPolygonF &  points) const
overridevirtual

Get slopes at control points

Find the first derivative at the control points

参数
pointsControl nodes of the spline
返回
Vector with the values of the 2nd derivate at the control points
注解
The x coordinates need to be increasing or decreasing

实现了 QwtSplineC1.

◆ type()

QwtSplineLocal::Type QwtSplineLocal::type ( ) const

Get spline type

返回
Spline type, specifying the type of interpolation

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