QGIS API Documentation  3.8.0-Zanzibar (11aff65)
qgsterraintileloader_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsterraintileloader_p.h
3  --------------------------------------
4  Date : July 2017
5  Copyright : (C) 2017 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 QGSTERRAINTILELOADER_P_H
17 #define QGSTERRAINTILELOADER_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 "qgschunkloader_p.h"
31 
32 #include <QImage>
33 #include "qgsrectangle.h"
34 
36 class QgsTerrainEntity;
37 class QgsTerrainTileEntity;
38 
39 
46 class QgsTerrainTileLoader : public QgsChunkLoader
47 {
48  Q_OBJECT
49 
50  public:
52  QgsTerrainTileLoader( QgsTerrainEntity *terrain, QgsChunkNode *mNode );
53 
54  protected:
56  void loadTexture();
58  void createTextureComponent( QgsTerrainTileEntity *entity, bool isShadingEnabled, const QgsPhongMaterialSettings &shadingMaterial );
60  QgsTerrainEntity *terrain() { return mTerrain; }
61 
62  private slots:
63  void onImageReady( int jobId, const QImage &image );
64 
65  private:
66  QgsTerrainEntity *mTerrain = nullptr;
67  QgsRectangle mExtentMapCrs;
68  QString mTileDebugText;
69  int mTextureJobId = -1;
70  QImage mTextureImage;
71 };
72 
74 
75 #endif // QGSTERRAINTILELOADER_P_H
A rectangle specified with double values.
Definition: qgsrectangle.h:41
3 Basic shading material used for rendering based on the Phong shading model with three color compone...