Skip to content

Commit e40f92c

Browse files
authoredJun 22, 2017
sipify analysis interpolation (#4757)
1 parent 4659691 commit e40f92c

35 files changed

+1249
-388
lines changed
 
Lines changed: 82 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,97 @@
1-
class Bezier3D : ParametricLine
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/analysis/interpolation/Bezier3D.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
class Bezier3D: ParametricLine
213
{
14+
%Docstring
15+
Class Bezier3D represents a bezier curve, represented by control points. Parameter t is running from 0 to 1. The class is capable to calculate the curve point and the first two derivatives belonging to t.*
16+
%End
17+
318
%TypeHeaderCode
4-
#include <Bezier3D.h>
19+
#include "Bezier3D.h"
520
%End
21+
protected:
622

723
public:
8-
/** Default constructor*/
924
Bezier3D();
10-
/** Constructor, par is a pointer to the parent, controlpoly a controlpolygon*/
11-
Bezier3D( ParametricLine *par, QVector<QgsPoint*> *controlpoly );
12-
/** Destructor*/
25+
%Docstring
26+
Default constructor
27+
%End
28+
Bezier3D( ParametricLine *par, QVector<QgsPoint *> *controlpoly );
29+
%Docstring
30+
Constructor, par is a pointer to the parent, controlpoly a controlpolygon
31+
%End
32+
1333
virtual ~Bezier3D();
14-
/** Do not use this method, since a Bezier curve does not consist of other curves*/
15-
virtual void add( ParametricLine *pl );
16-
/** Calculates the first derivative and assigns it to v*/
17-
virtual void calcFirstDer( float t, Vector3D *v );
18-
/** Calculates the second derivative and assigns it to v*/
19-
virtual void calcSecDer( float t, Vector3D *v );
20-
//virtual QgsPoint calcPoint(float t);
21-
/** Calculates the point on the curve and assigns it to p*/
22-
virtual void calcPoint( float t, QgsPoint *p );
23-
/** Changes the order of control points*/
34+
virtual void add( ParametricLine *pl /Transfer/ );
35+
%Docstring
36+
Do not use this method, since a Bezier curve does not consist of other curves
37+
%End
38+
virtual void calcFirstDer( float t, Vector3D *v /Out/ );
39+
%Docstring
40+
Calculates the first derivative and assigns it to v
41+
%End
42+
virtual void calcSecDer( float t, Vector3D *v /Out/ );
43+
%Docstring
44+
Calculates the second derivative and assigns it to v
45+
%End
46+
virtual void calcPoint( float t, QgsPoint *p /Out/ );
47+
%Docstring
48+
Calculates the point on the curve and assigns it to p
49+
%End
2450
virtual void changeDirection();
25-
//virtual void draw(QPainter *p);
26-
//virtual bool intersects(ParametricLine *pal);
27-
/** Do not use this method, since a Bezier curve does not consist of other curves*/
51+
%Docstring
52+
Changes the order of control points
53+
%End
2854
virtual void remove( int i );
29-
/** Returns a control point*/
55+
%Docstring
56+
Do not use this method, since a Bezier curve does not consist of other curves
57+
%End
3058
virtual const QgsPoint *getControlPoint( int number ) const;
31-
/** Returns a pointer to the control polygon*/
32-
virtual const QVector<QgsPoint*> *getControlPoly() const;
33-
/** Returns the degree of the curve*/
59+
%Docstring
60+
Returns a control point
61+
:rtype: QgsPoint
62+
%End
63+
virtual const QVector<QgsPoint *> *getControlPoly() const;
64+
%Docstring
65+
Returns a pointer to the control polygon
66+
:rtype: list of QgsPoint
67+
%End
3468
virtual int getDegree() const;
35-
/** Returns the parent*/
69+
%Docstring
70+
Returns the degree of the curve
71+
:rtype: int
72+
%End
3673
virtual ParametricLine *getParent() const;
37-
/** Sets the parent*/
74+
%Docstring
75+
Returns the parent
76+
:rtype: ParametricLine
77+
%End
3878
virtual void setParent( ParametricLine *par );
39-
/** Sets the control polygon*/
40-
virtual void setControlPoly( QVector<QgsPoint*> *cp );
79+
%Docstring
80+
Sets the parent
81+
%End
82+
virtual void setControlPoly( QVector<QgsPoint *> *cp );
83+
%Docstring
84+
Sets the control polygon
85+
%End
4186

4287
};
88+
89+
90+
91+
/************************************************************************
92+
* This file has been generated automatically from *
93+
* *
94+
* src/analysis/interpolation/Bezier3D.h *
95+
* *
96+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
97+
************************************************************************/
Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,65 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/analysis/interpolation/CloughTocherInterpolator.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
113
class CloughTocherInterpolator : TriangleInterpolator
214
{
15+
%Docstring
16+
This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation. The derivatives orthogonal to the boundary curves are interpolated linearly along a triangle edge.*
17+
%End
18+
319
%TypeHeaderCode
4-
#include <CloughTocherInterpolator.h>
20+
#include "CloughTocherInterpolator.h"
521
%End
622
protected:
7-
/** Finds out, in which triangle the point with the coordinates x and y is*/
823
void init( double x, double y );
9-
/** Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point*/
24+
%Docstring
25+
Finds out, in which triangle the point with the coordinates x and y is
26+
%End
1027
double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
28+
%Docstring
29+
Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point
30+
:rtype: float
31+
%End
1132

1233
public:
13-
/** Standard constructor*/
1434
CloughTocherInterpolator();
15-
/** Constructor with a pointer to the triangulation as argument*/
35+
%Docstring
36+
Standard constructor
37+
%End
1638
CloughTocherInterpolator( NormVecDecorator *tin );
17-
/** Destructor*/
39+
%Docstring
40+
Constructor with a pointer to the triangulation as argument
41+
%End
1842
virtual ~CloughTocherInterpolator();
19-
/** Calculates the normal vector and assigns it to vec (not implemented at the moment)*/
20-
virtual bool calcNormVec( double x, double y, Vector3D *result );
21-
/** Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
22-
virtual bool calcPoint( double x, double y, QgsPoint *result );
43+
virtual bool calcNormVec( double x, double y, Vector3D *result /Out/ );
44+
%Docstring
45+
Calculates the normal vector and assigns it to vec (not implemented at the moment)
46+
:rtype: bool
47+
%End
48+
virtual bool calcPoint( double x, double y, QgsPoint *result /Out/ );
49+
%Docstring
50+
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point
51+
:rtype: bool
52+
%End
2353
virtual void setTriangulation( NormVecDecorator *tin );
2454
};
55+
56+
57+
58+
59+
/************************************************************************
60+
* This file has been generated automatically from *
61+
* *
62+
* src/analysis/interpolation/CloughTocherInterpolator.h *
63+
* *
64+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
65+
************************************************************************/

0 commit comments

Comments
 (0)
Please sign in to comment.