16#ifndef QGSDEMTERRAINTILELOADER_P_H
17#define QGSDEMTERRAINTILELOADER_P_H
32#include <QtConcurrent/QtConcurrentRun>
33#include <QFutureWatcher>
34#include <QElapsedTimer>
52class QgsDemTerrainTileLoader :
public QgsTerrainTileLoader
57 QgsDemTerrainTileLoader( QgsTerrainEntity *terrain, QgsChunkNode *node,
QgsTerrainGenerator *terrainGenerator );
59 Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent )
override;
62 void onHeightMapReady(
int jobId,
const QByteArray &heightMap );
66 QByteArray mHeightMap;
78class QgsDemHeightMapGenerator :
public QObject
87 ~QgsDemHeightMapGenerator()
override;
90 int render(
const QgsChunkNodeId &nodeId );
93 void waitForFinished();
96 int resolution()
const {
return mResolution; }
99 float heightAt(
double x,
double y );
103 void heightMapReady(
int jobId,
const QByteArray &heightMap );
106 void onFutureFinished();
121 std::unique_ptr<QgsTerrainDownloader> mDownloader;
126 QgsChunkNodeId tileId;
128 QFuture<QByteArray> future;
132 QHash<QFutureWatcher<QByteArray> *, JobData> mJobs;
134 void lazyLoadDtmCoarseData(
int res,
const QgsRectangle &rect );
135 mutable QMutex mLazyLoadDtmCoarseDataMutex;
137 QByteArray mDtmCoarseData;
Contains information about the context in which a coordinate transform is executed.
Base class for raster data providers.
Represents a raster layer.
A rectangle specified with double values.