QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsline3dsymbol_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsline3dsymbol_p.h
3  --------------------------------------
4  Date : July 2017
5  Copyright : (C) 2017 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 QGSLINE3DSYMBOL_P_H
17 #define QGSLINE3DSYMBOL_P_H
18 
20 
21 //
22 // W A R N I N G
23 // -------------
24 //
25 // This file is not part of the QGIS API. It exists purely as an
26 // implementation detail. This header file may change from version to
27 // version without notice, or even be removed.
28 //
29 
30 #include <Qt3DCore/QEntity>
31 #include <Qt3DExtras/QPhongMaterial>
32 #include <Qt3DRender/QGeometryRenderer>
33 
34 class Qgs3DMapSettings;
36 class QgsLine3DSymbol;
37 
38 class QgsVectorLayer;
39 class QgsFeatureRequest;
40 
41 
43 class QgsLine3DSymbolEntity : public Qt3DCore::QEntity
44 {
45  public:
46  QgsLine3DSymbolEntity( const Qgs3DMapSettings &map, QgsVectorLayer *layer, const QgsLine3DSymbol &symbol, Qt3DCore::QNode *parent = nullptr );
47 
48  private:
49  void addEntityForSelectedLines( const Qgs3DMapSettings &map, QgsVectorLayer *layer, const QgsLine3DSymbol &symbol );
50  void addEntityForNotSelectedLines( const Qgs3DMapSettings &map, QgsVectorLayer *layer, const QgsLine3DSymbol &symbol );
51 
52  Qt3DExtras::QPhongMaterial *material( const QgsLine3DSymbol &symbol ) const;
53 };
54 
55 class QgsLine3DSymbolEntityNode : public Qt3DCore::QEntity
56 {
57  public:
58  QgsLine3DSymbolEntityNode( const Qgs3DMapSettings &map, QgsVectorLayer *layer, const QgsLine3DSymbol &symbol, const QgsFeatureRequest &req, Qt3DCore::QNode *parent = nullptr );
59 
60  private:
61  Qt3DRender::QGeometryRenderer *renderer( const Qgs3DMapSettings &map, const QgsLine3DSymbol &symbol, const QgsVectorLayer *layer, const QgsFeatureRequest &req );
62  Qt3DRender::QGeometryRenderer *rendererSimple( const Qgs3DMapSettings &map, const QgsLine3DSymbol &symbol, const QgsVectorLayer *layer, const QgsFeatureRequest &request );
63 
64  QgsTessellatedPolygonGeometry *mGeometry = nullptr;
65 };
66 
68 
69 #endif // QGSLINE3DSYMBOL_P_H
3 Definition of the world
3 Class derived from Qt3DRender::QGeometry that represents polygons tessellated into 3D geometry...
This class wraps a request for features to a vector layer (or directly its vector data provider)...
3 3D symbol that draws linestring geometries as planar polygons (created from lines using a buffer wi...
Represents a vector layer which manages a vector based data sets.