18#ifndef QGSMESHLAYERRENDERER_H
19#define QGSMESHLAYERRENDERER_H
56struct CORE_NO_EXPORT QgsMeshLayerRendererCache
58 int mDatasetGroupsCount = 0;
62 QVector<double> mScalarDatasetValues;
65 double mScalarDatasetMinimum = std::numeric_limits<double>::quiet_NaN();
66 double mScalarDatasetMaximum = std::numeric_limits<double>::quiet_NaN();
68 std::unique_ptr<QgsMesh3DAveragingMethod> mScalarAveragingMethod;
74 QVector<double> mVectorDatasetValuesMag;
75 double mVectorDatasetMagMinimum = std::numeric_limits<double>::quiet_NaN();
76 double mVectorDatasetMagMaximum = std::numeric_limits<double>::quiet_NaN();
77 double mVectorDatasetGroupMagMinimum = std::numeric_limits<double>::quiet_NaN();
78 double mVectorDatasetGroupMagMaximum = std::numeric_limits<double>::quiet_NaN();
80 std::unique_ptr<QgsMesh3DAveragingMethod> mVectorAveragingMethod;
104 void prepareLabeling(
QgsMeshLayer *layer, QSet<QString> &attributeNames );
107 void renderFaceMesh(
const QgsMeshRendererMeshSettings &settings,
const QVector<QgsMeshFace> &faces,
const QList<int> &facesInExtent );
108 void renderScalarDataset();
111 void registerLabelFeatures();
113 void renderVectorDataset();
117 void calculateOutputSize();
119 bool mIsMeshSimplificationActive =
false;
121 bool mIsEditable =
false;
133 std::unique_ptr<QgsMeshLayerRendererFeedback>
mFeedback;
178 double mLayerOpacity = 1.0;
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e....
QgsMeshDatasetIndex is index that identifies the dataset group (e.g.
The QgsMeshLayerLabelProvider class implements a label provider for mesh layers.
Implementation of threaded rendering for mesh layers.
double mScalarDatasetMaximum
QgsMeshDatasetGroupMetadata::DataType mScalarDataType
double mVectorDatasetMagMinimum
double mScalarDatasetMinimum
QgsTriangularMesh mTriangularMesh
QVector< double > mScalarDatasetValues
std::unique_ptr< QgsMeshLayerRendererFeedback > mFeedback
feedback class for cancellation
~QgsMeshLayerRenderer() override=default
QgsMeshDataBlock mScalarActiveFaceFlagValues
bool render() override
Do the rendering (based on data stored in the class).
double mVectorDatasetMagMaximum
QgsRectangle mLayerExtent
QVector< double > mVectorDatasetValuesMag
double mVectorDatasetGroupMagMaximum
QgsMeshRendererSettings mRendererSettings
bool forceRasterRender() const override
Returns true if the renderer must be rendered to a raster paint device (e.g.
QgsMeshDatasetGroupMetadata::DataType mVectorDataType
double mVectorDatasetGroupMagMinimum
QList< QgsMapClippingRegion > mClippingRegions
QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be nullptr)
QgsMeshDataBlock mVectorActiveFaceFlagValues
QgsMeshDataBlock mVectorDatasetValues
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a mesh renderer settings for mesh object.
Represents a mesh renderer settings for scalar datasets.
DataResamplingMethod
Resampling of value from dataset.
@ NoResampling
Does not use resampling.
Represents all mesh renderer settings.
A class to represent a 2D point.
Feedback object tailored for raster block reading.
A rectangle specified with double values.
Contains information about the context of a rendering operation.
Triangular/Derived Mesh is mesh with vertices in map coordinates.
Mesh - vertices, edges and faces.