69 if ( !mSymbol || !vl )
77 constexpr double MINIMUM_VECTOR_Z_ESTIMATE = -100000;
78 constexpr double MAXIMUM_VECTOR_Z_ESTIMATE = 100000;
79 return new QgsVectorLayerChunkedEntity( map, vl, MINIMUM_VECTOR_Z_ESTIMATE, MAXIMUM_VECTOR_Z_ESTIMATE,
tilingSettings(), mSymbol.get() );
84 QDomDocument doc = elem.ownerDocument();
88 QDomElement elemSymbol = doc.createElement( QStringLiteral(
"symbol" ) );
91 elemSymbol.setAttribute( QStringLiteral(
"type" ), mSymbol->type() );
92 mSymbol->writeXml( elemSymbol, context );
94 elem.appendChild( elemSymbol );
101 const QDomElement elemSymbol = elem.firstChildElement( QStringLiteral(
"symbol" ) );
102 const QString symbolType = elemSymbol.attribute( QStringLiteral(
"type" ) );
105 mSymbol->readXml( elemSymbol, context );
Base class for all renderers that participate in 3D views.
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
QgsVectorLayer3DTilingSettings tilingSettings() const
Returns tiling settings of the renderer.
void writeXmlBaseProperties(QDomElement &elem, const QgsReadWriteContext &context) const
Writes common properties of this object to DOM element.
void readXmlBaseProperties(const QDomElement &elem, const QgsReadWriteContext &context)
Reads common properties of this object from DOM element.
void copyBaseProperties(QgsAbstractVectorLayer3DRenderer *r) const
Copies common properties of this object to another object.
QgsVectorLayer * layer() const
Returns vector layer associated with the renderer.
static Qgs3DSymbolRegistry * symbol3DRegistry()
Returns registry of available 3D symbols.
A container for the context for various read/write operations on objects.
3D renderer that renders all features of a vector layer with the same 3D symbol.
void setSymbol(QgsAbstract3DSymbol *symbol)
Sets 3D symbol associated with the renderer. Takes ownership of the symbol.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
Reads renderer's properties from given XML element.
Qt3DCore::QEntity * createEntity(Qgs3DMapSettings *map) const override
Returns a 3D entity that will be used to show renderer's data in 3D scene.
QgsVectorLayer3DRenderer * clone() const override
Returns a cloned instance.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
Writes renderer's properties to given XML element.
const QgsAbstract3DSymbol * symbol() const
Returns 3D symbol associated with the renderer.
QgsVectorLayer3DRenderer(QgsAbstract3DSymbol *s=nullptr)
Takes ownership of the symbol object.
Represents a vector layer which manages a vector based dataset.