Qwt User's Guide: QwtSplinePleasing Class Reference

Qwt User's Guide 6.3.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
QwtSplinePleasing Class Reference

A spline with G1 continuity. More...

`#include <qwt_spline_pleasing.h>`

Inheritance diagram for QwtSplinePleasing:

## Public Member Functions
| QwtSplinePleasing ()
| Constructor.
virtual | ~QwtSplinePleasing ()
| Destructor.
virtual uint | locality () const override
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.
Public Member Functions inherited from QwtSplineG1
| QwtSplineG1 ()
| Constructor.
virtual | ~QwtSplineG1 ()
| Destructor.
Public Member Functions inherited from QwtSplineInterpolating
| QwtSplineInterpolating ()
| Constructor.
virtual | ~QwtSplineInterpolating ()
| 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.
Public Member Functions inherited from QwtSpline
| QwtSpline ()
| Constructor.
virtual | ~QwtSpline ()
| Destructor.
void | setParametrization (int type)
void | setParametrization (QwtSplineParametrization *)
const QwtSplineParametrization * | parametrization () const
void | setBoundaryType (BoundaryType)
BoundaryType | boundaryType () const
void | setBoundaryValue (BoundaryPosition, double value)
| Define the boundary value.
double | boundaryValue (BoundaryPosition) const
void | setBoundaryCondition (BoundaryPosition, int condition)
| Define the condition for an endpoint of the spline.
int | boundaryCondition (BoundaryPosition) const
void | setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0)
| Define the condition at the endpoints of a spline.

## Additional Inherited Members
Public Types inherited from QwtSpline
enum | BoundaryType { ConditionalBoundaries , PeriodicPolygon , ClosedPolygon }
enum | BoundaryPosition { AtBeginning , AtEnd }
enum | BoundaryCondition { Clamped1 , Clamped2 , Clamped3 , LinearRunout }
| Boundary condition. More...

## Detailed Description

A spline with G1 continuity.

QwtSplinePleasing is some sort of cardinal spline, with non C1 continuous extra rules for narrow angles. It has a locality of 2.

Note
  The algorithm is the one offered by a popular office package.

Definition at line 23 of file qwt_spline_pleasing.h.

## Constructor & Destructor Documentation

## ◆ QwtSplinePleasing()

QwtSplinePleasing::QwtSplinePleasing | ( |  | ) |

Constructor.

The default setting is a non closing spline with uniform parametrization. ( QwtSplineParametrization::ParameterUniform ).

See also
  QwtSpline::setParametrization(), QwtSpline::setBoundaryType()

Definition at line 265 of file qwt_spline_pleasing.cpp.

## ◆ ~QwtSplinePleasing()

QwtSplinePleasing::~QwtSplinePleasing | ( |  | ) |
| virtual

Destructor.

Definition at line 271 of file qwt_spline_pleasing.cpp.

## Member Function Documentation

## ◆ bezierControlLines()

QVector< QLineF > QwtSplinePleasing::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.

Parameters

  points | Control points

Returns
  Control points of the interpolating Bezier curves

Implements QwtSplineInterpolating.

Definition at line 327 of file qwt_spline_pleasing.cpp.

## ◆ locality()

uint QwtSplinePleasing::locality | ( |  | ) | const
| overridevirtual

Returns
  2

Reimplemented from QwtSpline.

Definition at line 276 of file qwt_spline_pleasing.cpp.

## ◆ painterPath()

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

Parameters

  points | Control points

Returns
  QPainterPath Painter path, that can be rendered by QPainter

Reimplemented from QwtSplineInterpolating.

Definition at line 290 of file qwt_spline_pleasing.cpp.