QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgsvirtualpointcloudentity_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvirtualpointcloudentity_p.h
3 --------------------------------------
4 Date : April 2023
5 Copyright : (C) 2023 by Stefanos Natsis
6 Email : uclaros 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 QGSVIRTUALPOINTCLOUDENTITY_P_H
17#define QGSVIRTUALPOINTCLOUDENTITY_P_H
18
19#define SIP_NO_FILE
21
22//
23// W A R N I N G
24// -------------
25//
26// This file is not part of the QGIS API. It exists purely as an
27// implementation detail. This header file may change from version to
28// version without notice, or even be removed.
29//
30
32#include "qgschunkedentity_p.h"
34
35class QgsAABB;
36class QgsChunkBoundsEntity;
39class QgsVirtualPointCloudProvider;
42
43
54class QgsVirtualPointCloudEntity : public Qgs3DMapSceneEntity
55{
56 Q_OBJECT
57 public:
59 QgsVirtualPointCloudEntity( QgsPointCloudLayer *layer, const Qgs3DMapSettings &map, const QgsCoordinateTransform &coordinateTransform, QgsPointCloud3DSymbol *symbol, float maxScreenError, bool showBoundingBoxes,
60 double zValueScale, double zValueOffset, int pointBudget );
61
63 void handleSceneUpdate( const SceneContext &sceneContext ) override;
64
65 QgsRange<float> getNearFarPlaneRange( const QMatrix4x4 &viewMatrix ) const override;
66
67 int pendingJobsCount() const override;
68
69 bool needsUpdate() const override;
70
71 public slots:
73 void createChunkedEntityForSubIndex( int i );
74
76 void setRenderSubIndexAsBbox( int i, bool asBbox );
77
78 signals:
79 void subIndexNeedsLoading( int i );
80
81 private:
83 void updateBboxEntity();
84
86 QList<QgsChunkedEntity *> chunkedEntities() const;
87
89 QgsVirtualPointCloudProvider *provider() const;
90
92 QgsAABB boundingBox( int i ) const;
93
94 QgsPointCloudLayer *mLayer = nullptr;
95 QMap<int, QgsChunkedEntity *> mChunkedEntitiesMap;
96 QgsChunkBoundsEntity *mBboxesEntity = nullptr;
97 QList<QgsAABB> mBboxes;
98 const Qgs3DMapSettings &mMap;
99 QgsCoordinateTransform mCoordinateTransform;
100 QgsPointCloudIndex *mPointCloudIndex;
101 std::unique_ptr< QgsPointCloud3DSymbol > mSymbol;
102 double mZValueScale = 1.0;
103 double mZValueOffset = 0;
104 int mPointBudget = 1000000;
105 float mMaximumScreenSpaceError = -1.;
106 bool mShowBoundingBoxes = false;
107};
108
110
111#endif // QGSVIRTUALPOINTCLOUDENTITY_P_H
3
Definition: qgsaabb.h:33
Class for doing transforms between two map coordinate systems.
Represents a indexed point clouds data in octree.
Represents a map layer supporting display of point clouds.
A template based class for storing ranges (lower to upper values).
Definition: qgsrange.h:46