18 #ifndef QGSTRIANGULARMESH_H 19 #define QGSTRIANGULARMESH_H 26 #include "qgis_core.h" 67 const QVector<QgsMeshVertex> &vertices()
const ;
69 const QVector<QgsMeshFace> &triangles()
const ;
72 const QVector<QgsMeshVertex> ¢roids()
const ;
75 const QVector<int> &trianglesToNativeFaces()
const ;
86 int faceIndexForPoint(
const QgsPointXY &point )
const ;
97 QList<int> faceIndexesForRectangle(
const QgsRectangle &rectangle )
const ;
111 void triangulate(
const QgsMeshFace &face,
int nativeIndex );
116 QVector<int> mTrianglesToNativeFaces;
119 QVector<QgsMeshVertex> mNativeMeshFaceCentroids;
124 friend class TestQgsTriangularMesh;
133 CORE_EXPORT std::unique_ptr< QgsPolygon >
toPolygon(
const QgsMeshFace &face,
const QVector<QgsMeshVertex> &vertices );
139 CORE_EXPORT QList<int>
nativeFacesFromTriangles(
const QList<int> &triangleIndexes,
const QVector<int> &trianglesToNativeFaces );
142 #endif // QGSTRIANGULARMESH_H CORE_EXPORT QgsGeometry toGeometry(const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
Returns face as polygon geometry.
A rectangle specified with double values.
Triangular/Derived Mesh is mesh with vertices in map coordinates.
A class to represent a 2D point.
A geometry is the spatial representation of a feature.
CORE_EXPORT std::unique_ptr< QgsPolygon > toPolygon(const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
Returns face as polygon geometry, caller is responsible for delete.
CORE_EXPORT QList< int > nativeFacesFromTriangles(const QList< int > &triangleIndexes, const QVector< int > &trianglesToNativeFaces)
Returns unique native faces indexes from list of triangle indexes.
A spatial index for QgsMeshFace objects.
Contains information about the context of a rendering operation.
Mesh - vertices and faces.
QVector< int > QgsMeshFace
List of vertex indexes.