QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
qgsmeshterrainsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshterrainsettings.h
3 --------------------------------------
4 Date : August 2024
5 Copyright : (C) 2024 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSMESHTERRAINSETTINGS_H
17#define QGSMESHTERRAINSETTINGS_H
18
19#include "qgis_3d.h"
20#include "qgis_sip.h"
22#include "qgsmaplayerref.h"
23
24class QDomElement;
26class QgsProject;
27class QgsMeshLayer;
28class QgsMesh3DSymbol;
29
40{
41 public:
46
50 QString type() const final;
51 void readXml( const QDomElement &element, const QgsReadWriteContext &context ) final;
52 void writeXml( QDomElement &element, const QgsReadWriteContext &context ) const final;
53 void resolveReferences( const QgsProject *project ) final;
54 bool equals( const QgsAbstractTerrainSettings *other ) const final;
55 std::unique_ptr<QgsTerrainGenerator> createTerrainGenerator( const Qgs3DRenderContext &context ) const override SIP_SKIP;
56
62
68 QgsMeshLayer *layer() const;
69
75 QgsMesh3DSymbol *symbol() const;
76
83
84 private:
85#ifdef SIP_RUN
87#endif
88 QgsMapLayerRef mLayer;
89 std::unique_ptr<QgsMesh3DSymbol> mSymbol;
90};
91
92
93#endif // QGSMESHTERRAINSETTINGS_H
Rendering context for preparation of 3D entities.
Base class for all terrain settings classes.
virtual QgsAbstractTerrainSettings * clone() const =0
Returns a copy of the terrain settings.
3D symbol that draws mesh geometry as planar triangles.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
bool equals(const QgsAbstractTerrainSettings *other) const final
Returns true if this settings is exactly equal to another other settings.
void resolveReferences(const QgsProject *project) final
After reading settings from XML, resolves references to any layers in a project that have been read a...
void setSymbol(QgsMesh3DSymbol *symbol)
Sets the symbol used to render the mesh as terrain.
QString type() const final
Returns the unique type name for the terrain generator.
void readXml(const QDomElement &element, const QgsReadWriteContext &context) final
Reads settings from a DOM element.
QgsMeshLayer * layer() const
Returns the mesh layer with elevation model to be used for terrain generation.
QgsMesh3DSymbol * symbol() const
Returns the symbol used to render the mesh as terrain.
~QgsMeshTerrainSettings() override
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const final
Writes settings to a DOM element.
static QgsAbstractTerrainSettings * create()
Creates a new instance of a QgsMeshTerrainSettings object.
void setLayer(QgsMeshLayer *layer)
Sets the mesh layer with elevation model to be used for terrain generation.
std::unique_ptr< QgsTerrainGenerator > createTerrainGenerator(const Qgs3DRenderContext &context) const override
Creates a new instance of a terrain generator which matches the terrain settings.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:109
A container for the context for various read/write operations on objects.
Base class for generators of terrain.
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:84
_LayerRef< QgsMapLayer > QgsMapLayerRef