18 #ifndef QGSMESHLAYERRENDERER_H
19 #define QGSMESHLAYERRENDERER_H
55 struct CORE_NO_EXPORT QgsMeshLayerRendererCache
57 int mDatasetGroupsCount = 0;
61 QVector<double> mScalarDatasetValues;
64 double mScalarDatasetMinimum = std::numeric_limits<double>::quiet_NaN();
65 double mScalarDatasetMaximum = std::numeric_limits<double>::quiet_NaN();
67 std::unique_ptr<QgsMesh3dAveragingMethod> mScalarAveragingMethod;
72 QVector<double> mVectorDatasetValuesMag;
73 double mVectorDatasetMagMinimum = std::numeric_limits<double>::quiet_NaN();
74 double mVectorDatasetMagMaximum = std::numeric_limits<double>::quiet_NaN();
75 double mVectorDatasetGroupMagMinimum = std::numeric_limits<double>::quiet_NaN();
76 double mVectorDatasetGroupMagMaximum = std::numeric_limits<double>::quiet_NaN();
78 std::unique_ptr<QgsMesh3dAveragingMethod> mVectorAveragingMethod;
104 void renderFaceMesh(
const QgsMeshRendererMeshSettings &settings,
const QVector<QgsMeshFace> &faces,
const QList<int> &facesInExtent );
105 void renderScalarDataset();
109 void renderVectorDataset();
113 void calculateOutputSize();
115 bool mIsMeshSimplificationActive =
false;
120 std::unique_ptr<QgsMeshLayerRendererFeedback>
mFeedback;
157 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.
Implementation of threaded rendering for mesh layers.
double mScalarDatasetMaximum
QgsMeshDatasetGroupMetadata::DataType mScalarDataType
double mVectorDatasetMagMinimum
double mScalarDatasetMinimum
QgsTriangularMesh mTriangularMesh
QgsMeshLayerRenderer(QgsMeshLayer *layer, QgsRenderContext &context)
Ctor.
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 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.
@ None
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.