QGIS API Documentation  2.99.0-Master (009e47e)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CloughTocherInterpolator Class Reference

This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation. More...

#include <CloughTocherInterpolator.h>

Inheritance diagram for CloughTocherInterpolator:
Inheritance graph
[legend]

Public Member Functions

 CloughTocherInterpolator ()
 Standard constructor. More...
 
 CloughTocherInterpolator (NormVecDecorator *tin)
 Constructor with a pointer to the triangulation as argument. More...
 
virtual ~CloughTocherInterpolator ()
 
virtual bool calcNormVec (double x, double y, Vector3D *result) override
 Calculates the normal vector and assigns it to vec (not implemented at the moment) More...
 
virtual bool calcPoint (double x, double y, QgsPoint *result) override
 Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point. More...
 
virtual void setTriangulation (NormVecDecorator *tin)
 
- Public Member Functions inherited from TriangleInterpolator
virtual ~TriangleInterpolator ()=default
 

Protected Member Functions

double calcBernsteinPoly (int n, int i, int j, int k, double u, double v, double w)
 Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point. More...
 
void init (double x, double y)
 Finds out, in which triangle the point with the coordinates x and y is. More...
 

Protected Attributes

QgsPoint cp1
 
QgsPoint cp10
 
QgsPoint cp11
 
QgsPoint cp12
 
QgsPoint cp13
 
QgsPoint cp14
 
QgsPoint cp15
 
QgsPoint cp16
 
QgsPoint cp2
 
QgsPoint cp3
 
QgsPoint cp4
 
QgsPoint cp5
 
QgsPoint cp6
 
QgsPoint cp7
 
QgsPoint cp8
 
QgsPoint cp9
 
double der1X
 Derivative in x-direction at point1. More...
 
double der1Y
 Derivative in y-direction at point1. More...
 
double der2X
 Derivative in x-direction at point2. More...
 
double der2Y
 Derivative in y-direction at point2. More...
 
double der3X
 Derivative in x-direction at point3. More...
 
double der3Y
 Derivative in y-direction at point3. More...
 
QgsPoint lpoint1
 Stores point1 of the last run. More...
 
QgsPoint lpoint2
 Stores point2 of the last run. More...
 
QgsPoint lpoint3
 Stores point3 of the last run. More...
 
double mEdgeTolerance
 Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negativ baricentric coordinates) More...
 
NormVecDecoratormTIN = nullptr
 Association with a triangulation object. More...
 
QgsPoint point1
 First point of the triangle in x-,y-,z-coordinates. More...
 
QgsPoint point2
 Second point of the triangle in x-,y-,z-coordinates. More...
 
QgsPoint point3
 Third point of the triangle in x-,y-,z-coordinates. More...
 

Detailed Description

This is an implementation of a Clough-Tocher interpolator based on a triangular tessellation.

The derivatives orthogonal to the boundary curves are interpolated linearly along a triangle edge.

Definition at line 28 of file CloughTocherInterpolator.h.

Constructor & Destructor Documentation

◆ CloughTocherInterpolator() [1/2]

CloughTocherInterpolator::CloughTocherInterpolator ( )

Standard constructor.

Definition at line 23 of file CloughTocherInterpolator.cc.

◆ CloughTocherInterpolator() [2/2]

CloughTocherInterpolator::CloughTocherInterpolator ( NormVecDecorator tin)

Constructor with a pointer to the triangulation as argument.

Definition at line 36 of file CloughTocherInterpolator.cc.

◆ ~CloughTocherInterpolator()

CloughTocherInterpolator::~CloughTocherInterpolator ( )
virtual

Definition at line 49 of file CloughTocherInterpolator.cc.

Member Function Documentation

◆ calcBernsteinPoly()

double CloughTocherInterpolator::calcBernsteinPoly ( int  n,
int  i,
int  j,
int  k,
double  u,
double  v,
double  w 
)
protected

Calculates the Bernsteinpolynomials to calculate the Beziertriangle. 'n' is three in the cubical case, 'i', 'j', 'k' are the indices of the controllpoint and 'u', 'v', 'w' are the barycentric coordinates of the point.

Definition at line 59 of file CloughTocherInterpolator.cc.

◆ calcNormVec()

bool CloughTocherInterpolator::calcNormVec ( double  x,
double  y,
Vector3D result 
)
overridevirtual

Calculates the normal vector and assigns it to vec (not implemented at the moment)

Implements TriangleInterpolator.

Definition at line 71 of file CloughTocherInterpolator.cc.

◆ calcPoint()

bool CloughTocherInterpolator::calcPoint ( double  x,
double  y,
QgsPoint result 
)
overridevirtual

Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point.

Implements TriangleInterpolator.

Definition at line 181 of file CloughTocherInterpolator.cc.

◆ init()

void CloughTocherInterpolator::init ( double  x,
double  y 
)
protected

Finds out, in which triangle the point with the coordinates x and y is.

Definition at line 259 of file CloughTocherInterpolator.cc.

◆ setTriangulation()

