-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sipify analysis interpolation (#4757)
- Loading branch information
Showing
35 changed files
with
1,249 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,97 @@ | ||
class Bezier3D : ParametricLine | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/interpolation/Bezier3D.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class Bezier3D: ParametricLine | ||
{ | ||
%Docstring | ||
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.* | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include <Bezier3D.h> | ||
#include "Bezier3D.h" | ||
%End | ||
protected: | ||
|
||
public: | ||
/** Default constructor*/ | ||
Bezier3D(); | ||
/** Constructor, par is a pointer to the parent, controlpoly a controlpolygon*/ | ||
Bezier3D( ParametricLine *par, QVector<QgsPoint*> *controlpoly ); | ||
/** Destructor*/ | ||
%Docstring | ||
Default constructor | ||
%End | ||
Bezier3D( ParametricLine *par, QVector<QgsPoint *> *controlpoly ); | ||
%Docstring | ||
Constructor, par is a pointer to the parent, controlpoly a controlpolygon | ||
%End | ||
|
||
virtual ~Bezier3D(); | ||
/** Do not use this method, since a Bezier curve does not consist of other curves*/ | ||
virtual void add( ParametricLine *pl ); | ||
/** Calculates the first derivative and assigns it to v*/ | ||
virtual void calcFirstDer( float t, Vector3D *v ); | ||
/** Calculates the second derivative and assigns it to v*/ | ||
virtual void calcSecDer( float t, Vector3D *v ); | ||
//virtual QgsPoint calcPoint(float t); | ||
/** Calculates the point on the curve and assigns it to p*/ | ||
virtual void calcPoint( float t, QgsPoint *p ); | ||
/** Changes the order of control points*/ | ||
virtual void add( ParametricLine *pl /Transfer/ ); | ||
%Docstring | ||
Do not use this method, since a Bezier curve does not consist of other curves | ||
%End | ||
virtual void calcFirstDer( float t, Vector3D *v /Out/ ); | ||
%Docstring | ||
Calculates the first derivative and assigns it to v | ||
%End | ||
virtual void calcSecDer( float t, Vector3D *v /Out/ ); | ||
%Docstring | ||
Calculates the second derivative and assigns it to v | ||
%End | ||
virtual void calcPoint( float t, QgsPoint *p /Out/ ); | ||
%Docstring | ||
Calculates the point on the curve and assigns it to p | ||
%End | ||
virtual void changeDirection(); | ||
//virtual void draw(QPainter *p); | ||
//virtual bool intersects(ParametricLine *pal); | ||
/** Do not use this method, since a Bezier curve does not consist of other curves*/ | ||
%Docstring | ||
Changes the order of control points | ||
%End | ||
virtual void remove( int i ); | ||
/** Returns a control point*/ | ||
%Docstring | ||
Do not use this method, since a Bezier curve does not consist of other curves | ||
%End | ||
virtual const QgsPoint *getControlPoint( int number ) const; | ||
/** Returns a pointer to the control polygon*/ | ||
virtual const QVector<QgsPoint*> *getControlPoly() const; | ||
/** Returns the degree of the curve*/ | ||
%Docstring | ||
Returns a control point | ||
:rtype: QgsPoint | ||
%End | ||
virtual const QVector<QgsPoint *> *getControlPoly() const; | ||
%Docstring | ||
Returns a pointer to the control polygon | ||
:rtype: list of QgsPoint | ||
%End | ||
virtual int getDegree() const; | ||
/** Returns the parent*/ | ||
%Docstring | ||
Returns the degree of the curve | ||
:rtype: int | ||
%End | ||
virtual ParametricLine *getParent() const; | ||
/** Sets the parent*/ | ||
%Docstring | ||
Returns the parent | ||
:rtype: ParametricLine | ||
%End | ||
virtual void setParent( ParametricLine *par ); | ||
/** Sets the control polygon*/ | ||
virtual void setControlPoly( QVector<QgsPoint*> *cp ); | ||
%Docstring | ||
Sets the parent | ||
%End | ||
virtual void setControlPoly( QVector<QgsPoint *> *cp ); | ||
%Docstring | ||
Sets the control polygon | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/interpolation/Bezier3D.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
61 changes: 51 additions & 10 deletions
61
python/analysis/interpolation/CloughTocherInterpolator.sip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,65 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/interpolation/CloughTocherInterpolator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class CloughTocherInterpolator : TriangleInterpolator | ||
{ | ||
%Docstring | ||
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.* | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include <CloughTocherInterpolator.h> | ||
#include "CloughTocherInterpolator.h" | ||
%End | ||
protected: | ||
/** Finds out, in which triangle the point with the coordinates x and y is*/ | ||
void init( double x, double y ); | ||
/** 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*/ | ||
%Docstring | ||
Finds out, in which triangle the point with the coordinates x and y is | ||
%End | ||
double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w ); | ||
%Docstring | ||
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 | ||
:rtype: float | ||
%End | ||
|
||
public: | ||
/** Standard constructor*/ | ||
CloughTocherInterpolator(); | ||
/** Constructor with a pointer to the triangulation as argument*/ | ||
%Docstring | ||
Standard constructor | ||
%End | ||
CloughTocherInterpolator( NormVecDecorator *tin ); | ||
/** Destructor*/ | ||
%Docstring | ||
Constructor with a pointer to the triangulation as argument | ||
%End | ||
virtual ~CloughTocherInterpolator(); | ||
/** Calculates the normal vector and assigns it to vec (not implemented at the moment)*/ | ||
virtual bool calcNormVec( double x, double y, Vector3D *result ); | ||
/** Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/ | ||
virtual bool calcPoint( double x, double y, QgsPoint *result ); | ||
virtual bool calcNormVec( double x, double y, Vector3D *result /Out/ ); | ||
%Docstring | ||
Calculates the normal vector and assigns it to vec (not implemented at the moment) | ||
:rtype: bool | ||
%End | ||
virtual bool calcPoint( double x, double y, QgsPoint *result /Out/ ); | ||
%Docstring | ||
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point | ||
:rtype: bool | ||
%End | ||
virtual void setTriangulation( NormVecDecorator *tin ); | ||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/analysis/interpolation/CloughTocherInterpolator.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.