16#ifndef QGSMESH3DSYMBOL_H
17#define QGSMESH3DSYMBOL_H
26#include <Qt3DRender/QCullFace>
79 QString
type()
const override {
return "mesh"; }
90 bool isEnabled() const;
97 void setEnabled(
bool enabled );
111 void setCullingMode( const
Qgs3DTypes::CullingMode &mode );
114 Qgis::AltitudeClamping altitudeClamping()
const {
return mAltClamping; }
148 bool smoothedTriangles()
const;
155 void setSmoothedTriangles(
bool smoothTriangles );
162 bool wireframeEnabled()
const;
169 void setWireframeEnabled(
bool wireframeEnabled );
176 double wireframeLineWidth()
const;
183 void setWireframeLineWidth(
double wireframeLineWidth );
190 QColor wireframeLineColor()
const;
197 void setWireframeLineColor(
const QColor &wireframeLineColor );
204 double verticalScale()
const;
211 void setVerticalScale(
double verticalScale );
232 QColor singleMeshColor()
const;
239 void setSingleMeshColor(
const QColor &singleMeshColor );
260 int verticalDatasetGroupIndex()
const;
267 void setVerticalDatasetGroupIndex(
int verticalDatasetGroupIndex );
274 bool isVerticalMagnitudeRelative()
const;
281 void setIsVerticalMagnitudeRelative(
bool isVerticalMagnitudeRelative );
288 bool arrowsEnabled()
const;
295 void setArrowsEnabled(
bool arrowsEnabled );
302 double arrowsSpacing()
const;
309 void setArrowsSpacing(
double arrowsSpacing );
318 int maximumTextureSize()
const;
327 void setMaximumTextureSize(
int maximumTextureSize );
334 bool arrowsFixedSize()
const;
341 void setArrowsFixedSize(
bool arrowsFixedSize );
349 int levelOfDetailIndex()
const;
357 void setLevelOfDetailIndex(
int lod );
363 float mHeight = 0.0f;
364 std::unique_ptr< QgsAbstractMaterialSettings > mMaterialSettings;
365 bool mAddBackFaces =
false;
367 bool mEnabled =
true;
372 bool mSmoothedTriangles =
false;
373 bool mWireframeEnabled =
false;
374 double mWireframeLineWidth = 1.0;
375 QColor mWireframeLineColor = Qt::darkGray;
376 int mLevelOfDetailIndex = 0;
379 double mVerticalScale = 1.0;
380 int mVerticalDatasetGroupIndex = -1;
381 bool mIsVerticalMagnitudeRelative =
false;
386 QColor mSingleColor = Qt::darkGreen;
389 bool mArrowsEnabled =
false;
390 double mArrowsSpacing = 25;
391 bool mArrowsFixedSize =
false;
392 QColor mArrowsColor = Qt::yellow;
393 int mMaximumTextureSize = 1024;
The Qgis class provides global constants for use throughout the application.
AltitudeClamping
Altitude clamping.
@ Relative
Elevation is relative to terrain height (final elevation = terrain elevation + feature elevation)
CullingMode
Triangle culling mode.
@ NoCulling
Will render both front and back faces of triangles.
virtual QgsAbstract3DSymbol * clone() const =0
Returns a new instance of the symbol with the same settings.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
ZValueType
How to render the Z value of the mesh.
void setAddBackFaces(bool add)
Sets whether also triangles facing the other side will be created.
QString type() const override
Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
void setHeight(float height)
Sets height (altitude) of the symbol (in map units)
bool addBackFaces() const
Returns whether also triangles facing the other side will be created.
void setAltitudeClamping(Qgis::AltitudeClamping altClamping)
Sets method that determines altitude (whether to clamp to feature to terrain)
float height() const
Returns height (altitude) of the symbol (in map units)
~QgsMesh3DSymbol() override
RenderingStyle
How to render the color of the mesh.
@ ColorRamp
Render the mesh with a color ramp.
@ SingleColor
Render the mesh with a single color.
The class is used as a container of context for various read/write operations on other objects.