QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
36 vec->
setZ( ( pt1.
z() * ( pt2.
y() - pt3.
y() ) + pt2.
z() * ( pt3.
y() - pt1.
y() ) + pt3.
z() * ( pt1.
y() - pt2.
y() ) ) / ( ( pt1.
x() - pt2.
x() ) * ( pt2.
y() - pt3.
y() ) - ( pt2.
x() - pt3.
x() ) * ( pt1.
y() - pt2.
y() ) ) );
42 QgsDebugMsg( QStringLiteral(
"warning, null pointer" ) );
62 vec->
setZ( ( pt1.
z() * ( pt2.
x() - pt3.
x() ) + pt2.
z() * ( pt3.
x() - pt1.
x() ) + pt3.
z() * ( pt1.
x() - pt2.
x() ) ) / ( ( pt1.
y() - pt2.
y() ) * ( pt2.
x() - pt3.
x() ) - ( pt2.
y() - pt3.
y() ) * ( pt1.
x() - pt2.
x() ) ) );
68 QgsDebugMsg( QStringLiteral(
"warning, null pointer" ) );
94 QgsDebugMsg( QStringLiteral(
"warning, null pointer" ) );
113 double a = ( pt1.
z() * ( pt2.
y() - pt3.
y() ) + pt2.
z() * ( pt3.
y() - pt1.
y() ) + pt3.
z() * ( pt1.
y() - pt2.
y() ) ) / ( ( pt1.
x() - pt2.
x() ) * ( pt2.
y() - pt3.
y() ) - ( pt2.
x() - pt3.
x() ) * ( pt1.
y() - pt2.
y() ) );
114 double b = ( pt1.
z() * ( pt2.
x() - pt3.
x() ) + pt2.
z() * ( pt3.
x() - pt1.
x() ) + pt3.
z() * ( pt1.
x() - pt2.
x() ) ) / ( ( pt1.
y() - pt2.
y() ) * ( pt2.
x() - pt3.
x() ) - ( pt2.
y() - pt3.
y() ) * ( pt1.
x() - pt2.
x() ) );
115 double c = pt1.
z() - a * pt1.
x() - b * pt1.
y();
119 point.
setZ( a * x + b * y +
c );
124 QgsDebugMsg( QStringLiteral(
"warning, null pointer" ) );
void setY(double y)
Sets the point's y-coordinate.
void setX(double x)
Sets the x-component of the vector.
Point geometry type, with support for z-dimension and m-values.
bool getTriangle(double x, double y, QgsPoint &p1, int &n1, QgsPoint &p2, int &n2, QgsPoint &p3, int &n3) override
Finds out in which triangle the point with coordinates x and y is and assigns the numbers of the vert...
virtual bool calcFirstDerY(double x, double y, Vector3D *result)
Calculates the first derivative with respect to y for a linear surface and assigns it to vec.
void setX(double x)
Sets the point's x-coordinate.
double getZ() const
Returns the z-component of the vector.
double getY() const
Returns the y-component of the vector.
DualEdgeTriangulation * mTIN
void setZ(double z)
Sets the point's z-coordinate.
void setY(double y)
Sets the y-component of the vector.
void setZ(double z)
Sets the z-component of the vector.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
bool calcNormVec(double x, double y, Vector3D *result) override
Calculates the normal vector and assigns it to vec.
virtual bool calcFirstDerX(double x, double y, Vector3D *result)
Calculates the first derivative with respect to x for a linear surface and assigns it to vec.
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.
double getX() const
Returns the x-component of the vector.