QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsMeshTriangulation Class Reference

Handles mesh creation with Delaunay constrained triangulation. More...

#include <qgsmeshtriangulation.h>

Inheritance diagram for QgsMeshTriangulation:

Public Member Functions

 QgsMeshTriangulation ()
 ~QgsMeshTriangulation () override
bool addBreakLines (QgsFeatureIterator &lineFeatureIterator, int valueAttribute, const QgsCoordinateTransform &transformContext, QgsFeedback *feedback=nullptr, long featureCount=1)
 Adds break lines from a vector layer, return true if successful.
int addVertex (const QgsPoint &vertex)
 Adds a new vertex in the triangulation and returns the index of the new vertex.
bool addVertices (QgsFeatureIterator &vertexFeatureIterator, int valueAttribute, const QgsCoordinateTransform &transform, QgsFeedback *feedback=nullptr, long featureCount=1)
 Adds vertices to the triangulation from a feature iterator, return true if successful.
void setCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the coordinate reference system used for the triangulation.
QgsMesh triangulatedMesh (QgsFeedback *feedback=nullptr) const
 Returns the triangulated mesh.

Detailed Description

Handles mesh creation with Delaunay constrained triangulation.

Since
QGIS 3.16

Definition at line 40 of file qgsmeshtriangulation.h.

Constructor & Destructor Documentation

◆ QgsMeshTriangulation()

QgsMeshTriangulation::QgsMeshTriangulation ( )

Definition at line 35 of file qgsmeshtriangulation.cpp.

◆ ~QgsMeshTriangulation()

QgsMeshTriangulation::~QgsMeshTriangulation ( )
overridedefault

Member Function Documentation

◆ addBreakLines()

bool QgsMeshTriangulation::addBreakLines ( QgsFeatureIterator & lineFeatureIterator,
int valueAttribute,
const QgsCoordinateTransform & transformContext,
QgsFeedback * feedback = nullptr,
long featureCount = 1 )

Adds break lines from a vector layer, return true if successful.

Parameters
lineFeatureIteratorthe feature iterator of break lines to insert
valueAttributethe index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices
transformContextthe coordinates transform context used to transform coordinates
feedbackfeedback argument may be specified to allow cancellation and progress reports
featureCountthe count of feature to allow progress report of the feedback
Warning
if the feature iterator contains only point geometries, the vertices will be added only without treating them as breaklines

Definition at line 68 of file qgsmeshtriangulation.cpp.

◆ addVertex()

int QgsMeshTriangulation::addVertex ( const QgsPoint & vertex)

Adds a new vertex in the triangulation and returns the index of the new vertex.

Since
QGIS 3.22

Definition at line 104 of file qgsmeshtriangulation.cpp.

◆ addVertices()

bool QgsMeshTriangulation::addVertices ( QgsFeatureIterator & vertexFeatureIterator,
int valueAttribute,
const QgsCoordinateTransform & transform,
QgsFeedback * feedback = nullptr,
long featureCount = 1 )

Adds vertices to the triangulation from a feature iterator, return true if successful.

Parameters
vertexFeatureIteratorthe feature iterator of vertices to insert
valueAttributethe index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices
transformthe coordinates transform used to transform coordinates
feedbackfeedback argument may be specified to allow cancellation and progress reports
featureCountthe count of feature to allow progress report of the feedback

Definition at line 44 of file qgsmeshtriangulation.cpp.

◆ setCrs()

void QgsMeshTriangulation::setCrs ( const QgsCoordinateReferenceSystem & crs)

Sets the coordinate reference system used for the triangulation.

Definition at line 114 of file qgsmeshtriangulation.cpp.

◆ triangulatedMesh()

QgsMesh QgsMeshTriangulation::triangulatedMesh ( QgsFeedback * feedback = nullptr) const

Returns the triangulated mesh.

Definition at line 109 of file qgsmeshtriangulation.cpp.


The documentation for this class was generated from the following files: