QGIS API Documentation 3.99.0-Master (09f76ad7019)
Loading...
Searching...
No Matches
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
31#include "qgs3dmapsceneentity.h"
32#include "qgs3drendercontext.h"
33#include "qgschunkedentity.h"
36
37class QgsAABB;
38class QgsChunkBoundsEntity;
40class QgsVirtualPointCloudProvider;
43
44
55class QgsVirtualPointCloudEntity : public Qgs3DMapSceneEntity
56{
57 Q_OBJECT
58 public:
60 QgsVirtualPointCloudEntity( Qgs3DMapSettings *map, QgsPointCloudLayer *layer, const QgsCoordinateTransform &coordinateTransform, QgsPointCloud3DSymbol *symbol, float maxScreenError, bool showBoundingBoxes, double zValueScale, double zValueOffset, int pointBudget );
61
63 ~QgsVirtualPointCloudEntity() override;
64
66 void handleSceneUpdate( const SceneContext &sceneContext ) override;
67
68 QgsRange<float> getNearFarPlaneRange( const QMatrix4x4 &viewMatrix ) const override;
69
70 int pendingJobsCount() const override;
71
72 bool needsUpdate() const override;
73
74 public slots:
76 void createChunkedEntityForSubIndex( int i );
77
79 void setRenderSubIndexAsBbox( int i, bool asBbox );
80
81 signals:
82 void subIndexNeedsLoading( int i );
83
84 private:
86 void updateBboxEntity();
87
89 QList<QgsChunkedEntity *> chunkedEntities() const;
90
92 QgsVirtualPointCloudProvider *provider() const;
93
94 QgsPointCloudLayer *mLayer = nullptr;
95 QMap<int, QgsChunkedEntity *> mChunkedEntitiesMap;
96 QgsChunkBoundsEntity *mBboxesEntity = nullptr;
97 QgsPointCloudLayerChunkedEntity *mOverviewEntity = nullptr;
98 QList<QgsBox3D> mBboxes;
99 QgsCoordinateTransform mCoordinateTransform;
100 std::unique_ptr<QgsPointCloud3DSymbol> mSymbol;
101 double mZValueScale = 1.0;
102 double mZValueOffset = 0;
103 int mPointBudget = 1000000;
104 float mMaximumScreenSpaceError = -1.;
105 bool mShowBoundingBoxes = false;
106};
107
109
110#endif // QGSVIRTUALPOINTCLOUDENTITY_P_H
Definition of the world.
Axis-aligned bounding box - in world coords.
Definition qgsaabb.h:35
Handles coordinate transforms between two coordinate systems.
3D symbol that draws point cloud geometries as 3D objects.
Represents a map layer supporting display of point clouds.
A template based class for storing ranges (lower to upper values).
Definition qgsrange.h:49