QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
CloughTocherInterpolator.h
Go to the documentation of this file.
1/***************************************************************************
2 CloughTocherInterpolator.h - description
3 -------------------
4 copyright : (C) 2004 by Marco Hugentobler
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
21#include "qgis_analysis.h"
22#include "qgspoint.h"
23
25
26#define SIP_NO_FILE
27
35class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
36{
37 protected:
41 double mEdgeTolerance = 0.00001;
43 QgsPoint point1 = QgsPoint( 0, 0, 0 );
45 QgsPoint point2 = QgsPoint( 0, 0, 0 );
47 QgsPoint point3 = QgsPoint( 0, 0, 0 );
49 QgsPoint cp1 = QgsPoint( 0, 0, 0 );
51 QgsPoint cp2 = QgsPoint( 0, 0, 0 );
53 QgsPoint cp3 = QgsPoint( 0, 0, 0 );
55 QgsPoint cp4 = QgsPoint( 0, 0, 0 );
57 QgsPoint cp5 = QgsPoint( 0, 0, 0 );
59 QgsPoint cp6 = QgsPoint( 0, 0, 0 );
61 QgsPoint cp7 = QgsPoint( 0, 0, 0 );
63 QgsPoint cp8 = QgsPoint( 0, 0, 0 );
65 QgsPoint cp9 = QgsPoint( 0, 0, 0 );
67 QgsPoint cp10 = QgsPoint( 0, 0, 0 );
69 QgsPoint cp11 = QgsPoint( 0, 0, 0 );
71 QgsPoint cp12 = QgsPoint( 0, 0, 0 );
73 QgsPoint cp13 = QgsPoint( 0, 0, 0 );
75 QgsPoint cp14 = QgsPoint( 0, 0, 0 );
77 QgsPoint cp15 = QgsPoint( 0, 0, 0 );
79 QgsPoint cp16 = QgsPoint( 0, 0, 0 );
81 double der1X = 0.0;
83 double der1Y = 0.0;
85 double der2X = 0.0;
87 double der2Y = 0.0;
89 double der3X = 0.0;
91 double der3Y = 0.0;
99 void init( double x, double y );
101 double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
102
103 public:
105
108
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
double der2X
Derivative in x-direction at point2.
virtual void setTriangulation(NormVecDecorator *tin)
QgsPoint cp8
Control point 8.
QgsPoint cp1
Control point 1.
double der3X
Derivative in x-direction at point3.
QgsPoint cp2
Control point 2.
QgsPoint cp14
Control point 14.
QgsPoint cp13
Control point 13.
QgsPoint cp9
Control point 9.
QgsPoint point3
Third point of the triangle in x-,y-,z-coordinates.
double der2Y
Derivative in y-direction at point2.
NormVecDecorator * mTIN
Association with a triangulation object.
QgsPoint cp10
Control point 10.
double der1X
Derivative in x-direction at point1.
double mEdgeTolerance
Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because o...
QgsPoint lpoint1
Stores point1 of the last run.
QgsPoint cp5
Control point 5.
QgsPoint cp4
Control point 4.
QgsPoint cp3
Control point 3.
QgsPoint lpoint2
Stores point2 of the last run.
QgsPoint cp7
Control point 7.
double calcBernsteinPoly(int n, int i, int j, int k, double u, double v, double w)
Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case...
QgsPoint point2
Second point of the triangle in x-,y-,z-coordinates.
double der3Y
Derivative in y-direction at point3.
QgsPoint cp12
Control point 12.
QgsPoint cp16
Control point 16.
void init(double x, double y)
Finds out, in which triangle the point with the coordinates x and y is.
QgsPoint cp6
Control point 6.
QgsPoint cp15
Control point 15.
CloughTocherInterpolator()=default
QgsPoint lpoint3
Stores point3 of the last run.
QgsPoint point1
First point of the triangle in x-,y-,z-coordinates.
double der1Y
Derivative in y-direction at point1.
QgsPoint cp11
Control point 11.
Decorator class which adds the functionality of estimating normals at the data points.
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49
An interface for interpolator classes for triangulations.
virtual bool calcNormVec(double x, double y, QgsPoint &result)=0
Calculates the normal vector and assigns it to vec.
virtual bool calcPoint(double x, double y, QgsPoint &result)=0
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point.
#define SIP_OUT
Definition qgis_sip.h:58