QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
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" ) );
bool triangleVertices(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...
void setX(double x)
Sets the x-component of the vector.
bool calcNormVec(double x, double y, QgsPoint &result) override
Calculates the normal vector and assigns it to vec.
Point geometry type, with support for z-dimension and m-values.
QgsDualEdgeTriangulation * mTIN
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.
double getZ() const
Returns the z-component of the vector.
double getY() const
Returns the y-component of the vector.
void setX(double x) SIP_HOLDGIL
Sets the point's x-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
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.
void setY(double y) SIP_HOLDGIL
Sets the point's y-coordinate.
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.
void setZ(double z) SIP_HOLDGIL
Sets the point's z-coordinate.
double getX() const
Returns the x-component of the vector.