QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsmeshdataset.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshdataset.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 QGSMESHDATASET_H
19#define QGSMESHDATASET_H
20
21#include <limits>
22#include <memory>
23
24#include "qgis_core.h"
25#include "qgis_sip.h"
26
27#include <QDateTime>
28#include <QDomElement>
29#include <QMap>
30#include <QPair>
31#include <QString>
32#include <QVector>
33
34class QgsMeshLayer;
36class QgsRectangle;
37class QDomDocument;
39
40struct QgsMesh;
41
52class CORE_EXPORT QgsMeshDatasetIndex
53{
54 public:
56 QgsMeshDatasetIndex( int group = -1, int dataset = -1 );
58 int group() const;
60 int dataset() const;
62 bool isValid() const;
63
64 bool operator == ( QgsMeshDatasetIndex other ) const;
65 bool operator != ( QgsMeshDatasetIndex other ) const;
66 private:
67 int mGroupIndex = -1;
68 int mDatasetIndex = -1;
69};
70
82class CORE_EXPORT QgsMeshDatasetValue
83{
84 public:
86 QgsMeshDatasetValue( double x,
87 double y );
88
91
94
96
98 void set( double scalar );
99
101 void setX( double x );
102
104 void setY( double y ) ;
105
107 double scalar() const;
108
110 double x() const;
111
113 double y() const;
114
115 bool operator==( QgsMeshDatasetValue other ) const;
116
117 private:
118 double mX = std::numeric_limits<double>::quiet_NaN();
119 double mY = std::numeric_limits<double>::quiet_NaN();
120};
121
141class CORE_EXPORT QgsMeshDataBlock
142{
143 public:
151
154
156 QgsMeshDataBlock( DataType type, int count );
157
159 DataType type() const;
160
162 int count() const;
163
165 bool isValid() const;
166
171 QgsMeshDatasetValue value( int index ) const;
172
177 bool active( int index ) const;
178
192 void setActive( const QVector<int> &vals );
193
205 QVector<int> active() const;
206
213 QVector<double> values() const;
214
224 void setValues( const QVector<double> &vals );
225
227 void setValid( bool valid );
228
229 private:
230 QVector<double> mDoubleBuffer;
231 QVector<int> mIntegerBuffer;
232 DataType mType;
233 int mSize = 0;
234 bool mIsValid = false;
235};
236
253class CORE_EXPORT QgsMesh3DDataBlock
254{
255 public:
259
264
266 QgsMesh3DDataBlock( int count, bool isVector );
267
269 void setValid( bool valid );
270
272 bool isValid() const;
273
275 bool isVector() const;
276
278 int count() const;
279
281 int firstVolumeIndex() const;
282
284 int lastVolumeIndex() const;
285
287 int volumesCount() const;
288
292 QVector<int> verticalLevelsCount() const;
293
297 void setVerticalLevelsCount( const QVector<int> &verticalLevelsCount );
298
302 QVector<double> verticalLevels() const;
303
307 void setVerticalLevels( const QVector<double> &verticalLevels );
308
312 QVector<int> faceToVolumeIndex() const;
313
317 void setFaceToVolumeIndex( const QVector<int> &faceToVolumeIndex );
318
324 QVector<double> values() const;
325
332 QgsMeshDatasetValue value( int volumeIndex ) const;
333
339 void setValues( const QVector<double> &doubleBuffer );
340
341 private:
342 int mSize = 0;
343 bool mIsValid = false;
344 bool mIsVector = false;
345 QVector<int> mVerticalLevelsCount;
346 QVector<double> mVerticalLevels;
347 QVector<int> mFaceToVolumeIndex;
348 QVector<double> mDoubleBuffer; // for scalar/vector values
349};
350
362{
363 public:
364
373
376
391 QgsMeshDatasetGroupMetadata( const QString &name,
392 const QString uri,
393 bool isScalar,
395 double minimum,
396 double maximum,
397 int maximumVerticalLevels,
398 const QDateTime &referenceTime,
399 bool isTemporal,
400 const QMap<QString, QString> &extraOptions );
401
405 QString name() const;
406
415 QString parentQuantityName() const;
416
422 QString uri() const;
423
427 QMap<QString, QString> extraOptions() const;
428
432 bool isVector() const;
433
437 bool isScalar() const;
438
442 bool isTemporal() const;
443
449 DataType dataType() const;
450
454 double minimum() const;
455
459 double maximum() const;
460
466 int maximumVerticalLevelsCount() const;
467
473 QDateTime referenceTime() const;
474
475 private:
476 QString mName;
477 QString mParentQuantityName;
478 QString mUri;
479 bool mIsScalar = false;
481 double mMinimumValue = std::numeric_limits<double>::quiet_NaN();
482 double mMaximumValue = std::numeric_limits<double>::quiet_NaN();
483 QMap<QString, QString> mExtraOptions;
484 int mMaximumVerticalLevelsCount = 0; // for 3d stacked meshes
485 QDateTime mReferenceTime;
486 bool mIsTemporal = false;
487};
488
498class CORE_EXPORT QgsMeshDatasetMetadata
499{
500 public:
503
514 bool isValid,
515 double minimum,
516 double maximum,
517 int maximumVerticalLevels
518 );
519
523 double time() const;
524
528 bool isValid() const;
529
533 double minimum() const;
534
538 double maximum() const;
539
545 int maximumVerticalLevelsCount() const;
546
547 private:
548 double mTime = std::numeric_limits<double>::quiet_NaN();
549 bool mIsValid = false;
550 double mMinimumValue = std::numeric_limits<double>::quiet_NaN();
551 double mMaximumValue = std::numeric_limits<double>::quiet_NaN();
552 int mMaximumVerticalLevelsCount = 0; // for 3d stacked meshes
553};
554
555
563class CORE_EXPORT QgsMeshDataset
564{
565 public:
566
567 QgsMeshDataset() = default;
568
569 virtual ~QgsMeshDataset() = default;
570
572 virtual QgsMeshDatasetValue datasetValue( int valueIndex ) const = 0;
573
575 virtual QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const = 0;
576
578 virtual QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const = 0;
579
581 virtual bool isActive( int faceIndex ) const = 0;
582
584 virtual QgsMeshDatasetMetadata metadata() const = 0;
585
587 virtual int valuesCount() const = 0;
588};
589
597class CORE_EXPORT QgsMeshDatasetGroup
598{
599 public:
600
613
616
618 QgsMeshDatasetGroup( const QString &name );
619
622
624 virtual void initialize() = 0;
625
628
630 virtual QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const = 0 ;
631
633 virtual int datasetCount() const = 0;
634
636 virtual QgsMeshDataset *dataset( int index ) const = 0;
637
639 virtual QgsMeshDatasetGroup::Type type() const = 0;
640
642 double minimum() const;
643
645 double maximum() const;
646
648 void setMinimumMaximum( double min, double max ) const;
649
651 QString name() const;
652
654 void setName( const QString &name );
655
658
661
663 void addExtraMetadata( QString key, QString value );
665 QMap<QString, QString> extraMetadata() const;
666
668 bool isScalar() const;
669
671 void setIsScalar( bool isScalar );
672
674 bool checkValueCountPerDataset( int count ) const;
675
677 void calculateStatistic() const;
678
680 void setStatisticObsolete() const;
681
683 virtual QStringList datasetGroupNamesDependentOn() const;
684
686 virtual QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
687
689 virtual QString description() const;
690
692 void setReferenceTime( const QDateTime &referenceTime );
693
694 protected:
695 QString mName;
696
698 QMap<QString, QString> mMetadata;
699 bool mIsScalar = true;
700
701 private:
702 mutable double mMinimum = std::numeric_limits<double>::quiet_NaN();
703 mutable double mMaximum = std::numeric_limits<double>::quiet_NaN();
704 mutable bool mIsStatisticObsolete = true;
705
706 void updateStatistic() const;
707
708 QDateTime mReferenceTime;
709};
710
711#ifndef SIP_RUN
712
722class CORE_EXPORT QgsMeshMemoryDataset: public QgsMeshDataset
723{
724 public:
725
727
728 QgsMeshDatasetValue datasetValue( int valueIndex ) const override;
729 QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const override;
730 QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const override;
731 QgsMeshDatasetMetadata metadata() const override;
732 bool isActive( int faceIndex ) const override;
733 int valuesCount() const override;
734
736 void calculateMinMax();
737
738 QVector<QgsMeshDatasetValue> values;
739 QVector<int> active;
740 double time = -1;
741 bool valid = false;
742 double minimum = std::numeric_limits<double>::quiet_NaN();
743 double maximum = std::numeric_limits<double>::quiet_NaN();
744};
745
756{
757 public:
758
761 QgsMeshMemoryDatasetGroup( const QString &name );
764
765 void initialize() override;
766 int datasetCount() const override;
767 QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const override;
768 QgsMeshDataset *dataset( int index ) const override;
770
772 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const override;
773
775 void addDataset( std::shared_ptr<QgsMeshMemoryDataset> dataset );
776
778 void clearDatasets();
779
781 std::shared_ptr<const QgsMeshMemoryDataset> constDataset( int index ) const;
782
784 QVector<std::shared_ptr<QgsMeshMemoryDataset>> memoryDatasets;
785};
786
795{
796 public:
799
800 QgsMeshDatasetValue datasetValue( int valueIndex ) const override;
801 QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const override;;
802 QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const override;;
803 bool isActive( int ) const override {return true;};
804 QgsMeshDatasetMetadata metadata() const override;;
805 int valuesCount() const override;
806 private:
807 QgsMesh *mMesh;
808};
809
820{
821 public:
824
825 void initialize() override;
826 QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const override;;
827 int datasetCount() const override;;
828 QgsMeshDataset *dataset( int index ) const override;;
829 QgsMeshDatasetGroup::Type type() const override;
830 QDomElement writeXml( QDomDocument &, const QgsReadWriteContext & ) const override {return QDomElement();};
831
832 private:
833 std::unique_ptr<QgsMeshVerticesElevationDataset> mDataset;
834};
835
836#endif //SIP_RUN
837
864
866{
867 public:
868
873
883 const QString &sourceName,
884 bool isVector,
885 int index );
886
893 QgsMeshDatasetGroupTreeItem( const QDomElement &itemElement, const QgsReadWriteContext &context );
894
900
907
914
922
929
938
943 int childCount() const;
944
949 int totalChildCount() const;
950
957 QList<int> enabledDatasetGroupIndexes() const;
958
964
969 int row() const;
970
976 QString name() const;
977
984 void setName( const QString &name );
985
993 QString providerName() const;
994
998 bool isVector() const;
999
1003 int datasetGroupIndex() const;
1004
1008 bool isEnabled() const;
1009
1014 void setIsEnabled( bool isEnabled );
1015
1019 QString defaultName() const;
1020
1027
1034 QList<int> groupIndexDependencies() const;
1035
1041 QString description() const;
1042
1050 void setDatasetGroup( QgsMeshDatasetGroup *datasetGroup );
1051
1059 void setPersistentDatasetGroup( const QString &uri );
1060
1067 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context );
1068
1069 private:
1070 QgsMeshDatasetGroupTreeItem *mParent = nullptr;
1071 QList< QgsMeshDatasetGroupTreeItem * > mChildren;
1072 QMap<int, QgsMeshDatasetGroupTreeItem *> mDatasetGroupIndexToChild;
1073
1074 // Data
1075 QString mUserName;
1076 QString mOriginalName;
1077 QString mSourceName;
1078 QgsMeshDatasetGroup::Type mDatasetGroupType = QgsMeshDatasetGroup::Unknown;
1079 QString mDescription;
1080
1081 bool mIsVector = false;
1082 int mDatasetGroupIndex = -1;
1083 bool mIsEnabled = true;
1084
1085 QList<int> mDatasetGroupDependencies;
1086 QList<int> mDatasetGroupDependentOn;
1087
1088 QgsMeshDatasetGroupTreeItem *searchItemBySourceName( const QString &sourceName ) const;
1089 QgsMeshDatasetGroupTreeItem *rootItem() const;
1090 void freeAsDependency(); // cppcheck-suppress functionConst
1091 void freeFromDependencies(); // cppcheck-suppress functionConst
1092};
1093
1094#endif // QGSMESHDATASET_H
void setFaceToVolumeIndex(const QVector< int > &faceToVolumeIndex)
Sets the indexing between faces and volumes.
QgsMeshDatasetValue value(int volumeIndex) const
Returns the value at volume centers.
QVector< double > values() const
Returns the values at volume centers.
void setVerticalLevels(const QVector< double > &verticalLevels)
Sets the vertical levels height.
void setValues(const QVector< double > &doubleBuffer)
Sets the values at volume centers.
QgsMesh3DDataBlock()
Constructs an invalid block.
bool isVector() const
Whether we store vector values.
int count() const
Number of 2d faces for which the volume data is stored in the block.
int volumesCount() const
Returns number of volumes stored in the buffer.
int firstVolumeIndex() const
Index of the first volume stored in the buffer (absolute).
int lastVolumeIndex() const
Index of the last volume stored in the buffer (absolute).
QVector< int > verticalLevelsCount() const
Returns number of vertical level above 2d faces.
bool isValid() const
Whether the block is valid.
void setVerticalLevelsCount(const QVector< int > &verticalLevelsCount)
Sets the vertical level counts.
void setValid(bool valid)
Sets block validity.
QgsMesh3DDataBlock & operator=(const QgsMesh3DDataBlock &other)
QVector< int > faceToVolumeIndex() const
Returns the indexing between faces and volumes.
QVector< double > verticalLevels() const
Returns the vertical levels height.
A block of integers/doubles from a mesh dataset.
QgsMeshDataBlock()
Constructs an invalid block.
DataType
Type of data stored in the block.
@ ScalarDouble
Scalar double values.
@ Vector2DDouble
Vector double pairs (x1, y1, x2, y2, ... ).
@ ActiveFlagInteger
Integer boolean flag whether face is active.
A collection of dataset group metadata such as whether the data is vector or scalar,...
bool isTemporal() const
Returns whether the dataset group is temporal (contains time-related dataset).
QMap< QString, QString > extraOptions() const
Returns extra metadata options, for example description.
bool isVector() const
Returns whether dataset group has vector data.
QString parentQuantityName() const
Returns the name of the dataset's parent quantity, if available.
QString name() const
Returns name of the dataset group.
bool isScalar() const
Returns whether dataset group has scalar data.
int maximumVerticalLevelsCount() const
Returns maximum number of vertical levels for 3d stacked meshes.
QgsMeshDatasetGroupMetadata()=default
Constructs an empty metadata object.
DataType dataType() const
Returns whether dataset group data is defined on vertices or faces or volumes.
QDateTime referenceTime() const
Returns the reference time.
double minimum() const
Returns minimum scalar value/vector magnitude present for whole dataset group.
double maximum() const
Returns maximum scalar value/vector magnitude present for whole dataset group.
DataType
Location of where data is specified for datasets in the dataset group.
@ DataOnEdges
Data is defined on edges.
@ DataOnFaces
Data is defined on faces.
@ DataOnVertices
Data is defined on vertices.
@ DataOnVolumes
Data is defined on volumes.
QString uri() const
Returns the uri of the source.
void setName(const QString &name)
Overrides the default name with the name to display.
QgsMeshDatasetGroupTreeItem * clone() const
Clones the item.
QList< int > groupIndexDependencies() const
Returns a list of group index corresponding to dataset group that depends on the dataset group repres...
bool isVector() const
Return true if the dataset group is vector.
QString defaultName() const
Returns the default name.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context)
Writes the item and its children in a DOM document.
void setPersistentDatasetGroup(const QString &uri)
Set parameters of the item in accordance with the persistent dataset group with uri.
int childCount() const
Returns the count of children.
int datasetGroupIndex() const
Returns the dataset group index.
QgsMeshDatasetGroupTreeItem * parentItem() const
Returns the parent item, nullptr if it is root item.
QgsMeshDatasetGroupTreeItem * childFromDatasetGroupIndex(int index)
Returns the child with dataset group index Searches as depper as needed on the child hierarchy.
void removeChild(QgsMeshDatasetGroupTreeItem *item)
Removes and destroy a item child if exists.
void setIsEnabled(bool isEnabled)
Sets whether the item is enabled, that is if it is displayed in view.
int totalChildCount() const
Returns the total count of children, that is included deeper children and disabled items.
void setDatasetGroup(QgsMeshDatasetGroup *datasetGroup)
Set parameters of the item in accordance with the dataset group.
QList< int > enabledDatasetGroupIndexes() const
Returns a list of enabled dataset group indexes, included deeper children.
bool isEnabled() const
Returns true if the item is enabled, i.e.
QgsMeshDatasetGroupTreeItem()
Constructor for an empty dataset group tree item.
QString providerName() const
Returns the name used by the provider to identify the dataset.
void appendChild(QgsMeshDatasetGroupTreeItem *item)
Appends a child item.
QgsMeshDatasetGroupTreeItem * child(int row) const
Returns a child.
QString description() const
Returns description about the dataset group (URI, formula,...).
int row() const
Returns the position of the item in the parent.
QString name() const
Returns the name of the item This name is the default name if the name has not been overridden (.
QgsMeshDatasetGroup::Type datasetGroupType() const
Returns the dataset group type.
Abstract class that represents a dataset group.
bool isScalar() const
Returns whether the group contain scalar values.
void addExtraMetadata(QString key, QString value)
Adds extra metadata to the group.
bool checkValueCountPerDataset(int count) const
Returns whether all the datasets contain count values.
virtual QgsMeshDatasetMetadata datasetMetadata(int datasetIndex) const =0
Returns the metadata of the dataset with index datasetIndex.
void setMinimumMaximum(double min, double max) const
Overrides the minimum and the maximum value of the whole dataset group.
void setStatisticObsolete() const
Sets statistic obsolete, that means statistic will be recalculated when requested.
void setIsScalar(bool isScalar)
Sets whether the group contain scalar values.
QgsMeshDatasetGroup()=default
void setDataType(const QgsMeshDatasetGroupMetadata::DataType &dataType)
Sets the data type of the dataset group.
QString name() const
Returns the name of the dataset group.
QgsMeshDatasetGroupMetadata::DataType dataType() const
Returns the data type of the dataset group.
virtual ~QgsMeshDatasetGroup()
virtual QStringList datasetGroupNamesDependentOn() const
Returns the dataset group variable name which this dataset group depends on.
virtual QString description() const
Returns some information about the dataset group.
QMap< QString, QString > mMetadata
Type
Type of the dataset group.
@ Unknown
Generic type used for non typed dataset group.
@ Virtual
Virtual Dataset group defined by a formula.
@ Memory
Temporary dataset group in memory.
@ Persistent
Dataset group store in a file.
virtual void initialize()=0
Initialize the dataset group.
void setReferenceTime(const QDateTime &referenceTime)
Sets the reference time of the dataset group.
double maximum() const
Returns the maximum value of the whole dataset group.
virtual QgsMeshDatasetGroup::Type type() const =0
Returns the type of dataset group.
QgsMeshDatasetGroupMetadata groupMetadata() const
Returns the metadata of the dataset group.
virtual QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Write dataset group information in a DOM element.
double minimum() const
Returns the minimum value of the whole dataset group.
QMap< QString, QString > extraMetadata() const
Returns all the extra metadata of the group.
void setName(const QString &name)
Sets the name of the dataset group.
virtual int datasetCount() const =0
Returns the count of datasets in the group.
void calculateStatistic() const
Calculates the statistics (minimum and maximum).
virtual QgsMeshDataset * dataset(int index) const =0
Returns the dataset with index.
QgsMeshDatasetGroupMetadata::DataType mDataType
QgsMeshDatasetIndex(int group=-1, int dataset=-1)
Creates an index. -1 represents invalid group/dataset.
bool isValid() const
Returns whether index is valid, ie at least groups is set.
int group() const
Returns a group index.
int dataset() const
Returns a dataset index within group().
Represents mesh dataset metadata, such as whether the data is valid or the associated time.
double maximum() const
Returns maximum scalar value/vector magnitude present for the dataset.
int maximumVerticalLevelsCount() const
Returns maximum number of vertical levels for 3d stacked meshes.
double minimum() const
Returns minimum scalar value/vector magnitude present for the dataset.
double time() const
Returns the time value for this dataset.
bool isValid() const
Returns whether dataset is valid.
QgsMeshDatasetMetadata()=default
Constructs an empty metadata object.
Represents a single mesh dataset value.
void setY(double y)
Sets Y value.
void set(double scalar)
Sets scalar value.
double y() const
Returns y value.
QgsMeshDatasetValue()=default
Default Ctor, initialize to NaN.
double scalar() const
Returns magnitude of vector for vector data or scalar value for scalar data.
QgsMeshDatasetValue(double x, double y)
Constructor for vector value.
double x() const
Returns x value.
~QgsMeshDatasetValue()=default
void setX(double x)
Sets X value.
Abstract class that represents a mesh dataset.
QgsMeshDataset()=default
virtual QgsMeshDataBlock datasetValues(bool isScalar, int valueIndex, int count) const =0
Returns count values from valueIndex.
virtual int valuesCount() const =0
Returns the values count.
virtual ~QgsMeshDataset()=default
virtual QgsMeshDatasetMetadata metadata() const =0
Returns the metadata of the dataset.
virtual bool isActive(int faceIndex) const =0
Returns whether the face is active.
virtual QgsMeshDataBlock areFacesActive(int faceIndex, int count) const =0
Returns whether faces are active.
virtual QgsMeshDatasetValue datasetValue(int valueIndex) const =0
Returns the value with index valueIndex.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
QgsMeshMemoryDatasetGroup()=default
QgsMeshDatasetMetadata datasetMetadata(int datasetIndex) const override
Returns the metadata of the dataset with index datasetIndex.
QgsMeshDatasetGroup::Type type() const override
Returns the type of dataset group.
void initialize() override
Initialize the dataset group.
QVector< std::shared_ptr< QgsMeshMemoryDataset > > memoryDatasets
Contains all the memory datasets.
QgsMeshDataset * dataset(int index) const override
Returns the dataset with index.
int datasetCount() const override
Returns the count of datasets in the group.
QgsMeshMemoryDataset()=default
QgsMeshDataBlock areFacesActive(int faceIndex, int count) const override
Returns whether faces are active.
bool isActive(int faceIndex) const override
Returns whether the face is active.
QVector< QgsMeshDatasetValue > values
QgsMeshDatasetValue datasetValue(int valueIndex) const override
Returns the value with index valueIndex.
QgsMeshDatasetMetadata metadata() const override
Returns the metadata of the dataset.
QgsMeshDataBlock datasetValues(bool isScalar, int valueIndex, int count) const override
Returns count values from valueIndex.
int valuesCount() const override
Returns the values count.
QVector< int > active
void calculateMinMax()
Calculates the minimum and the maximum of this group.
int datasetCount() const override
Returns the count of datasets in the group.
QgsMeshVerticesElevationDatasetGroup(QString name, QgsMesh *mesh)
Constructor with a name and linked to mesh.
void initialize() override
Initialize the dataset group.
QgsMeshDatasetGroup::Type type() const override
Returns the type of dataset group.
QDomElement writeXml(QDomDocument &, const QgsReadWriteContext &) const override
Write dataset group information in a DOM element.
QgsMeshDataset * dataset(int index) const override
Returns the dataset with index.
QgsMeshDatasetMetadata datasetMetadata(int datasetIndex) const override
Returns the metadata of the dataset with index datasetIndex.
QgsMeshDatasetValue datasetValue(int valueIndex) const override
Returns the value with index valueIndex.
bool isActive(int) const override
Returns whether the face is active.
int valuesCount() const override
Returns the values count.
QgsMeshDataBlock areFacesActive(int faceIndex, int count) const override
Returns whether faces are active.
QgsMeshDatasetMetadata metadata() const override
Returns the metadata of the dataset.
QgsMeshDataBlock datasetValues(bool isScalar, int valueIndex, int count) const override
Returns count values from valueIndex.
QgsMeshVerticesElevationDataset(QgsMesh *mesh)
Constructor.
A container for the context for various read/write operations on objects.
A rectangle specified with double values.
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:84
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Mesh - vertices, edges and faces.