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

Base class for spline interpolations with C2 (second order parametric) continuity 更多...

#include <qwt_spline.h>

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

Public 类型

enum  BoundaryConditionC2 { CubicRunout = LinearRunout + 1 , NotAKnot }
 Boundary condition that requires C2 continuity 更多...
 
- 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 成员函数

 QwtSplineC2 ()
 Constructor
 
 ~QwtSplineC2 () override
 Destructor
 
virtual QPainterPath painterPath (const QPolygonF &) const override
 Interpolate a curve with Bezier curves
 
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< QwtSplinePolynomialpolynomials (const QPolygonF &) const override
 Calculate the interpolating polynomials for a non-parametric spline
 
virtual QVector< double > slopes (const QPolygonF &) const override
 Find the first derivative at the control points
 
virtual QVector< double > curvatures (const QPolygonF &) const =0
 Find the second derivative at the control points
 
- Public 成员函数 继承自 QwtSplineC1
 QwtSplineC1 ()
 Constructor
 
 ~QwtSplineC1 () override
 Destructor
 
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
 
virtual uint locality () const
 Get locality (number of points used for calculation)
 

详细描述

Base class for spline interpolations with C2 (second order parametric) continuity

All interpolations with C2 continuity are based on rules for finding the second 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.

参见
QwtSplineParametrization

成员枚举类型说明

◆ BoundaryConditionC2

Boundary condition that requires C2 continuity

参见
QwtSpline::boundaryCondition, QwtSpline::BoundaryCondition
枚举值
CubicRunout 

The second derivate at the endpoint is related to the second derivatives at the 2 neighbours: cv[0] := 2.0 * cv[1] - cv[2].

注解
boundaryValue() is ignored
NotAKnot 

The 3rd derivate at the endpoint matches the 3rd derivate at its neighbours.

Or in other words: the first/last curve segment extents the polynomial of its neighboured polynomial

注解
boundaryValue() is ignored

构造及析构函数说明

◆ QwtSplineC2()

QwtSplineC2::QwtSplineC2 ( )

Constructor

The default setting is a non-closing spline with no parametrization (QwtSplineParametrization::ParameterX).

参见
QwtSpline::setParametrization(), QwtSpline::setBoundaryType()

成员函数说明

◆ bezierControlLines()

QVector< QLineF > QwtSplineC2::bezierControlLines ( const QPolygonF &  points) const
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]pointsControl points
返回
Control points of the interpolating Bezier curves
注解
The implementation simply calls QwtSplineC1::bezierControlLines(), but is intended to be replaced by a more efficient implementation that builds the polynomials by the curvatures some day.

重载 QwtSplineC1 .

QwtSplineCubic 重载.

◆ curvatures()

QVector< double > QwtSplineC2::curvatures ( const QPolygonF &  points) const
pure virtual

Find the second derivative at the control points

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

QwtSplineCubic 内被实现.

◆ equidistantPolygon()

QPolygonF QwtSplineC2::equidistantPolygon ( const QPolygonF &  points,
double  distance,
bool  withNodes 
) const
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]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
参见
QwtSpline::equidistantPolygon()

重载 QwtSplineC1 .

◆ painterPath()

QPainterPath QwtSplineC2::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.

参数
[in]pointsControl points
返回
Painter path that can be rendered by QPainter
注解
The implementation simply calls QwtSplineC1::painterPath(), but is intended to be replaced by a one-pass calculation some day.

重载 QwtSplineC1 .

QwtSplineCubic 重载.

◆ polynomials()

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

Calculate the interpolating polynomials for a non-parametric spline

C2 spline interpolations are based on finding values for the second derivatives of f at the control points. The interpolating polynomials can be calculated from the second derivatives using QwtSplinePolynomial::fromCurvatures.

The default implementation is a two-pass calculation. In derived classes it might be overloaded by a one-pass implementation.

参数
[in]pointsControl points
返回
Interpolating polynomials
注解
The x coordinates need to be increasing or decreasing

重载 QwtSplineC1 .

QwtSplineCubic 重载.

◆ slopes()

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

Find the first derivative at the control points

An implementation calculating the second derivatives and then building the slopes in a second loop. QwtSplineCubic overloads it with a more performant implementation doing it in one loop.

参数
[in]pointsControl nodes of the spline
返回
Vector with the values of the first derivative at the control points
参见
curvatures()
注解
The x coordinates need to be increasing or decreasing

实现了 QwtSplineC1.

QwtSplineCubic 重载.


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