QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
qgsflatterraingenerator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsflatterraingenerator.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 QGSFLATTERRAINGENERATOR_H
17#define QGSFLATTERRAINGENERATOR_H
18
19#include "qgis_3d.h"
20#include "qgsterraingenerator.h"
22
23#include <Qt3DExtras/QPlaneGeometry>
24
25#define SIP_NO_FILE
26
28
30class FlatTerrainChunkLoader : public QgsTerrainTileLoader
31{
32 Q_OBJECT
33
34 public:
36 FlatTerrainChunkLoader( QgsTerrainEntity *terrain, QgsChunkNode *mNode );
37
38 void start() override;
39
40 Qt3DCore::QEntity *createEntity( Qt3DCore::QEntity *parent ) override;
41
42 private:
43 Qt3DExtras::QPlaneGeometry *mTileGeometry = nullptr;
44};
45
47
54{
55 Q_OBJECT
56 public:
61
63
64 QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override SIP_FACTORY;
65
66 QgsTerrainGenerator *clone() const override SIP_FACTORY;
67 Type type() const override;
68 QgsRectangle rootChunkExtent() const override;
69 void setExtent( const QgsRectangle &extent ) override;
70 void rootChunkHeightRange( float &hMin, float &hMax ) const override;
71
72 void setCrs( const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context ) override;
73 QgsCoordinateReferenceSystem crs() const override { return mCrs; }
74
75 private:
76 void updateTilingScheme();
77
79};
80
81
82#endif // QGSFLATTERRAINGENERATOR_H
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Type type() const override
What texture generator implementation is this.
QgsRectangle rootChunkExtent() const override
extent of the terrain's root chunk in terrain's CRS
void rootChunkHeightRange(float &hMin, float &hMax) const override
Returns height range of the root chunk in world coordinates.
static QgsTerrainGenerator * create()
Creates a new instance of a QgsFlatTerrainGenerator object.
QgsChunkLoader * createChunkLoader(QgsChunkNode *node) const override
QgsFlatTerrainGenerator()=default
void setExtent(const QgsRectangle &extent) override
sets the extent of the terrain in terrain's CRS
QgsCoordinateReferenceSystem crs() const override
Returns CRS of the terrain.
void setCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context) override
Sets the CRS associated with the terrain.
A rectangle specified with double values.
Base class for generators of terrain.
Type
Enumeration of the available terrain generators.
virtual QgsTerrainGenerator * clone() const =0SIP_FACTORY
Makes a copy of the current instance.
#define SIP_FACTORY
Definition qgis_sip.h:84