QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
26
27
35{
36 public:
38
40 QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) override SIP_FACTORY;
41};
42
43
51{
52#ifdef SIP_RUN
54 if ( sipCpp->type() == QLatin1String( "tiledscene" ) )
55 {
56 sipType = sipType_QgsTiledSceneLayer3DRenderer;
57 }
58 else
59 {
60 sipType = 0;
61 }
63#endif
64
65 public:
67
72
80 double maximumScreenError() const;
81
89 void setMaximumScreenError( double error );
90
96 bool showBoundingBoxes() const;
97
104
105 QString type() const override { return "tiledscene"; }
106 QgsAbstract3DRenderer *clone() const override SIP_FACTORY;
107 Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
108 void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
109 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
110 void resolveReferences( const QgsProject &project ) override;
111
112 private:
113 QgsMapLayerRef mLayerRef;
114 double mMaximumScreenError = 16.0;
115 bool mShowBoundingBoxes = false;
116
117 private:
118#ifdef SIP_RUN
121#endif
122};
123
124#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:109
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