QGIS API Documentation 3.99.0-Master (e9821da5c6b)
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"
23#include "qgsmaplayerref.h"
24
25#include <QString>
26
27using namespace Qt::StringLiterals;
28
30
31
39{
40 public:
42
44 QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
45};
46
47
55{
56#ifdef SIP_RUN
58 if ( sipCpp->type() == "tiledscene"_L1 )
59 {
60 sipType = sipType_QgsTiledSceneLayer3DRenderer;
61 }
62 else
63 {
64 sipType = 0;
65 }
67#endif
68
69 public:
71
76
84 double maximumScreenError() const;
85
93 void setMaximumScreenError( double error );
94
100 bool showBoundingBoxes() const;
101
108
109 QString type() const override { return "tiledscene"; }
110 QgsAbstract3DRenderer *clone() const override SIP_FACTORY;
111 Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
112 void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
113 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
114 void resolveReferences( const QgsProject &project ) override;
115
116 private:
117 QgsMapLayerRef mLayerRef;
118 double mMaximumScreenError = 16.0;
119 bool mShowBoundingBoxes = false;
120
121 private:
122#ifdef SIP_RUN
125#endif
126};
127
128#endif
Definition of the world.
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
Qgs3DRendererAbstractMetadata(const QString &type)
Constructor of the base class.
Base class for all renderers that participate in 3D views.
QgsAbstract3DRenderer()=default
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:113
A container for the context for various read/write operations on objects.
3D renderer that renders content of a tiled scene layer.
QgsTiledSceneLayer * layer() const
Returns tiled scene layer associated with the renderer.
void setLayer(QgsTiledSceneLayer *layer)
Sets tiled scene layer associated with the renderer.
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass).
bool showBoundingBoxes() const
Returns whether bounding boxes will be visible when rendering the tiled scene.
double maximumScreenError() const
Returns the maximum screen error allowed when rendering the tiled scene.
void setShowBoundingBoxes(bool showBoundingBoxes)
Sets whether bounding boxes will be visible when rendering the tiled scene.
void setMaximumScreenError(double error)
Sets the maximum screen error allowed when rendering the tiled scene.
Represents a map layer supporting display of tiled scene objects.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:199
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_FACTORY
Definition qgis_sip.h:84
#define SIP_END
Definition qgis_sip.h:216
_LayerRef< QgsMapLayer > QgsMapLayerRef