18#ifndef QGSMESHRENDERERSETTINGS_H 
   19#define QGSMESHRENDERERSETTINGS_H 
   43    bool isEnabled() 
const;
 
   45    void setEnabled( 
bool enabled );
 
   48    double lineWidth() 
const;
 
   50    void setLineWidth( 
double lineWidth );
 
   55    void setColor( 
const QColor &color );
 
   72    QDomElement writeXml( QDomDocument &doc ) 
const;
 
   74    void readXml( 
const QDomElement &elem );
 
   77    bool mEnabled = 
false;
 
   80    QColor mColor = Qt::black;
 
 
  123    double classificationMinimum() 
const;
 
  125    double classificationMaximum() 
const;
 
  127    void setClassificationMinimumMaximum( 
double minimum, 
double maximum );
 
  130    double opacity() 
const;
 
  132    void setOpacity( 
double opacity );
 
  141    DataResamplingMethod dataResamplingMethod() 
const;
 
  148    void setDataResamplingMethod( 
const DataResamplingMethod &dataResamplingMethod );
 
  215    DataResamplingMethod mDataResamplingMethod = DataResamplingMethod::NoResampling;
 
  216    double mClassificationMinimum = 0;
 
  217    double mClassificationMaximum = 0;
 
 
  263    void setShaftLengthMethod( ArrowScalingMethod shaftLengthMethod );
 
  270    double minShaftLength() 
const;
 
  277    void setMinShaftLength( 
double minShaftLength );
 
  284    double maxShaftLength() 
const;
 
  291    void setMaxShaftLength( 
double maxShaftLength );
 
  298    double scaleFactor() 
const;
 
  305    void setScaleFactor( 
double scaleFactor );
 
  312    double fixedShaftLength() 
const;
 
  319    void setFixedShaftLength( 
double fixedShaftLength );
 
  322    double arrowHeadWidthRatio() 
const;
 
  324    void setArrowHeadWidthRatio( 
double arrowHeadWidthRatio );
 
  327    double arrowHeadLengthRatio() 
const;
 
  329    void setArrowHeadLengthRatio( 
double arrowHeadLengthRatio );
 
  332    QDomElement writeXml( QDomDocument &doc ) 
const;
 
  334    void readXml( 
const QDomElement &elem );
 
  338    double mMinShaftLength = 0.8; 
 
  339    double mMaxShaftLength = 10; 
 
  340    double mScaleFactor = 10;
 
  341    double mFixedShaftLength = 20; 
 
  342    double mArrowHeadWidthRatio = 0.15;
 
  343    double mArrowHeadLengthRatio = 0.40;
 
 
  374    SeedingStartPointsMethod seedingMethod() 
const;
 
  376    void setSeedingMethod( 
const SeedingStartPointsMethod &seedingMethod );
 
  378    double seedingDensity() 
const;
 
  380    void setSeedingDensity( 
double seedingDensity );
 
  382    void readXml( 
const QDomElement &elem );
 
  384    QDomElement writeXml( QDomDocument &doc ) 
const;
 
  389    double mSeedingDensity = 0.15;
 
 
  406    double maximumTailLength() 
const;
 
  408    void setMaximumTailLength( 
double maximumTailLength );
 
  410    int particlesCount() 
const;
 
  412    void setParticlesCount( 
int value );
 
  419    void readXml( 
const QDomElement &elem );
 
  421    QDomElement writeXml( QDomDocument &doc ) 
const;
 
  424    int mParticlesCount = 1000;
 
  425    double mMaximumTailLength = 100;
 
 
  457    double magnitudeMultiplier() 
const;
 
  462    void setMagnitudeMultiplier( 
double magnitudeMultiplier );
 
  467    double shaftLength() 
const;
 
  472    void setShaftLength( 
double shaftLength );
 
  491    WindSpeedUnit magnitudeUnits() 
const;
 
  496    void setMagnitudeUnits( WindSpeedUnit units );
 
  499    QDomElement writeXml( QDomDocument &doc ) 
const;
 
  501    void readXml( 
const QDomElement &elem );
 
  504    double mShaftLength = 10;
 
  506    WindSpeedUnit mMagnitudeUnits = WindSpeedUnit::MetersPerSecond;
 
  507    double mMagnitudeMultiplier = 1;
 
 
  540    double lineWidth() 
const;
 
  542    void setLineWidth( 
double lineWidth );
 
  545    QColor color() 
const;
 
  547    void setColor( 
const QColor &color );
 
  555    double filterMin() 
const;
 
  561    void setFilterMin( 
double filterMin );
 
  569    double filterMax() 
const;
 
  575    void setFilterMax( 
double filterMax );
 
  578    bool isOnUserDefinedGrid() 
const;
 
  580    void setOnUserDefinedGrid( 
bool enabled );
 
  582    int userGridCellWidth() 
const;
 
  584    void setUserGridCellWidth( 
int width );
 
  586    int userGridCellHeight() 
const;
 
  588    void setUserGridCellHeight( 
int height );
 
  594    Symbology symbology() 
const;
 
  600    void setSymbology( 
const Symbology &symbology );
 
  687    Symbology mDisplayingMethod = Arrows;
 
  691    QColor mColor = Qt::black;
 
  693    double mFilterMin = -1; 
 
  694    double mFilterMax = -1; 
 
  695    int mUserGridCellWidth = 10; 
 
  696    int mUserGridCellHeight = 10; 
 
  697    bool mOnUserDefinedGrid = 
false;
 
 
  756    bool hasScalarSettings( 
int groupIndex )
 const {
return mRendererScalarSettings.contains( groupIndex );}
 
  773    bool hasVectorSettings( 
int groupIndex )
 const {
return mRendererVectorSettings.contains( groupIndex );}
 
  804    int activeScalarDatasetGroup() 
const;
 
  810    void setActiveScalarDatasetGroup( 
int activeScalarDatasetGroup );
 
  816    int activeVectorDatasetGroup() 
const;
 
  822    void setActiveVectorDatasetGroup( 
int activeVectorDatasetGroup );
 
  829    bool hasSettings( 
int datasetGroupIndex ) 
const;
 
  836    QHash<int, QgsMeshRendererScalarSettings> mRendererScalarSettings;  
 
  837    QHash<int, QgsMeshRendererVectorSettings> mRendererVectorSettings;  
 
  840    int mActiveScalarDatasetGroup = -1;
 
  843    int mActiveVectorDatasetGroup = -1;
 
  846    std::shared_ptr<QgsMesh3DAveragingMethod> mAveragingMethod;
 
 
static const double DEFAULT_LINE_WIDTH
The default width (in millimeters) for line symbols.
MeshRangeLimit
Describes the limits used to compute mesh ranges (min/max values).
MeshRangeExtent
Describes the extent used to compute mesh ranges (min/max values).
@ WholeMesh
Whole mesh is used to compute statistics.
RenderUnit
Rendering size units.
@ Millimeters
Millimeters.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Defines color interpolation for rendering mesh datasets.
ColoringMethod
Defines how the color is defined.
@ SingleColor
Render with a single color.
Represents a width that can vary depending on values.
Abstract class for interpolating 3d stacked mesh data to 2d data.
Represents a mesh renderer settings for mesh objects.
Represents a mesh renderer settings for scalar datasets.
Qgis::MeshRangeExtent extent() const
Returns the mesh extent for minimum maximum calculation.
Qgis::MeshRangeLimit limits() const
Returns the range limits type for minimum maximum calculation.
void setExtent(Qgis::MeshRangeExtent extent)
Sets the mesh extent for minimum maximum calculation.
DataResamplingMethod
Resampling of value from dataset.
@ NeighbourAverage
Does a simple average of values defined for all surrounding faces/vertices.
void setLimits(Qgis::MeshRangeLimit limits)
Sets the range limits type for minimum maximum calculation.
Represents all mesh renderer settings.
QgsMeshRendererScalarSettings scalarSettings(int groupIndex) const
Returns renderer settings.
bool hasVectorSettings(int groupIndex) const
Returns whether groupIndex has existing vector settings.
void setEdgeMeshSettings(const QgsMeshRendererMeshSettings &settings)
Sets new edge mesh renderer settings.
bool removeVectorSettings(int groupIndex)
Removes vector settings for groupIndex.
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.
bool hasScalarSettings(int groupIndex) const
Returns whether groupIndex has existing scalar settings.
bool removeScalarSettings(int groupIndex)
Removes scalar settings with groupIndex.
void setScalarSettings(int groupIndex, const QgsMeshRendererScalarSettings &settings)
Sets new renderer settings.
QgsMeshRendererMeshSettings triangularMeshSettings() const
Returns triangular mesh renderer settings.
~QgsMeshRendererSettings()
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()
@ MinMax
Scale vector magnitude linearly to fit in range of vectorFilterMin() and vectorFilterMax()
Represents a renderer settings for vector datasets.
Symbology
Defines the symbology of vector rendering.
@ Traces
Displaying vector dataset with particle traces.
@ 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.
Represents a mesh renderer settings for vector datasets displayed with wind barbs.
WindSpeedUnit
Wind speed units. Wind barbs use knots so we use this enum for preset conversion values.
A container for the context for various read/write operations on objects.