QGIS API Documentation
3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
src
3d
qgsmeshlayer3drenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmeshlayer3drenderer.h
3
------------------------
4
Date : January 2019
5
Copyright : (C) 2019 by Peter Petrik
6
Email : zilolv 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 QGSMESHLAYER3DRENDERER_H
17
#define QGSMESHLAYER3DRENDERER_H
18
19
#include "qgis_3d.h"
20
21
#include "
qgs3drendererregistry.h
"
22
#include "
qgsabstract3drenderer.h
"
23
#include "
qgsmesh3dsymbol.h
"
24
25
#include "
qgsphongmaterialsettings.h
"
26
#include "
qgsmaplayerref.h
"
27
28
#include <QObject>
29
30
#define SIP_NO_FILE
31
32
class
QgsMeshLayer
;
33
34
44
class
_3D_EXPORT
QgsMeshLayer3DRendererMetadata
:
public
Qgs3DRendererAbstractMetadata
45
{
46
public
:
47
QgsMeshLayer3DRendererMetadata
();
48
50
QgsAbstract3DRenderer
*
createRenderer
( QDomElement &elem,
const
QgsReadWriteContext
&context )
override
SIP_FACTORY
;
51
};
52
53
59
class
_3D_EXPORT
QgsMeshLayer3DRenderer
:
public
QgsAbstract3DRenderer
60
{
61
public
:
63
explicit
QgsMeshLayer3DRenderer
(
QgsMesh3DSymbol
*s
SIP_TRANSFER
=
nullptr
);
64
66
void
setLayer(
QgsMeshLayer
*layer );
68
QgsMeshLayer
*layer()
const
;
69
71
void
setSymbol(
QgsMesh3DSymbol
*symbol
SIP_TRANSFER
);
73
const
QgsMesh3DSymbol
*symbol()
const
;
74
75
QString
type
()
const override
{
return
"mesh"
; }
76
QgsMeshLayer3DRenderer
*clone() const override
SIP_FACTORY
;
77
Qt3DCore
::QEntity *createEntity(
Qgs3DMapSettings
*map ) const override
SIP_SKIP
;
78
79
void
writeXml( QDomElement &elem, const
QgsReadWriteContext
&context ) const override;
80
void
readXml( const QDomElement &elem, const
QgsReadWriteContext
&context ) override;
81
void
resolveReferences( const
QgsProject
&project ) override;
82
83
84
private:
85
QgsMapLayerRef
mLayerRef;
86
std::unique_ptr<
QgsMesh3DSymbol
> mSymbol;
87
88
private:
89
#ifdef SIP_RUN
90
QgsMeshLayer3DRenderer
(
const
QgsMeshLayer3DRenderer
& );
91
QgsMeshLayer3DRenderer
&operator=(
const
QgsMeshLayer3DRenderer
& );
92
#endif
93
};
94
95
#endif
// QGSMESHLAYER3DRENDERER_H
Qgs3DMapSettings
3
Definition
qgs3dmapsettings.h:55
Qgs3DRendererAbstractMetadata
Base metadata class for 3D renderers.
Definition
qgs3drendererregistry.h:34
Qgs3DRendererAbstractMetadata::createRenderer
virtual QgsAbstract3DRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context)=0
Returns new instance of the renderer given the DOM element.
QgsAbstract3DRenderer
Base class for all renderers that may to participate in 3D view.
Definition
qgsabstract3drenderer.h:48
QgsMesh3DSymbol
3
Definition
qgsmesh3dsymbol.h:44
QgsMeshLayer3DRendererMetadata
Metadata for mesh layer 3D renderer to allow creation of its instances from XML.
Definition
qgsmeshlayer3drenderer.h:45
QgsMeshLayer3DRenderer
3D renderer that renders all mesh triangles of a mesh layer.
Definition
qgsmeshlayer3drenderer.h:60
QgsMeshLayer3DRenderer::type
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
Definition
qgsmeshlayer3drenderer.h:75
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition
qgsmeshlayer.h:101
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:107
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
Qt3DCore
Definition
qgsabstract3drenderer.h:31
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgs3drendererregistry.h
qgsabstract3drenderer.h
qgsmaplayerref.h
qgsmesh3dsymbol.h
qgsphongmaterialsettings.h
_LayerRef< QgsMapLayer >
Generated on Sun Nov 10 2024 14:15:43 for QGIS API Documentation by
1.9.8