QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Member Functions | Protected Member Functions | List of all members
QgsAbstract3DRenderer Class Referenceabstract

#include <qgsabstract3drenderer.h>

Inheritance diagram for QgsAbstract3DRenderer:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsAbstract3DRenderer ()=default
 
virtual QgsAbstract3DRendererclone () const =0
 Returns a cloned instance. More...
 
virtual Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map) const =0
 Returns a 3D entity that will be used to show renderer's data in 3D scene. More...
 
virtual void readXml (const QDomElement &elem, const QgsReadWriteContext &context)=0
 Reads renderer's properties from given XML element. More...
 
virtual void resolveReferences (const QgsProject &project)
 Resolves references to other objects - second phase of loading - after readXml() More...
 
virtual QString type () const =0
 Returns unique identifier of the renderer class (used to identify subclass) More...
 
virtual void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const =0
 Writes renderer's properties to given XML element. More...
 

Protected Member Functions

 QgsAbstract3DRenderer ()=default
 Default constructor. More...
 

Detailed Description

Base class for all renderers that may to participate in 3D view.

3D renderers implement the method createEntity() that returns a new 3D entity - that entity will be added to the 3D scene to represent data in renderer's display style.

Renderers may store some custom properties (e.g. materials, sizes) that are written to and read from XML. It is therefore not recommended to store large amount of data within a renderer (e.g. arrays of vertices).

Since
QGIS 3.0

Definition at line 48 of file qgsabstract3drenderer.h.

Constructor & Destructor Documentation

◆ ~QgsAbstract3DRenderer()

virtual QgsAbstract3DRenderer::~QgsAbstract3DRenderer ( )
virtualdefault

◆ QgsAbstract3DRenderer()

QgsAbstract3DRenderer::QgsAbstract3DRenderer ( )
protecteddefault

Default constructor.

Member Function Documentation

◆ clone()

virtual QgsAbstract3DRenderer* QgsAbstract3DRenderer::clone ( ) const
pure virtual

Returns a cloned instance.

Implemented in QgsRuleBased3DRenderer, QgsMeshLayer3DRenderer, and QgsVectorLayer3DRenderer.

◆ createEntity()

virtual Qt3DCore::QEntity* QgsAbstract3DRenderer::createEntity ( const Qgs3DMapSettings map) const
pure virtual

Returns a 3D entity that will be used to show renderer's data in 3D scene.

Implemented in QgsRuleBased3DRenderer, QgsMeshLayer3DRenderer, and QgsVectorLayer3DRenderer.

◆ readXml()

virtual void QgsAbstract3DRenderer::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)
pure virtual

Reads renderer's properties from given XML element.

Implemented in QgsRuleBased3DRenderer, QgsMeshLayer3DRenderer, and QgsVectorLayer3DRenderer.

◆ resolveReferences()

void QgsAbstract3DRenderer::resolveReferences ( const QgsProject project)
virtual

Resolves references to other objects - second phase of loading - after readXml()

Reimplemented in QgsAbstractVectorLayer3DRenderer, and QgsMeshLayer3DRenderer.

Definition at line 19 of file qgsabstract3drenderer.cpp.

◆ type()

virtual QString QgsAbstract3DRenderer::type ( ) const
pure virtual

Returns unique identifier of the renderer class (used to identify subclass)

Implemented in QgsRuleBased3DRenderer, QgsMeshLayer3DRenderer, and QgsVectorLayer3DRenderer.

◆ writeXml()

virtual void QgsAbstract3DRenderer::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const
pure virtual

Writes renderer's properties to given XML element.

Implemented in QgsRuleBased3DRenderer, QgsMeshLayer3DRenderer, and QgsVectorLayer3DRenderer.


The documentation for this class was generated from the following files: