CloughTocherInterpolator class

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.

Base classes

class TriangleInterpolator
This is an interface for interpolator classes for triangulations.

Constructors, destructors, conversion operators

CloughTocherInterpolator() defaulted
Standard constructor.
CloughTocherInterpolator(NormVecDecorator* tin)
Constructor with a pointer to the triangulation as argument.

Public functions

auto calcNormVec(double x, double y, Vector3D* result) -> bool override
Calculates the normal vector and assigns it to vec (not implemented at the moment)
auto calcPoint(double x, double y, QgsPoint& result) -> bool override
Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point.

Protected functions

auto calcBernsteinPoly(int n, int i, int j, int k, double u, double v, double w) -> double
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.
void init(double x, double y)
Finds out, in which triangle the point with the coordinates x and y is.

Protected variables

QgsPoint cp1
Control point 1.
QgsPoint cp10
Control point 10.
QgsPoint cp11
Control point 11.
QgsPoint cp12
Control point 12.
QgsPoint cp13
Control point 13.
QgsPoint cp14
Control point 14.
QgsPoint cp15
Control point 15.
QgsPoint cp16
Control point 16.
QgsPoint cp2
Control point 2.
QgsPoint cp3
Control point 3.
QgsPoint cp4
Control point 4.
QgsPoint cp5
Control point 5.
QgsPoint cp6
Control point 6.
QgsPoint cp7
Control point 7.
QgsPoint cp8
Control point 8.
QgsPoint cp9
Control point 9.
double der1X
Derivative in x-direction at point1.
double der1Y
Derivative in y-direction at point1.
double der2X
Derivative in x-direction at point2.
double der2Y
Derivative in y-direction at point2.
double der3X
Derivative in x-direction at point3.
double der3Y
Derivative in y-direction at point3.
QgsPoint lpoint1
Stores point1 of the last run.
QgsPoint lpoint2
Stores point2 of the last run.
QgsPoint lpoint3
Stores point3 of the last run.
double mEdgeTolerance
Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negativ baricentric coordinates)
NormVecDecorator* mTIN
Association with a triangulation object.
QgsPoint point1
First point of the triangle in x-,y-,z-coordinates.
QgsPoint point2
Second point of the triangle in x-,y-,z-coordinates.
QgsPoint point3
Third point of the triangle in x-,y-,z-coordinates.