QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
25 class ANALYSIS_EXPORT LinTriangleInterpolator : public TriangleInterpolator
26 {
27  public:
33  virtual ~LinTriangleInterpolator();
35  virtual bool calcNormVec( double x, double y, Vector3D* result ) override;
37  virtual bool calcPoint( double x, double y, Point3D* result ) override;
39  virtual DualEdgeTriangulation* getTriangulation() const;
41  virtual void setTriangulation( DualEdgeTriangulation* tin );
42 
43 
44  protected:
47  virtual bool calcFirstDerX( double x, double y, Vector3D* result );
49  virtual bool calcFirstDerY( double x, double y, Vector3D* result );
50 };
51 
53  : mTIN( nullptr )
54 {
55 
56 }
57 
59 {
60 
61 }
62 
64 {
65 
66 }
67 
69 {
70  return mTIN;
71 }
72 
74 {
75  mTIN = tin;
76 }
77 
78 #endif
79 
80 
81 
82 
83 
84 
85 
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
Point3D is a class to represent a three dimensional point.
Definition: Point3D.h:24
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
Definition: Vector3D.h:28
This is an interface for interpolator classes for triangulations.
virtual void setTriangulation(DualEdgeTriangulation *tin)
Sets a Triangulation.
virtual ~LinTriangleInterpolator()
Destructor.
LinTriangleInterpolator()
Default constructor.
virtual bool calcNormVec(double x, double y, Vector3D *result)=0
Calculates the normal vector and assigns it to vec.
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...
virtual DualEdgeTriangulation * getTriangulation() const
Returns a pointer to the current Triangulation object.