QGIS API Documentation  2.99.0-Master (7d4f81d)
Go to the documentation of this file.
1 /***************************************************************************
2  CloughTocherInterpolator.h - description
3  -------------------
4  copyright : (C) 2004 by Marco Hugentobler
5  email : [email protected]
6  ***************************************************************************/
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  ***************************************************************************/
20 #include "TriangleInterpolator.h"
21 #include "qgspoint.h"
22 #include "qgis_analysis.h"
24 class NormVecDecorator;
28 class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
29 {
30  protected:
32  NormVecDecorator *mTIN = nullptr;
58  double der1X;
60  double der1Y;
62  double der2X;
64  double der2Y;
66  double der3X;
68  double der3Y;
76  void init( double x, double y );
78  double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
80  public:
85  virtual ~CloughTocherInterpolator();
87  virtual bool calcNormVec( double x, double y, Vector3D *result SIP_OUT ) override;
89  virtual bool calcPoint( double x, double y, QgsPoint *result SIP_OUT ) override;
90  virtual void setTriangulation( NormVecDecorator *tin );
91 };
93 #endif
Decorator class which adds the functionality of estimating normals at the data points.
QgsPoint lpoint3
Stores point3 of the last run.
double der2Y
Derivative in y-direction at point2.
QgsPoint point3
Third point of the triangle in x-,y-,z-coordinates.
double der3X
Derivative in x-direction at point3.
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
Definition: Vector3D.h:29
This is an interface for interpolator classes for triangulations.
double der1X
Derivative in x-direction at point1.
QgsPoint lpoint1
Stores point1 of the last run.
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:36
virtual bool calcPoint(double x, double y, QgsPoint *result SIP_OUT)=0
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point...
QgsPoint lpoint2
Stores point2 of the last run.
double der3Y
Derivative in y-direction at point3.
#define SIP_OUT
Definition: qgis_sip.h:51
This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation.
double ANALYSIS_EXPORT calcBernsteinPoly(int n, int i, double t)
Calculates the value of a Bernstein polynomial.
Definition: MathUtils.cc:104
double der1Y
Derivative in y-direction at point1.
double mEdgeTolerance
Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because o...
double der2X
Derivative in x-direction at point2.
QgsPoint point2
Second point of the triangle in x-,y-,z-coordinates.
QgsPoint point1
First point of the triangle in x-,y-,z-coordinates.
virtual bool calcNormVec(double x, double y, Vector3D *result SIP_OUT)=0
Calculates the normal vector and assigns it to vec.