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" ) );
85 double absvec3 = std::sqrt( vec3.getX() * vec3.getX() + vec3.getY() * vec3.getY() + vec3.getZ() * vec3.getZ() );
86 vec->
setX( vec3.getX() / absvec3 );
87 vec->
setY( vec3.getY() / absvec3 );
88 vec->
setZ( vec3.getZ() / absvec3 );
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 setX(double x)
Sets the x-component of the vector.
void setZ(double z)
Sets the point's z-coordinate.
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...
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...
double getZ() const
Returns 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
DualEdgeTriangulation * mTIN
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
void setZ(double z)
Sets the z-component of the vector.
Point geometry type, with support for z-dimension and m-values.
bool calcNormVec(double x, double y, Vector3D *result) override
Calculates the normal vector and assigns it to vec.
void setX(double x)
Sets the point's x-coordinate.
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 setY(double y)
Sets the point's y-coordinate.
double getY() const
Returns the y-component of the vector.
void setY(double y)
Sets the y-component of the vector.
double getX() const
Returns the x-component of the vector.
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...