QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsMeshSimplificationSettings Class Reference

Represents a overview renderer settings. More...

#include <qgsmeshsimplificationsettings.h>

Public Member Functions

bool isEnabled () const
 Returns if the overview is active. More...
 
int meshResolution () const
 Returns the mesh resolution e.i., the minimum size (average) of triangles in pixels. More...
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context)
 Reads configuration from the given DOM element. More...
 
double reductionFactor () const
 Returns the reduction factor used to build simplified mesh. More...
 
void setEnabled (bool isEnabled)
 Sets if the overview is active. More...
 
void setMeshResolution (int meshResolution)
 Sets the mesh resolution e.i., the minimum size (average) of triangles in pixels This value is used during map rendering to choose the most appropriate mesh from he list of simplified mesh. More...
 
void setReductionFactor (double value)
 Sets the reduction factor used to build simplified mesh. More...
 
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const
 Writes configuration to a new DOM element. More...
 

Detailed Description

Represents a overview renderer settings.

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

Definition at line 39 of file qgsmeshsimplificationsettings.h.

Member Function Documentation

◆ isEnabled()

bool QgsMeshSimplificationSettings::isEnabled ( ) const

Returns if the overview is active.

Definition at line 20 of file qgsmeshsimplificationsettings.cpp.

◆ meshResolution()

int QgsMeshSimplificationSettings::meshResolution ( ) const

Returns the mesh resolution e.i., the minimum size (average) of triangles in pixels.

Definition at line 58 of file qgsmeshsimplificationsettings.cpp.

◆ readXml()

void QgsMeshSimplificationSettings::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)

Reads configuration from the given DOM element.

Definition at line 50 of file qgsmeshsimplificationsettings.cpp.

◆ reductionFactor()

double QgsMeshSimplificationSettings::reductionFactor ( ) const

Returns the reduction factor used to build simplified mesh.

Definition at line 30 of file qgsmeshsimplificationsettings.cpp.

◆ setEnabled()

void QgsMeshSimplificationSettings::setEnabled ( bool  isEnabled)

Sets if the overview is active.

Definition at line 25 of file qgsmeshsimplificationsettings.cpp.

◆ setMeshResolution()

void QgsMeshSimplificationSettings::setMeshResolution ( int  meshResolution)

Sets the mesh resolution e.i., the minimum size (average) of triangles in pixels This value is used during map rendering to choose the most appropriate mesh from he list of simplified mesh.

The first mesh which has its average triangle size greater this value will be chosen.

Definition at line 63 of file qgsmeshsimplificationsettings.cpp.

◆ setReductionFactor()

void QgsMeshSimplificationSettings::setReductionFactor ( double  value)

Sets the reduction factor used to build simplified mesh.

The triangles count of the simplified mesh equals apromativly the triangles count of base mesh divised by this factor. This reduction factor is used for simplification of each successive simplified mesh. For example, if the base mesh has 5M faces, and the reduction factor is 10, the first simplified mesh will have approximativly 500 000 faces, the second 50 000 faces, the third 5000, ... If highter reduction factor leads to simpler meshes, it produces also fewer levels of detail. The reduction factor has to be strictly greater than 1. If not, the simplification processus will render nothing.

Definition at line 35 of file qgsmeshsimplificationsettings.cpp.

◆ writeXml()

QDomElement QgsMeshSimplificationSettings::writeXml ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const

Writes configuration to a new DOM element.

Definition at line 40 of file qgsmeshsimplificationsettings.cpp.


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