QGIS API Documentation 3.99.0-Master (18a1e75d814)
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
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 "qgs3dmapsceneentity.h"
31#include "qgs3drendercontext.h"
32#include "qgschunkedentity.h"
35
36#define SIP_NO_FILE
37
38class QgsAABB;
39class QgsChunkBoundsEntity;
41class QgsVirtualPointCloudProvider;
44
45
56class QgsVirtualPointCloudEntity : public Qgs3DMapSceneEntity
57{
58 Q_OBJECT
59 public:
61 QgsVirtualPointCloudEntity( Qgs3DMapSettings *map, QgsPointCloudLayer *layer, const QgsCoordinateTransform &coordinateTransform, QgsPointCloud3DSymbol *symbol, float maxScreenError, bool showBoundingBoxes, double zValueScale, double zValueOffset, int pointBudget );
62
64 ~QgsVirtualPointCloudEntity() override;
65
67 void handleSceneUpdate( const SceneContext &sceneContext ) override;
68
69 QgsRange<float> getNearFarPlaneRange( const QMatrix4x4 &viewMatrix ) const override;
70
71 int pendingJobsCount() const override;
72
73 bool needsUpdate() const override;
74
75 public slots:
77 void createChunkedEntityForSubIndex( int i );
78
80 void setRenderSubIndexAsBbox( int i, bool asBbox );
81
82 signals:
83 void subIndexNeedsLoading( int i );
84
85 private:
87 void updateBboxEntity();
88
90 QList<QgsChunkedEntity *> chunkedEntities() const;
91
93 QgsVirtualPointCloudProvider *provider() const;
94
95 QgsPointCloudLayer *mLayer = nullptr;
96 QMap<int, QgsChunkedEntity *> mChunkedEntitiesMap;
97 QgsChunkBoundsEntity *mBboxesEntity = nullptr;
98 QgsPointCloudLayerChunkedEntity *mOverviewEntity = nullptr;
99 QList<QgsBox3D> mBboxes;
100 QgsCoordinateTransform mCoordinateTransform;
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
Definition of the world.
Axis-aligned bounding box - in world coords.
Definition qgsaabb.h:33
3D symbol that draws point cloud geometries as 3D objects.
Represents a map layer supporting display of point clouds.