QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsMeshSimplificationSettings Class Reference

Represents an 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 i.e., 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 i.e., the minimum size (average) of triangles in pixels This value is used during map rendering to choose the most appropriate mesh from the list of simplified meshes. 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 an 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 i.e., 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 i.e., the minimum size (average) of triangles in pixels This value is used during map rendering to choose the most appropriate mesh from the list of simplified meshes.

The first mesh which has its average triangle size greater than 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 approximately the triangles count of base mesh divided 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 approximately 500 000 faces, the second 50 000 faces, the third 5000, ... If higher 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: