qwt_spline.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_SPLINE_H
11 #define QWT_SPLINE_H
12 
13 #include "qwt_global.h"
14 #include "qwt_spline.h"
15 
18 class QPainterPath;
19 class QLineF;
20 class QPolygonF;
21 
22 #if QT_VERSION < 0x060000
23 template< typename T > class QVector;
24 #endif
25 
58 {
59  public:
66  {
73 
80 
92  ClosedPolygon
93  };
94 
100  {
103 
105  AtEnd
106  };
107 
120  {
126 
135 
144 
153  LinearRunout
154  };
155 
156  QwtSpline();
157  virtual ~QwtSpline();
158 
159  void setParametrization( int type );
160  void setParametrization( QwtSplineParametrization* );
161  const QwtSplineParametrization* parametrization() const;
162 
163  void setBoundaryType( BoundaryType );
164  BoundaryType boundaryType() const;
165 
166  void setBoundaryValue( BoundaryPosition, double value );
167  double boundaryValue( BoundaryPosition ) const;
168 
169  void setBoundaryCondition( BoundaryPosition, int condition );
170  int boundaryCondition( BoundaryPosition ) const;
171 
172  void setBoundaryConditions( int condition,
173  double valueBegin = 0.0, double valueEnd = 0.0 );
174 
175  virtual QPolygonF polygon( const QPolygonF&, double tolerance ) const;
176  virtual QPainterPath painterPath( const QPolygonF& ) const = 0;
177 
178  virtual uint locality() const;
179 
180  private:
181  Q_DISABLE_COPY(QwtSpline)
182 
183  class PrivateData;
184  PrivateData* m_data;
185 };
186 
194 {
195  public:
197  virtual ~QwtSplineInterpolating();
198 
199  virtual QPolygonF equidistantPolygon( const QPolygonF&,
200  double distance, bool withNodes ) const;
201 
202  virtual QPolygonF polygon(
203  const QPolygonF&, double tolerance ) const QWT_OVERRIDE;
204 
205  virtual QPainterPath painterPath( const QPolygonF& ) const QWT_OVERRIDE;
206  virtual QVector< QLineF > bezierControlLines( const QPolygonF& ) const = 0;
207 
208  private:
209  Q_DISABLE_COPY(QwtSplineInterpolating)
210 };
211 
217 {
218  public:
219  QwtSplineG1();
220  virtual ~QwtSplineG1();
221 };
222 
236 {
237  public:
238  QwtSplineC1();
239  virtual ~QwtSplineC1();
240 
241  virtual QPainterPath painterPath( const QPolygonF& ) const QWT_OVERRIDE;
242  virtual QVector< QLineF > bezierControlLines( const QPolygonF& ) const QWT_OVERRIDE;
243 
244  virtual QPolygonF equidistantPolygon( const QPolygonF&,
245  double distance, bool withNodes ) const QWT_OVERRIDE;
246 
247  // these methods are the non parametric part
248  virtual QVector< QwtSplinePolynomial > polynomials( const QPolygonF& ) const;
249  virtual QVector< double > slopes( const QPolygonF& ) const = 0;
250 
251  virtual double slopeAtBeginning( const QPolygonF&, double slopeNext ) const;
252  virtual double slopeAtEnd( const QPolygonF&, double slopeBefore ) const;
253 };
254 
268 {
269  public:
276  {
283  CubicRunout = LinearRunout + 1,
284 
292  NotAKnot
293  };
294 
295  QwtSplineC2();
296  virtual ~QwtSplineC2();
297 
298  virtual QPainterPath painterPath( const QPolygonF& ) const QWT_OVERRIDE;
299  virtual QVector< QLineF > bezierControlLines( const QPolygonF& ) const QWT_OVERRIDE;
300 
301  virtual QPolygonF equidistantPolygon( const QPolygonF&,
302  double distance, bool withNodes ) const QWT_OVERRIDE;
303 
304  // calculating the parametric equations
305  virtual QVector< QwtSplinePolynomial > polynomials( const QPolygonF& ) const QWT_OVERRIDE;
306  virtual QVector< double > slopes( const QPolygonF& ) const QWT_OVERRIDE;
307  virtual QVector< double > curvatures( const QPolygonF& ) const = 0;
308 };
309 
310 #endif
QwtSpline::BoundaryCondition
BoundaryCondition
Boundary condition.
Definition: qwt_spline.h:119
QwtSplineC1::slopes
virtual QVector< double > slopes(const QPolygonF &) const =0
Find the first derivative at the control points.
backward::ColorMode::type
type
Definition: backward.hpp:3600
QwtSplinePolynomial
A cubic polynomial without constant term.
Definition: qwt_spline_polynomial.h:30
QwtSplineParametrization
Curve parametrization used for a spline interpolation.
Definition: qwt_spline_parametrization.h:44
QwtSplineC1::polynomials
virtual QVector< QwtSplinePolynomial > polynomials(const QPolygonF &) const
Calculate the interpolating polynomials for a non parametric spline.
Definition: qwt_spline.cpp:1201
QwtSplineC1::bezierControlLines
virtual QVector< QLineF > bezierControlLines(const QPolygonF &) const QWT_OVERRIDE
Interpolate a curve with Bezier curves.
Definition: qwt_spline.cpp:1101
QVector
Definition: qwt_clipper.h:23
qwt_global.h
QwtSplineC2::BoundaryConditionC2
BoundaryConditionC2
Definition: qwt_spline.h:275
QwtSplineInterpolating
Base class for a spline interpolation.
Definition: qwt_spline.h:193
QwtSplineC1::painterPath
virtual QPainterPath painterPath(const QPolygonF &) const QWT_OVERRIDE
Calculate an interpolated painter path.
Definition: qwt_spline.cpp:1043
QwtSpline::Clamped3
@ Clamped3
Definition: qwt_spline.h:143
QwtSpline::PrivateData
Definition: qwt_spline.cpp:434
QwtSpline
Base class for all splines.
Definition: qwt_spline.h:57
QwtSpline::Clamped1
@ Clamped1
Definition: qwt_spline.h:125
QwtSplineInterpolating::painterPath
virtual QPainterPath painterPath(const QPolygonF &) const QWT_OVERRIDE
Interpolate a curve with Bezier curves.
Definition: qwt_spline.cpp:748
qwt_spline.h
QwtSplineC1
Base class for spline interpolations providing a first order parametric continuity ( C1 ) between adj...
Definition: qwt_spline.h:235
QwtSpline::BoundaryType
BoundaryType
Definition: qwt_spline.h:65
QwtSpline::PeriodicPolygon
@ PeriodicPolygon
Definition: qwt_spline.h:79
QwtSplineG1
Base class for spline interpolations providing a first order geometric continuity ( G1 ) between adjo...
Definition: qwt_spline.h:216
QwtSplineInterpolating::bezierControlLines
virtual QVector< QLineF > bezierControlLines(const QPolygonF &) const =0
Interpolate a curve with Bezier curves.
QwtSplineC2
Base class for spline interpolations providing a second order parametric continuity ( C2 ) between ad...
Definition: qwt_spline.h:267
QwtSpline::ConditionalBoundaries
@ ConditionalBoundaries
Definition: qwt_spline.h:72
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtSplineC1::equidistantPolygon
virtual QPolygonF equidistantPolygon(const QPolygonF &, double distance, bool withNodes) const QWT_OVERRIDE
Find an interpolated polygon with "equidistant" points.
Definition: qwt_spline.cpp:1167
QwtSpline::BoundaryPosition
BoundaryPosition
Definition: qwt_spline.h:99
QwtSpline::Clamped2
@ Clamped2
Definition: qwt_spline.h:134
QwtSpline::AtBeginning
@ AtBeginning
the condition is at the beginning of the polynomial
Definition: qwt_spline.h:102
QwtSplineInterpolating::equidistantPolygon
virtual QPolygonF equidistantPolygon(const QPolygonF &, double distance, bool withNodes) const
Find an interpolated polygon with "equidistant" points.
Definition: qwt_spline.cpp:863


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46