QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
3 More...
#include <qgsdemterrainsettings.h>
Public Member Functions | |
QgsDemTerrainSettings * | clone () const final |
Returns a copy of the terrain settings. | |
std::unique_ptr< QgsTerrainGenerator > | createTerrainGenerator (const Qgs3DRenderContext &context) const override |
Creates a new instance of a terrain generator which matches the terrain settings. | |
bool | equals (const QgsAbstractTerrainSettings *other) const final |
Returns true if this settings is exactly equal to another other settings. | |
QgsRasterLayer * | layer () const |
Returns the raster layer with elevation model to be used for terrain generation. | |
void | readXml (const QDomElement &element, const QgsReadWriteContext &context) final |
Reads settings from a DOM element. | |
int | resolution () const |
Returns the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile). | |
void | resolveReferences (const QgsProject *project) final |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs. | |
void | setLayer (QgsRasterLayer *layer) |
Sets the raster layer with elevation model to be used for terrain generation. | |
void | setResolution (int resolution) |
Sets the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile). | |
void | setSkirtHeight (double height) |
Sets the skirt height (in world units). | |
double | skirtHeight () const |
Returns the skirt height (in world units). | |
QString | type () const final |
Returns the unique type name for the terrain generator. | |
void | writeXml (QDomElement &element, const QgsReadWriteContext &context) const final |
Writes settings to a DOM element. | |
Public Member Functions inherited from QgsAbstractTerrainSettings | |
virtual | ~QgsAbstractTerrainSettings () |
double | elevationOffset () const |
Returns the elevation offset of the terrain (used to move the terrain up or down). | |
int | mapTileResolution () const |
Returns the resolution (in pixels) of the texture of a terrain tile. | |
double | maximumGroundError () const |
Returns the maximum ground error of terrain tiles in world units. | |
double | maximumScreenError () const |
Returns the maximum allowed screen error of terrain tiles in pixels. | |
void | setElevationOffset (double offset) |
Sets the terrain elevation offset (used to move the terrain up or down). | |
void | setMapTileResolution (int resolution) |
Sets the resolution (in pixels) of the texture of a terrain tile. | |
void | setMaximumGroundError (double error) |
Sets the maximum ground error of terrain tiles in world units. | |
void | setMaximumScreenError (double error) |
Sets the maximum allowed screen error of terrain tiles in pixels. | |
void | setVerticalScale (double scale) |
Sets the vertical scale (exaggeration) for terrain. | |
double | verticalScale () const |
Returns the vertical scale (exaggeration) for terrain. | |
Static Public Member Functions | |
static QgsAbstractTerrainSettings * | create () |
Creates a new instance of a QgsDemTerrainSettings object. | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsAbstractTerrainSettings | |
void | copyCommonProperties (const QgsAbstractTerrainSettings *source) |
Copies common properties from a source object. | |
bool | equalsCommon (const QgsAbstractTerrainSettings *other) const |
Returns true if common base class settings from other match this object. | |
void | readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context) |
Reads common properties from the base class from the given DOM element. | |
void | writeCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const |
Writes common properties from the base class into an XML element. | |
3
Terrain settings for a terrain generator that uses a raster DEM layer to build terrain.
Definition at line 35 of file qgsdemterrainsettings.h.
|
finalvirtual |
Returns a copy of the terrain settings.
Implements QgsAbstractTerrainSettings.
Definition at line 26 of file qgsdemterrainsettings.cpp.
|
static |
Creates a new instance of a QgsDemTerrainSettings object.
Definition at line 21 of file qgsdemterrainsettings.cpp.
|
overridevirtual |
Creates a new instance of a terrain generator which matches the terrain settings.
Implements QgsAbstractTerrainSettings.
Definition at line 83 of file qgsdemterrainsettings.cpp.
|
finalvirtual |
Returns true
if this settings is exactly equal to another other settings.
Implements QgsAbstractTerrainSettings.
Definition at line 69 of file qgsdemterrainsettings.cpp.
QgsRasterLayer * QgsDemTerrainSettings::layer | ( | ) | const |
Returns the raster layer with elevation model to be used for terrain generation.
Definition at line 99 of file qgsdemterrainsettings.cpp.
|
finalvirtual |
Reads settings from a DOM element.
Subclasses should take care to call readCommonProperties() to read common properties from the element.
Implements QgsAbstractTerrainSettings.
Definition at line 36 of file qgsdemterrainsettings.cpp.
|
inline |
Returns the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).
Definition at line 76 of file qgsdemterrainsettings.h.
|
finalvirtual |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.
Reimplemented from QgsAbstractTerrainSettings.
Definition at line 64 of file qgsdemterrainsettings.cpp.
void QgsDemTerrainSettings::setLayer | ( | QgsRasterLayer * | layer | ) |
Sets the raster layer with elevation model to be used for terrain generation.
Definition at line 94 of file qgsdemterrainsettings.cpp.
|
inline |
Sets the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).
Definition at line 69 of file qgsdemterrainsettings.h.
|
inline |
Sets the skirt height (in world units).
Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
Definition at line 85 of file qgsdemterrainsettings.h.
|
inline |
Returns the skirt height (in world units).
Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.
Definition at line 94 of file qgsdemterrainsettings.h.
|
finalvirtual |
Returns the unique type name for the terrain generator.
Implements QgsAbstractTerrainSettings.
Definition at line 31 of file qgsdemterrainsettings.cpp.
|
finalvirtual |
Writes settings to a DOM element.
Subclasses should take care to call writeCommonProperties() to write common properties to the element.
Implements QgsAbstractTerrainSettings.
Definition at line 56 of file qgsdemterrainsettings.cpp.