35 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() ) ) );
61 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() ) ) );
88 const double absvec3 = std::sqrt( vec3.
getX() * vec3.
getX() + vec3.
getY() * vec3.
getY() + vec3.
getZ() * vec3.
getZ() );
115 const 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() ) );
116 const 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() ) );
117 const double c = pt1.
z() - a * pt1.
x() - b * pt1.
y();
121 point.
setZ( a * x + b * y +
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 calcNormVec(double x, double y, QgsPoint &result) override
Calculates the normal vector and assigns it to vec.
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.
QgsDualEdgeTriangulation * mTIN
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 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...
Point geometry type, with support for z-dimension and m-values.
void setY(double y)
Sets the point's y-coordinate.
void setX(double x)
Sets the point's x-coordinate.
void setZ(double z)
Sets the point's z-coordinate.
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.
void setX(double x)
Sets the x-component of the vector.
double getY() const
Returns the y-component of the vector.
double getX() const
Returns the x-component of the vector.
void setY(double y)
Sets the y-component of the vector.
double getZ() const
Returns the z-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
#define QgsDebugError(str)