QGIS API Documentation 4.1.0-Master (01362494303)
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 public:
58
63
71 double maximumScreenError() const;
72
80 void setMaximumScreenError( double error );
81
87 bool showBoundingBoxes() const;
88
95
96 QString type() const override { return "tiledscene"; }
97 QgsAbstract3DRenderer *clone() const override SIP_FACTORY;
98 Qt3DCore::QEntity *createEntity( Qgs3DMapSettings *map ) const override SIP_SKIP;
99 void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const override;
100 void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) override;
101 void resolveReferences( const QgsProject &project ) override;
102
103 private:
104 QgsMapLayerRef mLayerRef;
105 double mMaximumScreenError = 16.0;
106 bool mShowBoundingBoxes = false;
107
108 private:
109#ifdef SIP_RUN
112#endif
113};
114
115#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:114
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_SKIP
Definition qgis_sip.h:133
#define SIP_FACTORY
Definition qgis_sip.h:83
_LayerRef< QgsMapLayer > QgsMapLayerRef