QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
CloughTocherInterpolator.h
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  ***************************************************************************/
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 "NormVecDecorator.h"
21 #include "TriangleInterpolator.h"
22 #include "Point3D.h"
23 #include "Vector3D.h"
24 #include "MathUtils.h"
25 #include "Bezier3D.h"
26 
29 class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
30 {
31  protected:
59  double der1X;
61  double der1Y;
63  double der2X;
65  double der2Y;
67  double der3X;
69  double der3Y;
77  void init( double x, double y );
79  double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
80 
81  public:
87  virtual ~CloughTocherInterpolator();
89  virtual bool calcNormVec( double x, double y, Vector3D* result ) override;
91  virtual bool calcPoint( double x, double y, Point3D* result ) override;
92  virtual void setTriangulation( NormVecDecorator* tin );
93 };
94 
95 #endif
96 
97 
98 
Decorator class which adds the functionality of estimating normals at the data points.
double der2Y
Derivative in y-direction at point2.
Point3D point3
Third point of the triangle in x-,y-,z-coordinates.
double der3X
Derivative in x-direction at point3.
Point3D is a class to represent a three dimensional point.
Definition: Point3D.h:24
Point3D lpoint2
Stores point2 of the last run.
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
Definition: Vector3D.h:28
Point3D point1
First point of the triangle in x-,y-,z-coordinates.
This is an interface for interpolator classes for triangulations.
double der1X
Derivative in x-direction at point1.
double der3Y
Derivative in y-direction at point3.
virtual bool calcNormVec(double x, double y, Vector3D *result)=0
Calculates the normal vector and assigns it to vec.
Point3D point2
Second point of the triangle in x-,y-,z-coordinates.
This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation.
virtual bool calcPoint(double x, double y, Point3D *result)=0
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point...
Point3D lpoint1
Stores point1 of the last run.
double ANALYSIS_EXPORT calcBernsteinPoly(int n, int i, double t)
Calculates the value of a Bernstein polynomial.
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.
Point3D lpoint3
Stores point3 of the last run.
NormVecDecorator * mTIN
Association with a triangulation object.