QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
QgsMesh3dDataBlock is a block of 3d stacked mesh data related N faces defined on base mesh frame. More...
#include <qgsmeshdataset.h>
Public Member Functions | |
QgsMesh3dDataBlock () | |
Constructs an invalid block. More... | |
QgsMesh3dDataBlock (int count, bool isVector) | |
Constructs a new block for count faces. More... | |
~QgsMesh3dDataBlock () | |
Dtor. More... | |
int | count () const |
Number of 2d faces for which the volume data is stored in the block. More... | |
QVector< int > | faceToVolumeIndex () const |
Returns the indexing between faces and volumes. More... | |
int | firstVolumeIndex () const |
Index of the first volume stored in the buffer (absolute) More... | |
bool | isValid () const |
Whether the block is valid. More... | |
bool | isVector () const |
Whether we store vector values. More... | |
int | lastVolumeIndex () const |
Index of the last volume stored in the buffer (absolute) More... | |
void | setFaceToVolumeIndex (const QVector< int > &faceToVolumeIndex) |
Sets the indexing between faces and volumes. More... | |
void | setValid (bool valid) |
Sets block validity. More... | |
void | setValues (const QVector< double > &doubleBuffer) |
Sets the values at volume centers. More... | |
void | setVerticalLevels (const QVector< double > &verticalLevels) |
Sets the vertical levels height. More... | |
void | setVerticalLevelsCount (const QVector< int > &verticalLevelsCount) |
Sets the vertical level counts. More... | |
QgsMeshDatasetValue | value (int volumeIndex) const |
Returns the value at volume centers. More... | |
QVector< double > | values () const |
Returns the values at volume centers. More... | |
QVector< double > | verticalLevels () const |
Returns the vertical levels height. More... | |
QVector< int > | verticalLevelsCount () const |
Returns number of vertical level above 2d faces. More... | |
int | volumesCount () const |
Returns number of volumes stored in the buffer. More... | |
QgsMesh3dDataBlock is a block of 3d stacked mesh data related N faces defined on base mesh frame.
data are implicitly shared, so the class can be quickly copied std::numeric_limits<double>::quiet_NaN() represents NODATA value
Definition at line 244 of file qgsmeshdataset.h.
|
default |
Constructs an invalid block.
QgsMesh3dDataBlock::~QgsMesh3dDataBlock | ( | ) |
Dtor.
Definition at line 333 of file qgsmeshdataset.cpp.
QgsMesh3dDataBlock::QgsMesh3dDataBlock | ( | int | count, |
bool | isVector | ||
) |
Constructs a new block for count faces.
Definition at line 335 of file qgsmeshdataset.cpp.
int QgsMesh3dDataBlock::count | ( | ) | const |
Number of 2d faces for which the volume data is stored in the block.
Definition at line 351 of file qgsmeshdataset.cpp.
QVector< int > QgsMesh3dDataBlock::faceToVolumeIndex | ( | ) | const |
Returns the indexing between faces and volumes.
Definition at line 407 of file qgsmeshdataset.cpp.
int QgsMesh3dDataBlock::firstVolumeIndex | ( | ) | const |
Index of the first volume stored in the buffer (absolute)
Definition at line 356 of file qgsmeshdataset.cpp.
bool QgsMesh3dDataBlock::isValid | ( | ) | const |
Whether the block is valid.
Definition at line 341 of file qgsmeshdataset.cpp.
bool QgsMesh3dDataBlock::isVector | ( | ) | const |
Whether we store vector values.
Definition at line 346 of file qgsmeshdataset.cpp.
int QgsMesh3dDataBlock::lastVolumeIndex | ( | ) | const |
Index of the last volume stored in the buffer (absolute)
Definition at line 363 of file qgsmeshdataset.cpp.
void QgsMesh3dDataBlock::setFaceToVolumeIndex | ( | const QVector< int > & | faceToVolumeIndex | ) |
Sets the indexing between faces and volumes.
Definition at line 383 of file qgsmeshdataset.cpp.
void QgsMesh3dDataBlock::setValid | ( | bool | valid | ) |
Sets block validity.
Definition at line 439 of file qgsmeshdataset.cpp.
void QgsMesh3dDataBlock::setValues | ( | const QVector< double > & | doubleBuffer | ) |
Sets the values at volume centers.
For vector datasets the number of values is doubled (x1, y1, x2, y2, ... )
Definition at line 433 of file qgsmeshdataset.cpp.
void QgsMesh3dDataBlock::setVerticalLevels | ( | const QVector< double > & | verticalLevels | ) |
Sets the vertical levels height.
Definition at line 401 of file qgsmeshdataset.cpp.
void QgsMesh3dDataBlock::setVerticalLevelsCount | ( | const QVector< int > & | verticalLevelsCount | ) |
Sets the vertical level counts.
Definition at line 389 of file qgsmeshdataset.cpp.
QgsMeshDatasetValue QgsMesh3dDataBlock::value | ( | int | volumeIndex | ) | const |
Returns the value at volume centers.
volumeIndex | volume index relative to firstVolumeIndex() |
Definition at line 419 of file qgsmeshdataset.cpp.
QVector< double > QgsMesh3dDataBlock::values | ( | ) | const |
Returns the values at volume centers.
For vector datasets the number of values is doubled (x1, y1, x2, y2, ... )
Definition at line 413 of file qgsmeshdataset.cpp.
QVector< double > QgsMesh3dDataBlock::verticalLevels | ( | ) | const |
Returns the vertical levels height.
Definition at line 395 of file qgsmeshdataset.cpp.
QVector< int > QgsMesh3dDataBlock::verticalLevelsCount | ( | ) | const |
Returns number of vertical level above 2d faces.
Definition at line 377 of file qgsmeshdataset.cpp.
int QgsMesh3dDataBlock::volumesCount | ( | ) | const |
Returns number of volumes stored in the buffer.
Definition at line 372 of file qgsmeshdataset.cpp.