QGIS API Documentation 3.38.0-Grenoble (exported)
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 "qgspoint.h"
22#include "qgis_analysis.h"
23
25
26#define SIP_NO_FILE
27
35class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
36{
37 protected:
39 NormVecDecorator *mTIN = nullptr;
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;
93 QgsPoint lpoint1 = QgsPoint( 0, 0, 0 );
95 QgsPoint lpoint2 = QgsPoint( 0, 0, 0 );
97 QgsPoint lpoint3 = QgsPoint( 0, 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:
106
109
111 bool calcNormVec( double x, double y, QgsPoint &result SIP_OUT ) override;
112 bool calcPoint( double x, double y, QgsPoint &result SIP_OUT ) override;
113 virtual void setTriangulation( NormVecDecorator *tin );
114};
115
116#endif
117
118
119
This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation.
CloughTocherInterpolator()=default
Standard constructor.
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
This is 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