QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Member Functions | List of all members
QgsTriangularMesh Class Reference

Triangular/Derived Mesh. More...

#include <qgstriangularmesh.h>

Public Member Functions

 QgsTriangularMesh ()=default
 Ctor. More...
 
 ~QgsTriangularMesh ()=default
 Dtor. More...
 
const QVector< QgsMeshVertex > & centroids () const
 Returns centroids of the native faces in map CRS. More...
 
const QVector< QgsMeshFace > & triangles () const
 Returns triangles. More...
 
const QVector< int > & trianglesToNativeFaces () const
 Returns mapping between triangles and original faces. More...
 
void update (QgsMesh *nativeMesh, QgsRenderContext *context)
 Constructs triangular mesh from layer's native mesh and context. More...
 
const QVector< QgsMeshVertex > & vertices () const
 Returns vertices in map CRS. More...
 

Detailed Description

Triangular/Derived Mesh.

Note
The API is considered EXPERIMENTAL and can be changed without a notice
Since
QGIS 3.2

Definition at line 49 of file qgstriangularmesh.h.

Constructor & Destructor Documentation

◆ QgsTriangularMesh()

QgsTriangularMesh::QgsTriangularMesh ( )
default

Ctor.

◆ ~QgsTriangularMesh()

QgsTriangularMesh::~QgsTriangularMesh ( )
default

Dtor.

Member Function Documentation

◆ centroids()

const QVector< QgsMeshVertex > & QgsTriangularMesh::centroids ( ) const

Returns centroids of the native faces in map CRS.

Definition at line 158 of file qgstriangularmesh.cpp.

◆ triangles()

const QVector< QgsMeshFace > & QgsTriangularMesh::triangles ( ) const

Returns triangles.

Definition at line 153 of file qgstriangularmesh.cpp.

◆ trianglesToNativeFaces()

const QVector< int > & QgsTriangularMesh::trianglesToNativeFaces ( ) const

Returns mapping between triangles and original faces.

Definition at line 163 of file qgstriangularmesh.cpp.

◆ update()

void QgsTriangularMesh::update ( QgsMesh nativeMesh,
QgsRenderContext context 
)

Constructs triangular mesh from layer's native mesh and context.

Parameters
nativeMeshQgsMesh to access native vertices and faces
contextRendering context to estimate number of triagles to create for an face

Definition at line 67 of file qgstriangularmesh.cpp.

◆ vertices()

const QVector< QgsMeshVertex > & QgsTriangularMesh::vertices ( ) const

Returns vertices in map CRS.

The list of consist of vertices from native mesh (0-N) and extra vertices needed to create triangles (N+1 - len)

Definition at line 148 of file qgstriangularmesh.cpp.


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