QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
qgsmeshlayerinterpolator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshlayerinterpolator.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 QGSMESHLAYERINTERPOLATOR_H
19#define QGSMESHLAYERINTERPOLATOR_H
20
21class QgsMeshLayer;
22class QgsSymbol;
26
27#include "qgis.h"
28#include "qgis_sip.h"
29#include "qgsmaplayerrenderer.h"
30#include "qgsrasterinterface.h"
31#include "qgstriangularmesh.h"
32
33#include <QSize>
34
36
38
46class QgsMeshLayerInterpolator : public QgsRasterInterface SIP_SKIP
47{
48 public:
50 QgsMeshLayerInterpolator(
51 const QgsTriangularMesh &m,
52 const QVector<double> &datasetValues,
53 const QgsMeshDataBlock &activeFaceFlagValues,
55 const QgsRenderContext &context,
56 const QSize &size
57 );
58 ~QgsMeshLayerInterpolator() override;
59
60 QgsRasterInterface *clone() const override;
61 Qgis::DataType dataType( int ) const override;
62 int bandCount() const override;
63 QgsRasterBlock *block( int, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override;
64
65 void setSpatialIndexActive( bool active );
66
67 void setElevationMapSettings( bool renderElevationMap, double elevationScale, double elevationOffset );
68
69 private:
70 const QgsTriangularMesh &mTriangularMesh;
71 const QVector<double> &mDatasetValues;
72 const QgsMeshDataBlock &mActiveFaceFlagValues;
73 const QgsRenderContext &mContext;
75 QSize mOutputSize;
76 bool mSpatialIndexActive = false;
77
78 bool mRenderElevation = false;
79 double mElevationScale = 1.0;
80 double mElevationOffset = 0.0;
81};
82
84
85
86#endif // QGSMESHLAYERINTERPOLATOR_H
DataType
Raster data types.
Definition qgis.h:393
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
DataType
Location of where data is specified for datasets in the dataset group.
@ DataOnVertices
Data is defined on vertices.
An index that identifies the dataset group (e.g.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Base class for processing filters like renderers, reprojector, resampler etc.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
virtual int bandCount() const =0
Gets number of bands.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:227
#define SIP_SKIP
Definition qgis_sip.h:133