QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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
67 private:
68 int mGroupIndex = -1;
69 int mDatasetIndex = -1;
70};
71
83class CORE_EXPORT QgsMeshDatasetValue
84{
85 public:
87 QgsMeshDatasetValue( double x, 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:
372
375
391 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 );
402
406 QString name() const;
407
416 QString parentQuantityName() const;
417
423 QString uri() const;
424
428 QMap<QString, QString> extraOptions() const;
429
433 bool isVector() const;
434
438 bool isScalar() const;
439
443 bool isTemporal() const;
444
450 DataType dataType() const;
451
455 double minimum() const;
456
460 double maximum() const;
461
467 int maximumVerticalLevelsCount() const;
468
474 QDateTime referenceTime() const;
475
476 private:
477 QString mName;
478 QString mParentQuantityName;
479 QString mUri;
480 bool mIsScalar = false;
482 double mMinimumValue = std::numeric_limits<double>::quiet_NaN();
483 double mMaximumValue = std::numeric_limits<double>::quiet_NaN();
484 QMap<QString, QString> mExtraOptions;
485 int mMaximumVerticalLevelsCount = 0; // for 3d stacked meshes
486 QDateTime mReferenceTime;
487 bool mIsTemporal = false;
488};
489
499class CORE_EXPORT QgsMeshDatasetMetadata
500{
501 public:
504
514 QgsMeshDatasetMetadata( double time, bool isValid, double minimum, double maximum, int maximumVerticalLevels );
515
519 double time() const;
520
524 bool isValid() const;
525
529 double minimum() const;
530
534 double maximum() const;
535
541 int maximumVerticalLevelsCount() const;
542
543 private:
544 double mTime = std::numeric_limits<double>::quiet_NaN();
545 bool mIsValid = false;
546 double mMinimumValue = std::numeric_limits<double>::quiet_NaN();
547 double mMaximumValue = std::numeric_limits<double>::quiet_NaN();
548 int mMaximumVerticalLevelsCount = 0; // for 3d stacked meshes
549};
550
551
559class CORE_EXPORT QgsMeshDataset
560{
561 public:
562 QgsMeshDataset() = default;
563
564 virtual ~QgsMeshDataset() = default;
565
567 virtual QgsMeshDatasetValue datasetValue( int valueIndex ) const = 0;
568
570 virtual QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const = 0;
571
573 virtual QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const = 0;
574
576 virtual bool isActive( int faceIndex ) const = 0;
577
579 virtual QgsMeshDatasetMetadata metadata() const = 0;
580
582 virtual int valuesCount() const = 0;
583};
584
592class CORE_EXPORT QgsMeshDatasetGroup
593{
594 public:
607
610
612 QgsMeshDatasetGroup( const QString &name );
613
616
618 virtual void initialize() = 0;
619
622
624 virtual QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const = 0;
625
627 virtual int datasetCount() const = 0;
628
630 virtual QgsMeshDataset *dataset( int index ) const = 0;
631
633 virtual QgsMeshDatasetGroup::Type type() const = 0;
634
636 double minimum() const;
637
639 double maximum() const;
640
642 void setMinimumMaximum( double min, double max ) const;
643
645 QString name() const;
646
648 void setName( const QString &name );
649
652
655
657 void addExtraMetadata( QString key, QString value );
659 QMap<QString, QString> extraMetadata() const;
660
662 bool isScalar() const;
663
665 void setIsScalar( bool isScalar );
666
668 bool checkValueCountPerDataset( int count ) const;
669
671 void calculateStatistic() const;
672
674 void setStatisticObsolete() const;
675
677 virtual QStringList datasetGroupNamesDependentOn() const;
678
680 virtual QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
681
683 virtual QString description() const;
684
686 void setReferenceTime( const QDateTime &referenceTime );
687
688 protected:
689 QString mName;
690
692 QMap<QString, QString> mMetadata;
693 bool mIsScalar = true;
694
695 private:
696 mutable double mMinimum = std::numeric_limits<double>::quiet_NaN();
697 mutable double mMaximum = std::numeric_limits<double>::quiet_NaN();
698 mutable bool mIsStatisticObsolete = true;
699
700 void updateStatistic() const;
701
702 QDateTime mReferenceTime;
703};
704
705#ifndef SIP_RUN
706
716class CORE_EXPORT QgsMeshMemoryDataset : public QgsMeshDataset
717{
718 public:
720
721 QgsMeshDatasetValue datasetValue( int valueIndex ) const override;
722 QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const override;
723 QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const override;
724 QgsMeshDatasetMetadata metadata() const override;
725 bool isActive( int faceIndex ) const override;
726 int valuesCount() const override;
727
729 void calculateMinMax();
730
731 QVector<QgsMeshDatasetValue> values;
732 QVector<int> active;
733 double time = -1;
734 bool valid = false;
735 double minimum = std::numeric_limits<double>::quiet_NaN();
736 double maximum = std::numeric_limits<double>::quiet_NaN();
737};
738
749{
750 public:
753 QgsMeshMemoryDatasetGroup( const QString &name );
756
757 void initialize() override;
758 int datasetCount() const override;
759 QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const override;
760 QgsMeshDataset *dataset( int index ) const override;
762
764 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const override;
765
767 void addDataset( std::shared_ptr<QgsMeshMemoryDataset> dataset );
768
770 void clearDatasets();
771
773 std::shared_ptr<const QgsMeshMemoryDataset> constDataset( int index ) const;
774
776 QVector<std::shared_ptr<QgsMeshMemoryDataset>> memoryDatasets;
777};
778
787{
788 public:
791
792 QgsMeshDatasetValue datasetValue( int valueIndex ) const override;
793 QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const override;
794 ;
795 QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const override;
796 ;
797 bool isActive( int ) const override { return true; };
798 QgsMeshDatasetMetadata metadata() const override;
799 ;
800 int valuesCount() const override;
801
802 private:
803 QgsMesh *mMesh;
804};
805
816{
817 public:
820
821 void initialize() override;
822 QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const override;
823 ;
824 int datasetCount() const override;
825 ;
826 QgsMeshDataset *dataset( int index ) const override;
827 ;
828 QgsMeshDatasetGroup::Type type() const override;
829 QDomElement writeXml( QDomDocument &, const QgsReadWriteContext & ) const override { return QDomElement(); };
830
831 private:
832 std::unique_ptr<QgsMeshVerticesElevationDataset> mDataset;
833};
834
835#endif //SIP_RUN
836
863
865{
866 public:
871
880 QgsMeshDatasetGroupTreeItem( const QString &defaultName, const QString &sourceName, bool isVector, int index );
881
888 QgsMeshDatasetGroupTreeItem( const QDomElement &itemElement, const QgsReadWriteContext &context );
889
895
902
909
917
924
933
938 int childCount() const;
939
944 int totalChildCount() const;
945
952 QList<int> enabledDatasetGroupIndexes() const;
953
959
964 int row() const;
965
971 QString name() const;
972
979 void setName( const QString &name );
980
988 QString providerName() const;
989
993 bool isVector() const;
994
998 int datasetGroupIndex() const;
999
1003 bool isEnabled() const;
1004
1009 void setIsEnabled( bool isEnabled );
1010
1014 QString defaultName() const;
1015
1022
1029 QList<int> groupIndexDependencies() const;
1030
1036 QString description() const;
1037
1045 void setDatasetGroup( QgsMeshDatasetGroup *datasetGroup );
1046
1054 void setPersistentDatasetGroup( const QString &uri );
1055
1062 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context );
1063
1064 private:
1065 QgsMeshDatasetGroupTreeItem *mParent = nullptr;
1066 QList< QgsMeshDatasetGroupTreeItem * > mChildren;
1067 QMap<int, QgsMeshDatasetGroupTreeItem *> mDatasetGroupIndexToChild;
1068
1069 // Data
1070 QString mUserName;
1071 QString mOriginalName;
1072 QString mSourceName;
1073 QgsMeshDatasetGroup::Type mDatasetGroupType = QgsMeshDatasetGroup::Unknown;
1074 QString mDescription;
1075
1076 bool mIsVector = false;
1077 int mDatasetGroupIndex = -1;
1078 bool mIsEnabled = true;
1079
1080 QList<int> mDatasetGroupDependencies;
1081 QList<int> mDatasetGroupDependentOn;
1082
1083 QgsMeshDatasetGroupTreeItem *searchItemBySourceName( const QString &sourceName ) const;
1084 QgsMeshDatasetGroupTreeItem *rootItem() const;
1085 void freeAsDependency(); // cppcheck-suppress functionConst
1086 void freeFromDependencies(); // cppcheck-suppress functionConst
1087};
1088
1089#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:133
#define SIP_TRANSFER
Definition qgis_sip.h:35
#define SIP_FACTORY
Definition qgis_sip.h:83
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Mesh - vertices, edges and faces.