QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsfeature3dhandler_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfeature3dhandler_p.h
3 --------------------------------------
4 Date : January 2019
5 Copyright : (C) 2019 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 QGSFEATURE3DHANDLER_P_H
17#define QGSFEATURE3DHANDLER_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
32class QgsFeature;
33
34#include "qgs3drendercontext.h"
35
36#define SIP_NO_FILE
37
38
43class QgsFeature3DHandler
44{
45 public:
46 virtual ~QgsFeature3DHandler() = default;
47
52 virtual bool prepare( const Qgs3DRenderContext &context, QSet<QString> &attributeNames, const QgsVector3D &chunkOrigin ) = 0;
53
58 virtual void processFeature( const QgsFeature &feature, const Qgs3DRenderContext &context ) = 0;
59
64 virtual void finalize( Qt3DCore::QEntity *parent, const Qgs3DRenderContext &context ) = 0;
65
70 float zMinimum() const { return mZMin; }
71
76 float zMaximum() const { return mZMax; }
77
81 int featureCount() const { return mFeatureCount; }
82
83 protected:
85 void updateZRangeFromPositions( const QVector<QVector3D> &positions );
86
87 protected:
88 float mZMin = std::numeric_limits<float>::max();
89 float mZMax = std::numeric_limits<float>::lowest();
90 int mFeatureCount = 0;
91};
92
93
95
96#endif // QGSFEATURE3DHANDLER_P_H
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
Definition qgsvector3d.h:31