QGIS API Documentation  3.2.0-Bonn (bc43194)
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 
21 #include "qgsterraingenerator.h"
22 
23 #include "qgsrectangle.h"
24 
25 
33 {
34  public:
36  QgsFlatTerrainGenerator() = default;
37 
38  QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override SIP_FACTORY;
39 
40  QgsTerrainGenerator *clone() const override SIP_FACTORY;
41  Type type() const override;
42  QgsRectangle extent() const override;
43  void rootChunkHeightRange( float &hMin, float &hMax ) const override;
44  void writeXml( QDomElement &elem ) const override;
45  void readXml( const QDomElement &elem ) override;
46 
48  void setExtent( const QgsRectangle &extent );
49 
51  void setCrs( const QgsCoordinateReferenceSystem &crs );
53  QgsCoordinateReferenceSystem crs() const { return mCrs; }
54 
55  private:
56 
57  void updateTilingScheme();
58 
59  QgsRectangle mExtent;
61 };
62 
63 
64 
65 
66 #endif // QGSFLATTERRAINGENERATOR_H
3 Terrain generator that creates a simple square flat area.
A rectangle specified with double values.
Definition: qgsrectangle.h:40
virtual void rootChunkHeightRange(float &hMin, float &hMax) const
Returns height range of the root chunk in world coordinates.
QgsCoordinateReferenceSystem crs() const
Returns CRS of the terrain.
virtual Type type() const =0
What texture generator implementation is this.
virtual void readXml(const QDomElement &elem)=0
Read terrain generator's configuration from XML.
virtual QgsTerrainGenerator * clone() const =0SIP_FACTORY
Makes a copy of the current instance.
#define SIP_FACTORY
Definition: qgis_sip.h:69
Type
Enumeration of the available terrain generators.
3 Base class for generators of terrain.
virtual void writeXml(QDomElement &elem) const =0
Write terrain generator's configuration to XML.
This class represents a coordinate reference system (CRS).
virtual QgsRectangle extent() const =0
extent of the terrain in terrain's CRS