Skip to content

Commit e269d0c

Browse files
authored
Merge pull request #24 from Danaozhong/task/add-libs-for-qgis_3_40_3_windows
Add Libraries for QGIS 3.40.3 (Windows)
2 parents 27c85aa + 5a60ea3 commit e269d0c

File tree

2,496 files changed

+552252
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,496 files changed

+552252
-1
lines changed

.github/workflows/build-windows.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
qgis_version: [3_20_0, 3_28_3, 3_34_0, 3_34_1, 3_36_2, 3_36_3, 3_38_0, 3_38_3, 3_40_0, 3_40_2]
15+
qgis_version: [3_20_0, 3_28_3, 3_34_0, 3_34_1, 3_36_2, 3_36_3, 3_38_0, 3_38_3, 3_40_0, 3_40_2, 3_40_3]
1616
env:
1717
EXT_OSGEO4W_ROOT: "C:/OSGeo4W"
1818
Qt5_DIR: "C:/OSGeo4W/apps/Qt5"
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/***************************************************************************
2+
Bezier3D.h - description
3+
-------------------
4+
copyright : (C) 2004 by Marco Hugentobler
5+
6+
***************************************************************************/
7+
8+
/***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef BEZIER3D_H
18+
#define BEZIER3D_H
19+
20+
#include "ParametricLine.h"
21+
#include "qgslogger.h"
22+
#include "qgis_analysis.h"
23+
24+
#define SIP_NO_FILE
25+
26+
/**
27+
* \ingroup analysis
28+
* \brief Class Bezier3D represents a bezier curve, represented by control points.
29+
*
30+
* Parameter t is running from 0 to 1. The class is capable to calculate the curve point and the first two derivatives belonging to it.
31+
* \note Not available in Python bindings
32+
*/
33+
class ANALYSIS_EXPORT Bezier3D : public ParametricLine
34+
{
35+
protected:
36+
public:
37+
Bezier3D() = default;
38+
//! Constructor, par is a pointer to the parent, controlpoly a controlpolygon
39+
Bezier3D( ParametricLine *par, QVector<QgsPoint *> *controlpoly );
40+
41+
//! Do not use this method, since a Bezier curve does not consist of other curves
42+
void add( ParametricLine *pl SIP_TRANSFER ) override;
43+
//! Calculates the first derivative and assigns it to v
44+
void calcFirstDer( float t, Vector3D *v SIP_OUT ) override;
45+
//! Calculates the second derivative and assigns it to v
46+
void calcSecDer( float t, Vector3D *v SIP_OUT ) override;
47+
//virtual QgsPoint calcPoint(float t);
48+
//! Calculates the point on the curve and assigns it to p
49+
void calcPoint( float t, QgsPoint *p SIP_OUT ) override;
50+
//! Changes the order of control points
51+
void changeDirection() override;
52+
//virtual void draw(QPainter* p);
53+
//virtual bool intersects(ParametricLine* pal);
54+
//! Do not use this method, since a Bezier curve does not consist of other curves
55+
void remove( int i ) override;
56+
//! Returns a control point
57+
const QgsPoint *getControlPoint( int number ) const override;
58+
//! Returns a pointer to the control polygon
59+
const QVector<QgsPoint *> *getControlPoly() const override;
60+
//! Returns the degree of the curve
61+
int getDegree() const override;
62+
//! Returns the parent
63+
ParametricLine *getParent() const override;
64+
//! Sets the parent
65+
void setParent( ParametricLine *par ) override;
66+
//! Sets the control polygon
67+
void setControlPoly( QVector<QgsPoint *> *cp ) override;
68+
};
69+
70+
#ifndef SIP_RUN
71+
72+
//-----------------------------------------------constructors, destructor and assignment operator------------------------------
73+
74+
inline Bezier3D::Bezier3D( ParametricLine *parent, QVector<QgsPoint *> *controlpoly )
75+
: ParametricLine( parent, controlpoly )
76+
{
77+
mDegree = mControlPoly->count() - 1;
78+
}
79+
80+
//----------------------------------------------invalid methods add and remove (because of inheritance from ParametricLine)
81+
82+
inline void Bezier3D::add( ParametricLine *pl )
83+
{
84+
Q_UNUSED( pl )
85+
QgsDebugError( QStringLiteral( "Error!!!!! A Bezier-curve can not be parent of a ParametricLine." ) );
86+
}
87+
88+
inline void Bezier3D::remove( int i )
89+
{
90+
Q_UNUSED( i )
91+
QgsDebugError( QStringLiteral( "Error!!!!! A Bezier-curve has no children to remove." ) );
92+
}
93+
94+
//-----------------------------------------------setters and getters---------------------------------------------------------------
95+
96+
inline const QgsPoint *Bezier3D::getControlPoint( int number ) const
97+
{
98+
return ( *mControlPoly )[number - 1];
99+
}
100+
101+
inline const QVector<QgsPoint *> *Bezier3D::getControlPoly() const
102+
{
103+
return mControlPoly;
104+
}
105+
106+
inline int Bezier3D::getDegree() const
107+
{
108+
return mDegree;
109+
}
110+
111+
inline ParametricLine *Bezier3D::getParent() const
112+
{
113+
return mParent;
114+
}
115+
116+
inline void Bezier3D::setParent( ParametricLine *par )
117+
{
118+
mParent = par;
119+
}
120+
121+
inline void Bezier3D::setControlPoly( QVector<QgsPoint *> *cp )
122+
{
123+
mControlPoly = cp;
124+
mDegree = mControlPoly->count() - 1;
125+
}
126+
127+
#endif
128+
129+
#endif
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/***************************************************************************
2+
CloughTocherInterpolator.h - description
3+
-------------------
4+
copyright : (C) 2004 by Marco Hugentobler
5+
6+
***************************************************************************/
7+
8+
/***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef CLOUGHTOCHERINTERPOLATOR_H
18+
#define CLOUGHTOCHERINTERPOLATOR_H
19+
20+
#include "TriangleInterpolator.h"
21+
#include "qgspoint.h"
22+
#include "qgis_analysis.h"
23+
24+
class NormVecDecorator;
25+
26+
#define SIP_NO_FILE
27+
28+
/**
29+
* \ingroup analysis
30+
* \brief This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation.
31+
*
32+
* The derivatives orthogonal to the boundary curves are interpolated linearly along a triangle edge.
33+
* \note Not available in Python bindings
34+
*/
35+
class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
36+
{
37+
protected:
38+
//! Association with a triangulation object
39+
NormVecDecorator *mTIN = nullptr;
40+
//! Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negative baricentric coordinates)
41+
double mEdgeTolerance = 0.00001;
42+
//! First point of the triangle in x-,y-,z-coordinates
43+
QgsPoint point1 = QgsPoint( 0, 0, 0 );
44+
//! Second point of the triangle in x-,y-,z-coordinates
45+
QgsPoint point2 = QgsPoint( 0, 0, 0 );
46+
//! Third point of the triangle in x-,y-,z-coordinates
47+
QgsPoint point3 = QgsPoint( 0, 0, 0 );
48+
//! Control point 1
49+
QgsPoint cp1 = QgsPoint( 0, 0, 0 );
50+
//! Control point 2
51+
QgsPoint cp2 = QgsPoint( 0, 0, 0 );
52+
//! Control point 3
53+
QgsPoint cp3 = QgsPoint( 0, 0, 0 );
54+
//! Control point 4
55+
QgsPoint cp4 = QgsPoint( 0, 0, 0 );
56+
//! Control point 5
57+
QgsPoint cp5 = QgsPoint( 0, 0, 0 );
58+
//! Control point 6
59+
QgsPoint cp6 = QgsPoint( 0, 0, 0 );
60+
//! Control point 7
61+
QgsPoint cp7 = QgsPoint( 0, 0, 0 );
62+
//! Control point 8
63+
QgsPoint cp8 = QgsPoint( 0, 0, 0 );
64+
//! Control point 9
65+
QgsPoint cp9 = QgsPoint( 0, 0, 0 );
66+
//! Control point 10
67+
QgsPoint cp10 = QgsPoint( 0, 0, 0 );
68+
//! Control point 11
69+
QgsPoint cp11 = QgsPoint( 0, 0, 0 );
70+
//! Control point 12
71+
QgsPoint cp12 = QgsPoint( 0, 0, 0 );
72+
//! Control point 13
73+
QgsPoint cp13 = QgsPoint( 0, 0, 0 );
74+
//! Control point 14
75+
QgsPoint cp14 = QgsPoint( 0, 0, 0 );
76+
//! Control point 15
77+
QgsPoint cp15 = QgsPoint( 0, 0, 0 );
78+
//! Control point 16
79+
QgsPoint cp16 = QgsPoint( 0, 0, 0 );
80+
//! Derivative in x-direction at point1
81+
double der1X = 0.0;
82+
//! Derivative in y-direction at point1
83+
double der1Y = 0.0;
84+
//! Derivative in x-direction at point2
85+
double der2X = 0.0;
86+
//! Derivative in y-direction at point2
87+
double der2Y = 0.0;
88+
//! Derivative in x-direction at point3
89+
double der3X = 0.0;
90+
//! Derivative in y-direction at point3
91+
double der3Y = 0.0;
92+
//! Stores point1 of the last run
93+
QgsPoint lpoint1 = QgsPoint( 0, 0, 0 );
94+
//! Stores point2 of the last run
95+
QgsPoint lpoint2 = QgsPoint( 0, 0, 0 );
96+
//! Stores point3 of the last run
97+
QgsPoint lpoint3 = QgsPoint( 0, 0, 0 );
98+
//! Finds out, in which triangle the point with the coordinates x and y is
99+
void init( double x, double y );
100+
//! 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
101+
double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
102+
103+
public:
104+
CloughTocherInterpolator() = default;
105+
106+
//! Constructor with a pointer to the triangulation as argument
107+
CloughTocherInterpolator( NormVecDecorator *tin );
108+
109+
//! Calculates the normal vector and assigns it to vec (not implemented at the moment)
110+
bool calcNormVec( double x, double y, QgsPoint &result SIP_OUT ) override;
111+
bool calcPoint( double x, double y, QgsPoint &result SIP_OUT ) override;
112+
virtual void setTriangulation( NormVecDecorator *tin );
113+
};
114+
115+
#endif
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/***************************************************************************
2+
HalfEdge.h - description
3+
-------------------
4+
copyright : (C) 2004 by Marco Hugentobler
5+
6+
***************************************************************************/
7+
8+
/***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef HALFEDGE_H
18+
#define HALFEDGE_H
19+
20+
#include "qgis_analysis.h"
21+
22+
#define SIP_NO_FILE
23+
24+
/**
25+
* \ingroup analysis
26+
* \class HalfEdge
27+
* \brief HalfEdge
28+
* \note Not available in Python bindings.
29+
*/
30+
class ANALYSIS_EXPORT HalfEdge
31+
{
32+
protected:
33+
//! Number of the dual HalfEdge
34+
int mDual = -10;
35+
//! Number of the next HalfEdge
36+
int mNext = -10;
37+
//! Number of the point at which this HalfEdge points
38+
int mPoint = -10;
39+
//! True, if the HalfEdge belongs to a break line, FALSE otherwise
40+
bool mBreak = false;
41+
//! True, if the HalfEdge belongs to a constrained edge, FALSE otherwise
42+
bool mForced = false;
43+
44+
public:
45+
//! Default constructor. Values for mDual, mNext, mPoint are set to -10 which means that they are undefined
46+
HalfEdge() = default;
47+
HalfEdge( int dual, int next, int point, bool mbreak, bool forced );
48+
49+
//! Returns the number of the dual HalfEdge
50+
int getDual() const;
51+
//! Returns the number of the next HalfEdge
52+
int getNext() const;
53+
//! Returns the number of the point at which this HalfEdge points
54+
int getPoint() const;
55+
//! Returns, whether the HalfEdge belongs to a break line or not
56+
bool getBreak() const;
57+
//! Returns, whether the HalfEdge belongs to a constrained edge or not
58+
bool getForced() const;
59+
//! Sets the number of the dual HalfEdge
60+
void setDual( int d );
61+
//! Sets the number of the next HalfEdge
62+
void setNext( int n );
63+
//! Sets the number of point at which this HalfEdge points
64+
void setPoint( int p );
65+
//! Sets the break flag
66+
void setBreak( bool b );
67+
//! Sets the forced flag
68+
void setForced( bool f );
69+
};
70+
71+
#ifndef SIP_RUN
72+
73+
inline HalfEdge::HalfEdge( int dual, int next, int point, bool mbreak, bool forced )
74+
: mDual( dual ), mNext( next ), mPoint( point ), mBreak( mbreak ), mForced( forced )
75+
{
76+
}
77+
78+
inline int HalfEdge::getDual() const
79+
{
80+
return mDual;
81+
}
82+
83+
inline int HalfEdge::getNext() const
84+
{
85+
return mNext;
86+
}
87+
88+
inline int HalfEdge::getPoint() const
89+
{
90+
return mPoint;
91+
}
92+
93+
inline bool HalfEdge::getBreak() const
94+
{
95+
return mBreak;
96+
}
97+
98+
inline bool HalfEdge::getForced() const
99+
{
100+
return mForced;
101+
}
102+
103+
inline void HalfEdge::setDual( int d )
104+
{
105+
mDual = d;
106+
}
107+
108+
inline void HalfEdge::setNext( int n )
109+
{
110+
mNext = n;
111+
}
112+
113+
inline void HalfEdge::setPoint( int p )
114+
{
115+
mPoint = p;
116+
}
117+
118+
inline void HalfEdge::setBreak( bool b )
119+
{
120+
mBreak = b;
121+
}
122+
123+
inline void HalfEdge::setForced( bool f )
124+
{
125+
mForced = f;
126+
}
127+
128+
#endif
129+
130+
#endif

0 commit comments

Comments
 (0)