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

Curve parametrization used for a spline interpolation 更多...

#include <qwt_spline_parametrization.h>

Public 类型

enum  Type {
  ParameterX , ParameterY , ParameterUniform , ParameterChordal ,
  ParameterCentripetal , ParameterManhattan
}
 Parametrization type 更多...
 

Public 成员函数

 QwtSplineParametrization (int type)
 Constructor
 
virtual ~QwtSplineParametrization ()
 Destructor
 
int type () const
 Get the parametrization type
 
virtual double valueIncrement (const QPointF &, const QPointF &) const
 Calculate the parameter value increment for 2 points
 

静态 Public 成员函数

static double valueIncrementX (const QPointF &, const QPointF &)
 Calculate the ParameterX value increment for 2 points
 
static double valueIncrementY (const QPointF &, const QPointF &)
 Calculate the ParameterY value increment for 2 points
 
static double valueIncrementUniform (const QPointF &, const QPointF &)
 Calculate the ParameterUniform value increment
 
static double valueIncrementChordal (const QPointF &, const QPointF &)
 Calculate the ParameterChordal value increment for 2 points
 
static double valueIncrementCentripetal (const QPointF &, const QPointF &)
 Calculate the ParameterCentripetal value increment for 2 points
 
static double valueIncrementManhattan (const QPointF &, const QPointF &)
 Calculate the ParameterManhattan value increment for 2 points
 

详细描述

Curve parametrization used for a spline interpolation

Parametrization is the process of finding a parameter value for each curve point - usually related to some physical quantity ( distance, time ... ).

Often accumulating the curve length is the intended way of parametrization, but as the interpolated curve is not known in advance an approximation needs to be used.

The values are calculated by cumulating increments, that are provided by QwtSplineParametrization. As the curve parameters need to be montonically increasing, each increment need to be positive.

QwtSplineParametrization provides the most common used type of parametrizations and offers an interface to inject custom implementations.

注解
The most relevant types of parametrization are trying to provide an approximation of the curve length.
参见
QwtSpline::setParametrization()

成员枚举类型说明

◆ Type

Parametrization type

枚举值
ParameterX 

No parametrization: t[i] = x[i]

参见
valueIncrementX()
ParameterY 

No parametrization: t[i] = y[i]

参见
valueIncrementY()
ParameterUniform 

Uniform parametrization: t[i] = i;

A very fast parametrization, with good results, when the geometry of the control points is somehow "equidistant". F.e. when recording the position of a body, that is moving with constant speed every n seconds.

参见
valueIncrementUniform()
ParameterChordal 

Parametrization using the chordal length between two control points

The chordal length is the most commonly used approximation for the curve length.

参见
valueIncrementChordal()
ParameterCentripetal 

Centripetal parametrization

Based on the square root of the chordal length.

Its name stems from the physical observations regarding the centripetal force, of a body moving along the curve.

参见
valueIncrementCentripetal()
ParameterManhattan 

Parametrization using the manhattan length between two control points

Approximating the curve length by the manhattan length is faster than the chordal length, but usually gives worse results.

参见
valueIncrementManhattan()

构造及析构函数说明

◆ QwtSplineParametrization()

QwtSplineParametrization::QwtSplineParametrization ( int  type)
explicit

Constructor

Creates a spline parametrization with the specified type.

参数
[in]typeParametrization type
参见
type()

成员函数说明

◆ type()

int QwtSplineParametrization::type ( ) const

Get the parametrization type

返回
Parametrization type

◆ valueIncrement()

double QwtSplineParametrization::valueIncrement ( const QPointF &  point1,
const QPointF &  point2 
) const
virtual

Calculate the parameter value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
Value increment

◆ valueIncrementCentripetal()

double QwtSplineParametrization::valueIncrementCentripetal ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterCentripetal value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
The square root of a chordal increment

◆ valueIncrementChordal()

double QwtSplineParametrization::valueIncrementChordal ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterChordal value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
qSqrt( dx * dx + dy * dy )

◆ valueIncrementManhattan()

double QwtSplineParametrization::valueIncrementManhattan ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterManhattan value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
| point2.x() - point1.x() | + | point2.y() - point1.y() |

◆ valueIncrementUniform()

double QwtSplineParametrization::valueIncrementUniform ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterUniform value increment

参数
[in]point1First point
[in]point2Second point
返回
1.0

◆ valueIncrementX()

double QwtSplineParametrization::valueIncrementX ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterX value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
point2.x() - point1.x()

◆ valueIncrementY()

double QwtSplineParametrization::valueIncrementY ( const QPointF &  point1,
const QPointF &  point2 
)
inlinestatic

Calculate the ParameterY value increment for 2 points

参数
[in]point1First point
[in]point2Second point
返回
point2.y() - point1.y()

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