16 #ifndef QGSPOLYGON3DSYMBOL_H 17 #define QGSPOLYGON3DSYMBOL_H 25 #include <Qt3DRender/QCullFace> 42 QString
type()
const override {
return "polygon"; }
59 float height()
const {
return mHeight; }
61 void setHeight(
float height ) { mHeight = height; }
101 float mHeight = 0.0f;
102 float mExtrusionHeight = 0.0f;
105 bool mInvertNormals =
false;
106 bool mAddBackFaces =
false;
110 #endif // QGSPOLYGON3DSYMBOL_H AltitudeClamping
how to handle altitude of vector features
The class is used as a container of context for various read/write operations on other objects...
virtual QgsAbstract3DSymbol * clone() const =0
Returns a new instance of the symbol with the same settings.
QgsPhongMaterialSettings material() const
Returns material used for shading of the symbol.
3 3D symbol that draws polygon geometries as planar polygons, optionally extruded (with added walls)...
CullingMode
Triangle culling mode.
void setHeight(float height)
Sets height (altitude) of the symbol (in map units)
3 Basic shading material used for rendering based on the Phong shading model with three color compone...
Qgs3DTypes::AltitudeClamping altitudeClamping() const
Returns method that determines altitude (whether to clamp to feature to terrain)
virtual void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const =0
Writes symbol configuration to the given DOM element.
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
bool addBackFaces() const
Returns whether also triangles facing the other side will be created.
void setAltitudeBinding(Qgs3DTypes::AltitudeBinding altBinding)
Sets method that determines how altitude is bound to individual vertices.
Qgs3DTypes::CullingMode cullingMode() const
Returns front/back culling mode.
void setAddBackFaces(bool add)
Sets whether also triangles facing the other side will be created.
Will render both front and back faces of triangles.
bool invertNormals() const
Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-cloc...
Qgs3DTypes::AltitudeBinding altitudeBinding() const
Returns method that determines how altitude is bound to individual vertices.
void setCullingMode(Qgs3DTypes::CullingMode mode)
Sets front/back culling mode.
float height() const
Returns height (altitude) of the symbol (in map units)
float extrusionHeight() const
Returns extrusion height (in map units)
AltitudeBinding
how to handle clamping of vertices of individual features
void setMaterial(const QgsPhongMaterialSettings &material)
Sets material used for shading of the symbol.
QString type() const override
Returns identifier of symbol type. Each 3D symbol implementation should return a different type...
void setInvertNormals(bool invert)
Sets whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwi...
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)=0
Reads symbol configuration from the given DOM element.
void setAltitudeClamping(Qgs3DTypes::AltitudeClamping altClamping)
Sets method that determines altitude (whether to clamp to feature to terrain)
void setExtrusionHeight(float extrusionHeight)
Sets extrusion height (in map units)
Z_final = z_terrain + z_geometry.
Clamp just centroid of feature.