Public Member Functions
QwtSplineInterpolating Class Reference

Base class for a spline interpolation. More...

#include <qwt_spline.h>

Inheritance diagram for QwtSplineInterpolating:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual QVector< QLineF > bezierControlLines (const QPolygonF &points) const =0
 Interpolate a curve with Bezier curves.
virtual QPolygonF equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const
 Find an interpolated polygon with "equidistant" points.
virtual QPainterPath painterPath (const QPolygonF &) const
 Interpolate a curve with Bezier curves.
virtual QPolygonF polygon (const QPolygonF &, double tolerance) const
 Interpolate a curve by a polygon.
 QwtSplineInterpolating ()
 Constructor.
virtual ~QwtSplineInterpolating ()
 Destructor.

Detailed Description

Base class for a spline interpolation.

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

Definition at line 189 of file qwt_spline.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 709 of file qwt_spline.cpp.

Destructor.

Definition at line 714 of file qwt_spline.cpp.


Member Function Documentation

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.

Parameters:
pointsControl points
Returns:
Control points of the interpolating Bezier curves

Implemented in QwtSplineC2, QwtSplineC1, QwtSplineLocal, QwtSplineCubic, and QwtSplinePleasing.

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.

Parameters:
pointsControl nodes of the spline
distanceDistance between 2 points according to the parametrization
withNodesWhen true, also add the control nodes ( even if not being equidistant )
Returns:
Interpolating polygon
See also:
bezierControlLines()

Reimplemented in QwtSplineC2, and QwtSplineC1.

Definition at line 861 of file qwt_spline.cpp.

QPainterPath QwtSplineInterpolating::painterPath ( const QPolygonF &  points) const [virtual]

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.

Parameters:
pointsControl points
Returns:
Painter path, that can be rendered by QPainter
Note:
Derived spline classes might overload painterPath() to avoid the extra loops for converting results into a QPainterPath
See also:
bezierControlLines()

Implements QwtSpline.

Reimplemented in QwtSplineC2, QwtSplineC1, QwtSplineLocal, QwtSplineCubic, and QwtSplinePleasing.

Definition at line 746 of file qwt_spline.cpp.

QPolygonF QwtSplineInterpolating::polygon ( const QPolygonF &  points,
double  tolerance 
) const [virtual]

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 Bézier Curves" by Roger Willcocks ( http://www.rops.org )

Parameters:
pointsControl points
toleranceMaximum for the accepted error of the approximation
Returns:
polygon approximating the interpolating polynomials
See also:
bezierControlLines(), QwtSplineBezier::toPolygon()

Reimplemented from QwtSpline.

Definition at line 803 of file qwt_spline.cpp.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:06