QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
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
29
37{
38 public:
40
42 QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
43};
44
45
53{
54
55#ifdef SIP_RUN
57 if ( sipCpp->type() == QLatin1String( "tiledscene" ) )
58 {
59 sipType = sipType_QgsTiledSceneLayer3DRenderer;
60 }
61 else
62 {
63 sipType = 0;
64 }
66#endif
67
68 public:
70
72 void setLayer( QgsTiledSceneLayer *layer );
74 QgsTiledSceneLayer *layer() const;
75
83 double maximumScreenError() const;
84
92 void setMaximumScreenError( double error );
93
99 bool showBoundingBoxes() const;
100
106 void setShowBoundingBoxes( bool showBoundingBoxes );
107
108 virtual QString type() const override { return "tiledscene"; }
109 virtual QgsAbstract3DRenderer *clone() const override SIP_FACTORY;
110 virtual Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
111 virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
112 virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
113 virtual void resolveReferences( const QgsProject &project ) override;
114
115 private:
116 QgsMapLayerRef mLayerRef;
117 double mMaximumScreenError = 16.0;
118 bool mShowBoundingBoxes = false;
119
120 private:
121#ifdef SIP_RUN
124#endif
125};
126
127#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