QGIS API Documentation 4.3.0-Master (16eddb2670e)
Loading...
Searching...
No Matches
qgsglobechunkedentity.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsglobechunkedentity.h
3 --------------------------------------
4 Date : March 2025
5 Copyright : (C) 2025 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 QGSGLOBECHUNKEDENTITY_H
17#define QGSGLOBECHUNKEDENTITY_H
18
19#include "qgis_3d.h"
20
21#define SIP_NO_FILE
22
24
25//
26// W A R N I N G
27// -------------
28//
29// This file is not part of the QGIS API. It exists purely as an
30// implementation detail. This header file may change from version to
31// version without notice, or even be removed.
32//
33
34
35#include "qgschunkedentity.h"
36#include "qgschunkloader.h"
38#include "qgsdistancearea.h"
39#include "qgs3drendercontext.h"
41#include "qgsvector3d.h"
42#include "qobjectuniqueptr.h"
43
44#include <QImage>
45
46class QgsMapLayer;
47class QgsTerrainTextureGenerator;
48class QgsLayerStyleWatcher;
49
50
51class QgsGlobeChunkLoader : public QgsChunkLoader
52{
53 Q_OBJECT
54 public:
55 QgsGlobeChunkLoader( Qgs3DMapSettings *mapSettings );
56
57 ~QgsGlobeChunkLoader() override;
58
59 QFuture<QgsChunkLoaderResult> loadChunk( QgsChunkNode *node ) override;
60 QFuture<QgsChunkLoaderResult> updateChunk( QgsChunkNode *node ) override;
61
62 QgsChunkNode *createRootNode() const override;
63
64 QFuture<QVector<QgsChunkNode *>> createChildren( QgsChunkNode *node ) override;
65
66 private:
67 Qgs3DMapSettings *mMapSettings = nullptr;
68 std::unique_ptr<QgsTerrainTextureGenerator> mTextureGenerator;
69 QgsDistanceArea mDistanceArea;
70 QgsCoordinateTransform mGlobeCrsToLatLon;
71 QgsVector3D mRadius;
72};
73
79class _3D_EXPORT QgsGlobeEntity : public QgsChunkedEntity
80{
81 Q_OBJECT
82
83 public:
84 QgsGlobeEntity( Qgs3DMapSettings *mapSettings );
85 ~QgsGlobeEntity() override;
86
87 QList<QgsRayCastHit> rayIntersection( const QgsRay3D &ray, const QgsRayCastContext &context ) const override;
88
89 private slots:
90 void invalidateMapImages();
91
92 private:
93 QObjectUniquePtr<QgsLayerStyleWatcher> mLayerWatcher = nullptr;
94};
95
96
98
99#endif // QGSGLOBECHUNKEDENTITY_H
Definition of the world.
Handles coordinate transforms between two coordinate systems.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Base class for all map layer types.
Definition qgsmaplayer.h:83
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:33