QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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( const QgsTriangularMesh &m,
51 const QVector<double> &datasetValues,
52 const QgsMeshDataBlock &activeFaceFlagValues,
54 const QgsRenderContext &context,
55 const QSize &size );
56 ~QgsMeshLayerInterpolator() override;
57
58 QgsRasterInterface *clone() const override;
59 Qgis::DataType dataType( int ) const override;
60 int bandCount() const override;
61 QgsRasterBlock *block( int, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override;
62
63 void setSpatialIndexActive( bool active );
64
65 void setElevationMapSettings( bool renderElevationMap, double elevationScale, double elevationOffset );
66
67 private:
68 const QgsTriangularMesh &mTriangularMesh;
69 const QVector<double> &mDatasetValues;
70 const QgsMeshDataBlock &mActiveFaceFlagValues;
71 const QgsRenderContext &mContext;
73 QSize mOutputSize;
74 bool mSpatialIndexActive = false;
75
76 bool mRenderElevation = false;
77 double mElevationScale = 1.0;
78 double mElevationOffset = 0.0;
79};
80
82
83
84#endif // QGSMESHLAYERINTERPOLATOR_H
DataType
Raster data types.
Definition qgis.h:372
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:231
#define SIP_SKIP
Definition qgis_sip.h:134