QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
terrain
qgsterraintexturegenerator_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsterraintexturegenerator_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 QGSTERRAINTEXTUREGENERATOR_P_H
17
#define QGSTERRAINTEXTUREGENERATOR_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
31
class
QgsMapRendererSequentialJob
;
32
class
QgsMapSettings
;
33
class
QgsProject
;
34
class
QgsRasterLayer
;
35
36
#include "
qgschunknode.h
"
37
#include "
qgsrectangle.h
"
38
39
#include <QFuture>
40
#include <QFutureWatcher>
41
#include <QImage>
42
#include <QObject>
43
#include <QSize>
44
45
#define SIP_NO_FILE
46
47
class
Qgs3DMapSettings
;
48
59
class
QgsTerrainTextureGenerator :
public
QObject
60
{
61
Q_OBJECT
62
public
:
64
QgsTerrainTextureGenerator(
const
Qgs3DMapSettings &map );
65
69
QFuture<QImage> render(
const
QgsRectangle &extent, QgsChunkNodeId nodeId,
const
QString &debugText = QString() );
70
72
QSize textureSize()
const
{
return
mTextureSize; }
74
void
setTextureSize( QSize textureSize ) { mTextureSize = textureSize; }
75
76
private
slots:
77
void
onRenderingFinished();
78
79
private
:
80
QgsMapSettings baseMapSettings();
81
82
const
Qgs3DMapSettings &mMap;
83
84
struct
JobData
85
{
86
QgsChunkNodeId tileId;
87
QgsMapRendererSequentialJob *job =
nullptr
;
88
QgsRectangle extent;
89
QString debugText;
90
QPromise<QImage> promise;
91
QFutureWatcher<QImage> watcher;
92
};
93
94
std::unordered_map<QgsMapRendererSequentialJob *, std::unique_ptr<JobData>> mJobs;
95
QSize mTextureSize;
96
};
97
99
100
#endif
// QGSTERRAINTEXTUREGENERATOR_P_H
Qgs3DMapSettings
Definition of the world.
Definition
qgs3dmapsettings.h:59
QgsMapRendererSequentialJob
Job implementation that renders everything sequentially in one thread.
Definition
qgsmaprenderersequentialjob.h:33
QgsMapSettings
Contains configuration for rendering maps.
Definition
qgsmapsettings.h:91
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:82
qgschunknode.h
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0