void CloughTocherInterpolator::setTriangulation ( NormVecDecorator tin)
virtual

Definition at line 54 of file CloughTocherInterpolator.cc.

Member Data Documentation

◆ cp1

QgsPoint CloughTocherInterpolator::cp1
protected

Definition at line 41 of file CloughTocherInterpolator.h.

◆ cp10

QgsPoint CloughTocherInterpolator::cp10
protected

Definition at line 50 of file CloughTocherInterpolator.h.

◆ cp11

QgsPoint CloughTocherInterpolator::cp11
protected

Definition at line 51 of file CloughTocherInterpolator.h.

◆ cp12

QgsPoint CloughTocherInterpolator::cp12
protected

Definition at line 52 of file CloughTocherInterpolator.h.

◆ cp13

QgsPoint CloughTocherInterpolator::cp13
protected

Definition at line 53 of file CloughTocherInterpolator.h.

◆ cp14

QgsPoint CloughTocherInterpolator::cp14
protected

Definition at line 54 of file CloughTocherInterpolator.h.

◆ cp15

QgsPoint CloughTocherInterpolator::cp15
protected

Definition at line 55 of file CloughTocherInterpolator.h.

◆ cp16

QgsPoint CloughTocherInterpolator::cp16
protected

Definition at line 56 of file CloughTocherInterpolator.h.

◆ cp2

QgsPoint CloughTocherInterpolator::cp2
protected

Definition at line 42 of file CloughTocherInterpolator.h.

◆ cp3

QgsPoint CloughTocherInterpolator::cp3
protected

Definition at line 43 of file CloughTocherInterpolator.h.

◆ cp4

QgsPoint CloughTocherInterpolator::cp4
protected

Definition at line 44 of file CloughTocherInterpolator.h.

◆ cp5

QgsPoint CloughTocherInterpolator::cp5
protected

Definition at line 45 of file CloughTocherInterpolator.h.

◆ cp6

QgsPoint CloughTocherInterpolator::cp6
protected

Definition at line 46 of file CloughTocherInterpolator.h.

◆ cp7

QgsPoint CloughTocherInterpolator::cp7
protected

Definition at line 47 of file CloughTocherInterpolator.h.

◆ cp8

QgsPoint CloughTocherInterpolator::cp8
protected

Definition at line 48 of file CloughTocherInterpolator.h.

◆ cp9

QgsPoint CloughTocherInterpolator::cp9
protected

Definition at line 49 of file CloughTocherInterpolator.h.

◆ der1X

double CloughTocherInterpolator::der1X
protected

Derivative in x-direction at point1.

Definition at line 58 of file CloughTocherInterpolator.h.

◆ der1Y

double CloughTocherInterpolator::der1Y
protected

Derivative in y-direction at point1.

Definition at line 60 of file CloughTocherInterpolator.h.

◆ der2X

double CloughTocherInterpolator::der2X
protected

Derivative in x-direction at point2.

Definition at line 62 of file CloughTocherInterpolator.h.

◆ der2Y

double CloughTocherInterpolator::der2Y
protected

Derivative in y-direction at point2.

Definition at line 64 of file CloughTocherInterpolator.h.

◆ der3X

double CloughTocherInterpolator::der3X
protected

Derivative in x-direction at point3.

Definition at line 66 of file CloughTocherInterpolator.h.

◆ der3Y

double CloughTocherInterpolator::der3Y
protected

Derivative in y-direction at point3.

Definition at line 68 of file CloughTocherInterpolator.h.

◆ lpoint1

QgsPoint CloughTocherInterpolator::lpoint1
protected

Stores point1 of the last run.

Definition at line 70 of file CloughTocherInterpolator.h.

◆ lpoint2

QgsPoint CloughTocherInterpolator::lpoint2
protected

Stores point2 of the last run.

Definition at line 72 of file CloughTocherInterpolator.h.

◆ lpoint3

QgsPoint CloughTocherInterpolator::lpoint3
protected

Stores point3 of the last run.

Definition at line 74 of file CloughTocherInterpolator.h.

◆ mEdgeTolerance

double CloughTocherInterpolator::mEdgeTolerance
protected

Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negativ baricentric coordinates)

Definition at line 34 of file CloughTocherInterpolator.h.

◆ mTIN

NormVecDecorator* CloughTocherInterpolator::mTIN = nullptr
protected

Association with a triangulation object.

Definition at line 32 of file CloughTocherInterpolator.h.

◆ point1

QgsPoint CloughTocherInterpolator::point1
protected

First point of the triangle in x-,y-,z-coordinates.

Definition at line 36 of file CloughTocherInterpolator.h.

◆ point2

QgsPoint CloughTocherInterpolator::point2
protected

Second point of the triangle in x-,y-,z-coordinates.

Definition at line 38 of file CloughTocherInterpolator.h.

◆ point3

QgsPoint CloughTocherInterpolator::point3
protected

Third point of the triangle in x-,y-,z-coordinates.

Definition at line 40 of file CloughTocherInterpolator.h.


The documentation for this class was generated from the following files: