18#ifndef QGSMESHRENDERERSETTINGS_H
19#define QGSMESHRENDERERSETTINGS_H
45 bool isEnabled()
const;
47 void setEnabled(
bool enabled );
50 double lineWidth()
const;
52 void setLineWidth(
double lineWidth );
57 void setColor(
const QColor &color );
74 QDomElement writeXml( QDomDocument &doc )
const;
76 void readXml(
const QDomElement &elem );
79 bool mEnabled =
false;
82 QColor mColor = Qt::black;
125 double classificationMinimum()
const;
127 double classificationMaximum()
const;
129 void setClassificationMinimumMaximum(
double minimum,
double maximum );
132 double opacity()
const;
134 void setOpacity(
double opacity );
143 DataResamplingMethod dataResamplingMethod()
const;
150 void setDataResamplingMethod(
const DataResamplingMethod &dataResamplingMethod );
187 DataResamplingMethod mDataResamplingMethod = DataResamplingMethod::None;
188 double mClassificationMinimum = 0;
189 double mClassificationMaximum = 0;
232 void setShaftLengthMethod( ArrowScalingMethod shaftLengthMethod );
239 double minShaftLength()
const;
246 void setMinShaftLength(
double minShaftLength );
253 double maxShaftLength()
const;
260 void setMaxShaftLength(
double maxShaftLength );
267 double scaleFactor()
const;
274 void setScaleFactor(
double scaleFactor );
281 double fixedShaftLength()
const;
288 void setFixedShaftLength(
double fixedShaftLength );
291 double arrowHeadWidthRatio()
const;
293 void setArrowHeadWidthRatio(
double arrowHeadWidthRatio );
296 double arrowHeadLengthRatio()
const;
298 void setArrowHeadLengthRatio(
double arrowHeadLengthRatio );
301 QDomElement writeXml( QDomDocument &doc )
const;
303 void readXml(
const QDomElement &elem );
307 double mMinShaftLength = 0.8;
308 double mMaxShaftLength = 10;
309 double mScaleFactor = 10;
310 double mFixedShaftLength = 20;
311 double mArrowHeadWidthRatio = 0.15;
312 double mArrowHeadLengthRatio = 0.40;
343 SeedingStartPointsMethod seedingMethod()
const;
345 void setSeedingMethod(
const SeedingStartPointsMethod &seedingMethod );
347 double seedingDensity()
const;
349 void setSeedingDensity(
double seedingDensity );
351 void readXml(
const QDomElement &elem );
353 QDomElement writeXml( QDomDocument &doc )
const;
358 double mSeedingDensity = 0.15;
375 double maximumTailLength()
const;
377 void setMaximumTailLength(
double maximumTailLength );
379 int particlesCount()
const;
381 void setParticlesCount(
int value );
388 void readXml(
const QDomElement &elem );
390 QDomElement writeXml( QDomDocument &doc )
const;
395 int mParticlesCount = 1000;
396 double mMaximumTailLength = 100;
429 double lineWidth()
const;
431 void setLineWidth(
double lineWidth );
434 QColor color()
const;
436 void setColor(
const QColor &color );
444 double filterMin()
const;
450 void setFilterMin(
double filterMin );
458 double filterMax()
const;
464 void setFilterMax(
double filterMax );
467 bool isOnUserDefinedGrid()
const;
469 void setOnUserDefinedGrid(
bool enabled );
471 int userGridCellWidth()
const;
473 void setUserGridCellWidth(
int width );
475 int userGridCellHeight()
const;
477 void setUserGridCellHeight(
int height );
483 Symbology symbology()
const;
489 void setSymbology(
const Symbology &symbology );
564 Symbology mDisplayingMethod = Arrows;
568 QColor mColor = Qt::black;
570 double mFilterMin = -1;
571 double mFilterMax = -1;
572 int mUserGridCellWidth = 10;
573 int mUserGridCellHeight = 10;
574 bool mOnUserDefinedGrid =
false;
656 int activeScalarDatasetGroup()
const;
662 void setActiveScalarDatasetGroup(
int activeScalarDatasetGroup );
668 int activeVectorDatasetGroup()
const;
674 void setActiveVectorDatasetGroup(
int activeVectorDatasetGroup );
681 bool hasSettings(
int datasetGroupIndex )
const;
688 QHash<int, QgsMeshRendererScalarSettings> mRendererScalarSettings;
689 QHash<int, QgsMeshRendererVectorSettings> mRendererVectorSettings;
692 int mActiveScalarDatasetGroup = -1;
695 int mActiveVectorDatasetGroup = -1;
698 std::shared_ptr<QgsMesh3dAveragingMethod> mAveragingMethod;
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Class defining color to render mesh datasets.
ColoringMethod
Defines how the color is defined.
@ SingleColor
Render with a single color.
Represents a width than can vary depending on values.
Abstract class to interpolate 3d stacked mesh data to 2d data.
Represents a mesh renderer settings for mesh object.
Represents a mesh renderer settings for scalar datasets.
DataResamplingMethod
Resampling of value from dataset.
@ NeighbourAverage
Does a simple average of values defined for all surrounding faces/vertices.
Represents all mesh renderer settings.
QgsMeshRendererScalarSettings scalarSettings(int groupIndex) const
Returns renderer settings.
void setEdgeMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new edge mesh renderer settings.
QgsMeshRendererVectorSettings vectorSettings(int groupIndex) const
Returns renderer settings.
void setVectorSettings(int groupIndex, const QgsMeshRendererVectorSettings &settings)
Sets new renderer settings.
void setTriangularMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new triangular mesh renderer settings.
QgsMeshRendererMeshSettings edgeMeshSettings() const
Returns edge mesh renderer settings.
QgsMeshRendererMeshSettings nativeMeshSettings() const
Returns native mesh renderer settings.
void setScalarSettings(int groupIndex, const QgsMeshRendererScalarSettings &settings)
Sets new renderer settings.
QgsMeshRendererMeshSettings triangularMeshSettings() const
Returns triangular mesh renderer settings.
~QgsMeshRendererSettings()
Destructor.
void setNativeMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new native mesh renderer settings, triggers repaint.
Represents a mesh renderer settings for vector datasets displayed with arrows.
ArrowScalingMethod
Algorithm how to transform vector magnitude to length of arrow on the device in pixels.
@ Scaled
Scale vector magnitude by factor scaleFactor()
Represents a renderer settings for vector datasets.
Symbology
Defines the symbology of vector rendering.
@ Streamlines
Displaying vector dataset with streamlines.
Represents a streamline renderer settings for vector datasets displayed by streamlines.
SeedingStartPointsMethod
Method used to define start points that are used to draw streamlines.
Represents a trace renderer settings for vector datasets displayed by particle traces.
The class is used as a container of context for various read/write operations on other objects.
RenderUnit
Rendering size units.
@ RenderMillimeters
Millimeters.
const double DEFAULT_LINE_WIDTH