QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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 SceneState &state ) 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 private:
80 void updateBboxEntity();
81
83 QList<QgsChunkedEntity *> chunkedEntities() const;
84
86 QgsVirtualPointCloudProvider *provider() const;
87
89 QgsAABB boundingBox( int i ) const;
90
91 QgsPointCloudLayer *mLayer = nullptr;
92 QMap<int, QgsChunkedEntity *> mChunkedEntitiesMap;
93 QgsChunkBoundsEntity *mBboxesEntity = nullptr;
94 QList<QgsAABB> mBboxes;
95 const Qgs3DMapSettings &mMap;
96 QgsCoordinateTransform mCoordinateTransform;
97 QgsPointCloudIndex *mPointCloudIndex;
98 std::unique_ptr< QgsPointCloud3DSymbol > mSymbol;
99 double mZValueScale = 1.0;
100 double mZValueOffset = 0;
101 int mPointBudget = 1000000;
102 float mMaximumScreenSpaceError = -1.;
103 bool mShowBoundingBoxes = false;
104};
105
107
108#endif // QGSVIRTUALPOINTCLOUDENTITY_P_H
3
Definition: qgsaabb.h:34
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:47