QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgstiledscenelayer3drenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledscenelayer3drenderer.h
3 --------------------------------------
4 Date : July 2023
5 Copyright : (C) 2023 by Martin Dobias
6 Email : wonder dot sk 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 QGSTILEDSCENELAYER3DRENDERER_H
17#define QGSTILEDSCENELAYER3DRENDERER_H
18
19#include "qgis_3d.h"
20#include "qgis_sip.h"
21
24#include "qgsmaplayerref.h"
25
27
28
36{
37 public:
39
41 QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
42};
43
44
52{
53#ifdef SIP_RUN
55 if ( sipCpp->type() == QLatin1String( "tiledscene" ) )
56 {
57 sipType = sipType_QgsTiledSceneLayer3DRenderer;
58 }
59 else
60 {
61 sipType = 0;
62 }
64#endif
65
66 public:
68
70 void setLayer( QgsTiledSceneLayer *layer );
72 QgsTiledSceneLayer *layer() const;
73
81 double maximumScreenError() const;
82
90 void setMaximumScreenError( double error );
91
97 bool showBoundingBoxes() const;
98
104 void setShowBoundingBoxes( bool showBoundingBoxes );
105
106 virtual QString type() const override { return "tiledscene"; }
107 virtual QgsAbstract3DRenderer *clone() const override SIP_FACTORY;
108 virtual Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
109 virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
110 virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
111 virtual void resolveReferences( const QgsProject &project ) override;
112
113 private:
114 QgsMapLayerRef mLayerRef;
115 double mMaximumScreenError = 16.0;
116 bool mShowBoundingBoxes = false;
117
118 private:
119#ifdef SIP_RUN
122#endif
123};
124
125#endif
Base metadata class for 3D renderers.
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
Base class for all renderers that may to participate in 3D view.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
The class is used as a container of context for various read/write operations on other objects.
virtual QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
Represents a map layer supporting display of tiled scene objects.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_END
Definition qgis_sip.h:208