QGIS API Documentation
3.14.0-Pi (9f7028fd23)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
3d
qgs3dutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgs3dutils.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 QGS3DUTILS_H
17
#define QGS3DUTILS_H
18
19
#include "
qgis_sip.h
"
20
21
class
QgsLineString
;
22
class
QgsPolygon
;
23
class
QgsFeedback
;
24
25
class
QgsAbstract3DEngine
;
26
class
QgsAbstract3DSymbol
;
27
class
Qgs3DMapScene
;
28
29
namespace
Qt3DExtras
30
{
31
class
QPhongMaterial;
32
}
33
34
#include "
qgs3dmapsettings.h
"
35
#include "
qgs3danimationsettings.h
"
36
#include "
qgs3dtypes.h
"
37
#include "
qgsaabb.h
"
38
39
#include <memory>
40
41
#define SIP_NO_FILE
42
49
class
_3D_EXPORT
Qgs3DUtils
50
{
51
public
:
52
58
static
QImage captureSceneImage(
QgsAbstract3DEngine
&engine,
Qgs3DMapScene
*scene );
59
78
static
bool
exportAnimation(
const
Qgs3DAnimationSettings
&animationSettings,
79
const
Qgs3DMapSettings
&mapSettings,
80
int
framesPerSecond,
81
const
QString &outputDirectory,
82
const
QString &fileNameTemplate,
83
const
QSize &outputSize,
84
QString &error,
85
QgsFeedback
*feedback =
nullptr
86
);
87
92
static
int
maxZoomLevel(
double
tile0width,
double
tileResolution,
double
maxError );
93
95
static
QString altClampingToString(
Qgs3DTypes::AltitudeClamping
altClamp );
97
static
Qgs3DTypes::AltitudeClamping
altClampingFromString(
const
QString &str );
98
100
static
QString altBindingToString(
Qgs3DTypes::AltitudeBinding
altBind );
102
static
Qgs3DTypes::AltitudeBinding
altBindingFromString(
const
QString &str );
103
105
static
QString cullingModeToString(
Qgs3DTypes::CullingMode
mode );
107
static
Qgs3DTypes::CullingMode
cullingModeFromString(
const
QString &str );
108
110
static
float
clampAltitude(
const
QgsPoint
&p,
Qgs3DTypes::AltitudeClamping
altClamp,
Qgs3DTypes::AltitudeBinding
altBind,
float
height,
const
QgsPoint
¢roid,
const
Qgs3DMapSettings
&map );
112
static
void
clampAltitudes(
QgsLineString
*lineString,
Qgs3DTypes::AltitudeClamping
altClamp,
Qgs3DTypes::AltitudeBinding
altBind,
const
QgsPoint
¢roid,
float
height,
const
Qgs3DMapSettings
&map );
114
static
bool
clampAltitudes(
QgsPolygon
*polygon,
Qgs3DTypes::AltitudeClamping
altClamp,
Qgs3DTypes::AltitudeBinding
altBind,
float
height,
const
Qgs3DMapSettings
&map );
115
117
static
QString matrix4x4toString(
const
QMatrix4x4 &m );
119
static
QMatrix4x4 stringToMatrix4x4(
const
QString &str );
120
122
static
void
extractPointPositions(
QgsFeature
&f,
const
Qgs3DMapSettings
&map,
Qgs3DTypes::AltitudeClamping
altClamp, QVector<QVector3D> &positions );
123
128
static
bool
isCullable(
const
QgsAABB
&bbox,
const
QMatrix4x4 &viewProjectionMatrix );
129
131
static
QgsVector3D
mapToWorldCoordinates(
const
QgsVector3D
&mapCoords,
const
QgsVector3D
&origin );
133
static
QgsVector3D
worldToMapCoordinates(
const
QgsVector3D
&worldCoords,
const
QgsVector3D
&origin );
134
139
static
QgsAABB
layerToWorldExtent(
const
QgsRectangle
&extent,
double
zMin,
double
zMax,
const
QgsCoordinateReferenceSystem
&layerCrs,
const
QgsVector3D
&mapOrigin,
const
QgsCoordinateReferenceSystem
&mapCrs,
const
QgsCoordinateTransformContext
&context );
140
145
static
QgsRectangle
worldToLayerExtent(
const
QgsAABB
&bbox,
const
QgsCoordinateReferenceSystem
&layerCrs,
const
QgsVector3D
&mapOrigin,
const
QgsCoordinateReferenceSystem
&mapCrs,
const
QgsCoordinateTransformContext
&context );
146
151
static
QgsAABB
mapToWorldExtent(
const
QgsRectangle
&extent,
double
zMin,
double
zMax,
const
QgsVector3D
&mapOrigin );
152
157
static
QgsRectangle
worldToMapExtent(
const
QgsAABB
&bbox,
const
QgsVector3D
&mapOrigin );
158
160
static
QgsVector3D
transformWorldCoordinates(
const
QgsVector3D
&worldPoint1,
const
QgsVector3D
&origin1,
const
QgsCoordinateReferenceSystem
&crs1,
const
QgsVector3D
&origin2,
const
QgsCoordinateReferenceSystem
&crs2,
161
const
QgsCoordinateTransformContext
&context );
162
170
static
void
estimateVectorLayerZRange(
QgsVectorLayer
*layer,
double
&zMin,
double
&zMax );
171
173
static
std::unique_ptr<QgsAbstract3DSymbol> symbolForGeometryType(
QgsWkbTypes::GeometryType
geomType );
174
176
static
QgsExpressionContext
globalProjectLayerExpressionContext(
QgsVectorLayer
*layer );
177
179
static
Qt3DExtras::QPhongMaterial *phongMaterial(
const
QgsPhongMaterialSettings
&settings );
180
};
181
182
#endif // QGS3DUTILS_H
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition:
qgsexpressioncontext.h:369
Qgs3DTypes::AltitudeBinding
AltitudeBinding
how to handle clamping of vertices of individual features
Definition:
qgs3dtypes.h:55
QgsCoordinateTransformContext
Definition:
qgscoordinatetransformcontext.h:57
qgs3danimationsettings.h
QgsPolygon
Polygon geometry type.
Definition:
qgspolygon.h:33
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition:
qgspoint.h:37
qgsaabb.h
QgsVector3D
Definition:
qgsvector3d.h:31
QgsLineString
Line string geometry type, with support for z-dimension and m-values.
Definition:
qgslinestring.h:43
QgsRectangle
Definition:
qgsrectangle.h:41
QgsPhongMaterialSettings
Definition:
qgsphongmaterialsettings.h:35
QgsAbstract3DSymbol
Definition:
qgsabstract3dsymbol.h:41
Qgs3DTypes::CullingMode
CullingMode
Triangle culling mode.
Definition:
qgs3dtypes.h:62
QgsFeedback
Definition:
qgsfeedback.h:43
qgis_sip.h
QgsAABB
Definition:
qgsaabb.h:33
qgs3dtypes.h
Qgs3DMapSettings
Definition:
qgs3dmapsettings.h:51
QgsAbstract3DEngine
Definition:
qgsabstract3dengine.h:56
QgsCoordinateReferenceSystem
Definition:
qgscoordinatereferencesystem.h:206
Qgs3DMapScene
Definition:
qgs3dmapscene.h:60
Qgs3DTypes::AltitudeClamping
AltitudeClamping
how to handle altitude of vector features
Definition:
qgs3dtypes.h:47
qgs3dmapsettings.h
QgsWkbTypes::GeometryType
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition:
qgswkbtypes.h:139
QgsVectorLayer
Definition:
qgsvectorlayer.h:385
Qgs3DUtils
Definition:
qgs3dutils.h:49
Qgs3DAnimationSettings
Definition:
qgs3danimationsettings.h:38
QgsFeature
Definition:
qgsfeature.h:55
Qt3DExtras
Definition:
qgs3dmapscene.h:38
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17