QGIS API Documentation  2.99.0-Master (ae4d26a)
LinTriangleInterpolator.h
Go to the documentation of this file.
1 /***************************************************************************
2  LinTriangleInterpolator.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 LINTRIANGLEINTERPOLATOR_H
18 #define LINTRIANGLEINTERPOLATOR_H
19 
20 #include "TriangleInterpolator.h"
21 #include "DualEdgeTriangulation.h"
22 #include "qgis_analysis.h"
23 
24 #define SIP_NO_FILE
25 
31 class ANALYSIS_EXPORT LinTriangleInterpolator : public TriangleInterpolator
32 {
33  public:
38  virtual ~LinTriangleInterpolator();
40  virtual bool calcNormVec( double x, double y, Vector3D *result SIP_OUT ) override;
42  virtual bool calcPoint( double x, double y, QgsPoint *result SIP_OUT ) override;
44  virtual DualEdgeTriangulation *getTriangulation() const;
46  virtual void setTriangulation( DualEdgeTriangulation *tin );
47 
48 
49  protected:
50  DualEdgeTriangulation *mTIN = nullptr;
52  virtual bool calcFirstDerX( double x, double y, Vector3D *result SIP_OUT );
54  virtual bool calcFirstDerY( double x, double y, Vector3D *result SIP_OUT );
55 };
56 
57 #ifndef SIP_RUN
58 
60 {
61 
62 }
63 
65 {
66 
67 }
68 
70 {
71 
72 }
73 
75 {
76  return mTIN;
77 }
78 
80 {
81  mTIN = tin;
82 }
83 
84 #endif
85 #endif
86 
87 
88 
89 
90 
91 
92 
LinTriangleInterpolator is a class which interpolates linearly on a triangulation.
DualEdgeTriangulation is an implementation of a triangulation class based on the dual edge data struc...
DualEdgeTriangulation * mTIN
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
Definition: Vector3D.h:33
This is an interface for interpolator classes for triangulations.
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:37
virtual void setTriangulation(DualEdgeTriangulation *tin)
Sets a Triangulation.
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...
LinTriangleInterpolator()
Default constructor.
#define SIP_OUT
Definition: qgis_sip.h:51
virtual DualEdgeTriangulation * getTriangulation() const
Returns a pointer to the current Triangulation object.
virtual bool calcNormVec(double x, double y, Vector3D *result SIP_OUT)=0
Calculates the normal vector and assigns it to vec.