29 if ( !
mTIN->triangleVertices( x, y, pt1, pt2, pt3 ) )
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() ) ) );
55 if ( !
mTIN->triangleVertices( x, y, pt1, pt2, pt3 ) )
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() ) ) );
89 const double absvec3 = std::sqrt( vec3.
getX() * vec3.
getX() + vec3.
getY() * vec3.
getY() + vec3.
getZ() * vec3.
getZ() );
111 if ( !
mTIN->triangleVertices( x, y, pt1, pt2, pt3 ) )
116 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() ) );
117 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() ) );
118 const double c = pt1.
z() - a * pt1.
x() - b * pt1.
y();
122 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.
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.
Represents a 3D-Vector, capable of storing 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)