QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef NORMVECDECORATOR_H
18 #define NORMVECDECORATOR_H
25 #include "qgis_analysis.h"
49 bool calcNormalForPoint(
double x,
double y,
int pointIndex,
Vector3D *result
SIP_OUT );
54 bool estimateFirstDerivative(
int pointno );
56 bool estimateFirstDerivatives(
QgsFeedback *feedback =
nullptr );
62 bool getTriangle(
double x,
double y,
QgsPoint &p1
SIP_OUT,
int &ptn1
SIP_OUT,
Vector3D *v1
SIP_OUT, PointState *state1
SIP_OUT,
QgsPoint &p2
SIP_OUT,
int &ptn2
SIP_OUT,
Vector3D *v2
SIP_OUT, PointState *state2
SIP_OUT,
QgsPoint &p3
SIP_OUT,
int &ptn3
SIP_OUT,
Vector3D *v3
SIP_OUT, PointState *state3
SIP_OUT );
64 PointState getState(
int pointno )
const;
68 bool swapEdge(
double x,
double y )
override;
77 static const unsigned int DEFAULT_STORAGE_FOR_NORMALS = 100000;
95 : mNormVec( new QVector<
Vector3D*>( DEFAULT_STORAGE_FOR_NORMALS ) )
96 , mPointState( new QVector<
PointState>( DEFAULT_STORAGE_FOR_NORMALS ) )
103 , mNormVec( new QVector<
Vector3D*>( DEFAULT_STORAGE_FOR_NORMALS ) )
104 , mPointState( new QVector<
PointState>( DEFAULT_STORAGE_FOR_NORMALS ) )
122 QgsDebugMsg( QStringLiteral(
"warning, null pointer" ) );
void eliminateHorizontalTriangles() override
Eliminates the horizontal triangles by swapping.
Decorator class for Triangulations (s. Decorator pattern in Gamma et al.).
bool alreadyestimated
Is true, if the normals already have been estimated.
Point geometry type, with support for z-dimension and m-values.
int addPoint(const QgsPoint &p) override
Adds a point to the triangulation.
bool calcNormal(double x, double y, QgsPoint &result) override
Calculates the normal at a point on the surface and assigns it to 'result'.
Interface for Triangulation classes.
Mesh - vertices, edges and faces.
Vector3D * getNormal(int n) const
Returns a pointer to the normal vector for the point with the number n.
QVector< PointState > * mPointState
Vector who stores, it a point is not on a breakline, if it is a normal point of the breakline or if i...
virtual QgsMesh triangulationToMesh(QgsFeedback *feedback=nullptr) const =0
Returns a QgsMesh corresponding to the triangulation.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
void setTriangleInterpolator(TriangleInterpolator *interpolator) override
Sets an interpolator object.
bool calcPoint(double x, double y, QgsPoint &result) override
Calculates x-, y and z-value of the point on the surface and assigns it to 'result'.
bool swapEdge(double x, double y) override
Reads the content of a taff-file.
QVector< Vector3D * > * mNormVec
Vector that stores the normals for the points. If 'estimateFirstDerivatives()' was called and there i...
TriangleInterpolator * mInterpolator
Association with an interpolator object.
void setTriangleInterpolator(TriangleInterpolator *inter) override
Sets an interpolator.
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.
PointState
Enumeration for the state of a point. Normal means, that the point is not on a BreakLine,...
virtual bool saveTriangulation(QgsFeatureSink *sink, QgsFeedback *feedback=nullptr) const =0
Saves the triangulation features to a feature sink.
An interface for objects which accept features via addFeature(s) methods.
Decorator class which adds the functionality of estimating normals at the data points.
This is an interface for interpolator classes for triangulations.