QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsMesh3DDataBlock Class Reference

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...
 

Detailed Description

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

Note
The API is considered EXPERIMENTAL and can be changed without a notice
In QGIS 3.34 this class was renamed from QgsMesh3dDataBlock to QgsMesh3DDataBlock. The old QgsMesh3dDataBlock name remains available in PyQGIS for compatibility.
Since
QGIS 3.12

Definition at line 249 of file qgsmeshdataset.h.

Constructor & Destructor Documentation

◆ QgsMesh3DDataBlock() [1/2]

QgsMesh3DDataBlock::QgsMesh3DDataBlock ( )
default

Constructs an invalid block.

◆ ~QgsMesh3DDataBlock()

QgsMesh3DDataBlock::~QgsMesh3DDataBlock ( )

Dtor.

Definition at line 334 of file qgsmeshdataset.cpp.

◆ QgsMesh3DDataBlock() [2/2]

QgsMesh3DDataBlock::QgsMesh3DDataBlock ( int  count,
bool  isVector 
)

Constructs a new block for count faces.

Definition at line 336 of file qgsmeshdataset.cpp.

Member Function Documentation

◆ count()

int QgsMesh3DDataBlock::count ( ) const

Number of 2d faces for which the volume data is stored in the block.

Definition at line 352 of file qgsmeshdataset.cpp.

◆ faceToVolumeIndex()

QVector< int > QgsMesh3DDataBlock::faceToVolumeIndex ( ) const

Returns the indexing between faces and volumes.

Definition at line 408 of file qgsmeshdataset.cpp.

◆ firstVolumeIndex()

int QgsMesh3DDataBlock::firstVolumeIndex ( ) const

Index of the first volume stored in the buffer (absolute)

Definition at line 357 of file qgsmeshdataset.cpp.

◆ isValid()

bool QgsMesh3DDataBlock::isValid ( ) const

Whether the block is valid.

Definition at line 342 of file qgsmeshdataset.cpp.

◆ isVector()

bool QgsMesh3DDataBlock::isVector ( ) const

Whether we store vector values.

Definition at line 347 of file qgsmeshdataset.cpp.

◆ lastVolumeIndex()

int QgsMesh3DDataBlock::lastVolumeIndex ( ) const

Index of the last volume stored in the buffer (absolute)

Definition at line 364 of file qgsmeshdataset.cpp.

◆ setFaceToVolumeIndex()

void QgsMesh3DDataBlock::setFaceToVolumeIndex ( const QVector< int > &  faceToVolumeIndex)

Sets the indexing between faces and volumes.

Definition at line 384 of file qgsmeshdataset.cpp.

◆ setValid()

void QgsMesh3DDataBlock::setValid ( bool  valid)

Sets block validity.

Definition at line 440 of file qgsmeshdataset.cpp.

◆ setValues()

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 434 of file qgsmeshdataset.cpp.

◆ setVerticalLevels()

void QgsMesh3DDataBlock::setVerticalLevels ( const QVector< double > &  verticalLevels)

Sets the vertical levels height.

Definition at line 402 of file qgsmeshdataset.cpp.

◆ setVerticalLevelsCount()

void QgsMesh3DDataBlock::setVerticalLevelsCount ( const QVector< int > &  verticalLevelsCount)

Sets the vertical level counts.

Definition at line 390 of file qgsmeshdataset.cpp.

◆ value()

QgsMeshDatasetValue QgsMesh3DDataBlock::value ( int  volumeIndex) const

Returns the value at volume centers.

Parameters
volumeIndexvolume index relative to firstVolumeIndex()
Returns
value (scalar or vector)

Definition at line 420 of file qgsmeshdataset.cpp.

◆ values()

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 414 of file qgsmeshdataset.cpp.

◆ verticalLevels()

QVector< double > QgsMesh3DDataBlock::verticalLevels ( ) const

Returns the vertical levels height.

Definition at line 396 of file qgsmeshdataset.cpp.

◆ verticalLevelsCount()

QVector< int > QgsMesh3DDataBlock::verticalLevelsCount ( ) const

Returns number of vertical level above 2d faces.

Definition at line 378 of file qgsmeshdataset.cpp.

◆ volumesCount()

int QgsMesh3DDataBlock::volumesCount ( ) const

Returns number of volumes stored in the buffer.

Definition at line 373 of file qgsmeshdataset.cpp.


The documentation for this class was generated from the following files: