QGIS API Documentation
3.8.0-Zanzibar (11aff65)
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
u
v
w
z
+
Variables
a
b
c
d
e
g
h
i
l
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
j
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
u
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
mesh
qgsmeshvectorrenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstriangularmesh.h
3
-------------------
4
begin : April 2018
5
copyright : (C) 2018 by Peter Petrik
6
email : zilolv at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSMESHVECTORRENDERER_H
19
#define QGSMESHVECTORRENDERER_H
20
21
22
#define SIP_NO_FILE
23
24
#include <QVector>
25
#include <QSize>
26
27
#include "qgis_core.h"
28
#include "
qgsmeshdataprovider.h
"
29
#include "
qgstriangularmesh.h
"
30
#include "
qgsmeshlayer.h
"
31
#include "
qgspointxy.h
"
32
33
class
QgsRenderContext
;
34
36
45
class
QgsMeshVectorRenderer
46
{
47
public
:
49
QgsMeshVectorRenderer(
const
QgsTriangularMesh
&m,
50
const
QgsMeshDataBlock
&datasetValues,
51
const
QVector<double> &datasetValuesMag,
52
double
datasetMagMaximumValue,
53
double
datasetMagMinimumValue,
54
bool
dataIsOnVertices,
55
const
QgsMeshRendererVectorSettings
&settings,
56
QgsRenderContext
&context,
57
QSize size );
59
~QgsMeshVectorRenderer();
60
64
void
draw();
65
66
private
:
68
void
drawVectorDataOnVertices(
const
QList<int> &trianglesInExtent );
70
void
drawVectorDataOnFaces(
const
QList<int> &trianglesInExtent );
72
void
drawVectorDataOnGrid(
const
QList<int> &trianglesInExtent );
74
void
drawVectorArrow(
const
QgsPointXY
&lineStart,
double
xVal,
double
yVal,
double
magnitude );
76
bool
calcVectorLineEnd(
QgsPointXY
&lineEnd,
77
double
&vectorLength,
78
double
&cosAlpha,
79
double
&sinAlpha,
//out
80
const
QgsPointXY
&lineStart,
81
double
xVal,
82
double
yVal,
83
double
magnitude
//in
84
);
85
92
double
calcExtentBufferSize()
const
;
93
94
const
QgsTriangularMesh
&mTriangularMesh;
95
const
QgsMeshDataBlock
&mDatasetValues;
96
const
QVector<double> &mDatasetValuesMag;
//magnitudes
97
double
mMinMag = 0.0;
98
double
mMaxMag = 0.0;
99
QgsRenderContext
&mContext;
100
const
QgsMeshRendererVectorSettings
&mCfg;
101
bool
mDataOnVertices =
true
;
102
QSize mOutputSize;
103
QgsRectangle
mBufferedExtent;
104
};
105
107
108
109
110
#endif // QGSMESHVECTORRENDERER_H
QgsRectangle
A rectangle specified with double values.
Definition:
qgsrectangle.h:41
QgsTriangularMesh
Triangular/Derived Mesh is mesh with vertices in map coordinates.
Definition:
qgstriangularmesh.h:46
QgsPointXY
A class to represent a 2D point.
Definition:
qgspointxy.h:43
QgsMeshDataBlock
QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e...
Definition:
qgsmeshdataprovider.h:162
qgstriangularmesh.h
QgsMeshRendererVectorSettings
Represents a mesh renderer settings for vector datasets.
Definition:
qgsmeshrenderersettings.h:118
qgspointxy.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:50
qgsmeshlayer.h
qgsmeshdataprovider.h
Generated on Sat Jun 22 2019 09:24:07 for QGIS API Documentation by
1.8.13