QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
terrain
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
"
21
22
#include <Qt3DExtras/QPlaneGeometry>
23
24
#define SIP_NO_FILE
25
31
class
_3D_EXPORT
QgsFlatTerrainGenerator
:
public
QgsTerrainGenerator
32
{
33
Q_OBJECT
34
public
:
38
static
QgsTerrainGenerator
*
create
()
SIP_FACTORY
;
39
40
QgsFlatTerrainGenerator
() =
default
;
41
42
QFuture<QgsChunkLoaderResult>
loadChunk
( QgsChunkNode *node )
override
;
43
44
QgsTerrainGenerator
*
clone
() const override
SIP_FACTORY
;
45
Type
type
() const override;
46
QgsRectangle
rootChunkExtent
() const override;
47
void
setExtent
( const
QgsRectangle
&extent ) override;
48
void
rootChunkHeightRange
(
float
&hMin,
float
&hMax ) const override;
49
float
heightAt
(
double
x,
double
y, const
Qgs3DRenderContext
&context ) const override;
50
51
void
setCrs
( const
QgsCoordinateReferenceSystem
&
crs
, const
QgsCoordinateTransformContext
&context ) override;
52
QgsCoordinateReferenceSystem
crs
()
const override
{
return
mCrs; }
53
54
private
:
55
void
updateTilingScheme();
56
Qt3DCore::QEntity *createEntity( QgsChunkNode *node,
QgsTerrainGenerator::TerrainTextureResources
resources, Qt3DCore::QEntity *parent );
57
58
QgsCoordinateReferenceSystem
mCrs;
59
};
60
61
62
#endif
// QGSFLATTERRAINGENERATOR_H
Qgs3DRenderContext
Rendering context for preparation of 3D entities.
Definition
qgs3drendercontext.h:49
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsFlatTerrainGenerator::type
Type type() const override
What texture generator implementation is this.
Definition
qgsflatterraingenerator.cpp:105
QgsFlatTerrainGenerator::rootChunkExtent
QgsRectangle rootChunkExtent() const override
extent of the terrain's root chunk in terrain's CRS
Definition
qgsflatterraingenerator.cpp:110
QgsFlatTerrainGenerator::rootChunkHeightRange
void rootChunkHeightRange(float &hMin, float &hMax) const override
Returns height range of the root chunk in world coordinates.
Definition
qgsflatterraingenerator.cpp:115
QgsFlatTerrainGenerator::create
static QgsTerrainGenerator * create()
Creates a new instance of a QgsFlatTerrainGenerator object.
Definition
qgsflatterraingenerator.cpp:31
QgsFlatTerrainGenerator::loadChunk
QFuture< QgsChunkLoaderResult > loadChunk(QgsChunkNode *node) override
Definition
qgsflatterraingenerator.cpp:36
QgsFlatTerrainGenerator::heightAt
float heightAt(double x, double y, const Qgs3DRenderContext &context) const override
Returns height at (x,y) in map's CRS.
Definition
qgsflatterraingenerator.cpp:136
QgsFlatTerrainGenerator::QgsFlatTerrainGenerator
QgsFlatTerrainGenerator()=default
QgsFlatTerrainGenerator::setExtent
void setExtent(const QgsRectangle &extent) override
sets the extent of the terrain in terrain's CRS
Definition
qgsflatterraingenerator.cpp:127
QgsFlatTerrainGenerator::crs
QgsCoordinateReferenceSystem crs() const override
Returns CRS of the terrain.
Definition
qgsflatterraingenerator.h:52
QgsFlatTerrainGenerator::setCrs
void setCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context) override
Sets the CRS associated with the terrain.
Definition
qgsflatterraingenerator.cpp:121
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
QgsTerrainGenerator::Type
Type
Enumeration of the available terrain generators.
Definition
qgsterraingenerator.h:61
QgsTerrainGenerator::QgsTerrainGenerator
QgsTerrainGenerator()
Create new terrain generator.
QgsTerrainGenerator::clone
virtual QgsTerrainGenerator * clone() const =0SIP_FACTORY
Makes a copy of the current instance.
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgsterraingenerator.h
QgsTerrainGenerator::TerrainTextureResources
Definition
qgsterraingenerator.h:150
Generated on
for QGIS API Documentation by
1.17.0