QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Static Public Member Functions | List of all members
QgsTiledSceneWireframeRenderer Class Reference

Renders tiled scene layers using the raw primitive wireframes. More...

#include <qgstiledscenewireframerenderer.h>

Inheritance diagram for QgsTiledSceneWireframeRenderer:
Inheritance graph
[legend]

Public Member Functions

 QgsTiledSceneWireframeRenderer ()
 Constructor for QgsTiledSceneWireframeRenderer. More...
 
 ~QgsTiledSceneWireframeRenderer ()
 
QgsTiledSceneRendererclone () const override
 Create a deep copy of this renderer. More...
 
QgsFillSymbolfillSymbol () const
 Returns the fill symbol used to render triangles in the wireframe. More...
 
Qgis::TiledSceneRendererFlags flags () const override
 Returns flags which control how the renderer behaves. More...
 
QgsLineSymbollineSymbol () const
 Returns the line symbol used to render lines in the wireframe. More...
 
void renderLine (QgsTiledSceneRenderContext &context, const QPolygonF &line) override
 Renders a line. More...
 
void renderTriangle (QgsTiledSceneRenderContext &context, const QPolygonF &triangle) override
 Renders a triangle. More...
 
QDomElement save (QDomDocument &doc, const QgsReadWriteContext &context) const override
 Saves the renderer configuration to an XML element. More...
 
void setFillSymbol (QgsFillSymbol *symbol)
 Sets the fill symbol used to render triangles in the wireframe. More...
 
void setLineSymbol (QgsLineSymbol *symbol)
 Sets the line symbol used to render lines in the wireframe. More...
 
void setUseTextureColors (bool enabled)
 Sets whether representative colors from the textures should be used to recolor the symbols used to render the wireframe. More...
 
void startRender (QgsTiledSceneRenderContext &context) override
 Must be called when a new render cycle is started. More...
 
void stopRender (QgsTiledSceneRenderContext &context) override
 Must be called when a render cycle has finished, to allow the renderer to clean up. More...
 
QString type () const override
 Returns the identifier of the renderer type. More...
 
bool useTextureColors () const
 Returns true if representative colors from the textures will be used to recolor the symbols used to render the wireframe. More...
 
- Public Member Functions inherited from QgsTiledSceneRenderer
 QgsTiledSceneRenderer ()=default
 Constructor for QgsTiledSceneRenderer. More...
 
 QgsTiledSceneRenderer (const QgsTiledSceneRenderer &other)=delete
 QgsTiledSceneRenderer cannot be copied – use clone() instead. More...
 
virtual ~QgsTiledSceneRenderer ()=default
 
virtual QgsTiledSceneRendererclone () const =0
 Create a deep copy of this renderer. More...
 
virtual QList< QgsLayerTreeModelLegendNode * > createLegendNodes (QgsLayerTreeLayer *nodeLayer)
 Creates a set of legend nodes representing the renderer. More...
 
virtual Qgis::TiledSceneRendererFlags flags () const
 Returns flags which control how the renderer behaves. More...
 
bool isTileBorderRenderingEnabled () const
 Returns whether to render also borders of tiles. More...
 
virtual QStringList legendRuleKeys () const
 Returns a list of all rule keys for legend nodes created by the renderer. More...
 
double maximumScreenError () const
 Returns the maximum screen error allowed when rendering the tiled scene. More...
 
Qgis::RenderUnit maximumScreenErrorUnit () const
 Returns the unit for the maximum screen error allowed when rendering the tiled scene. More...
 
QgsTiledSceneRendereroperator= (const QgsTiledSceneRenderer &other)=delete
 QgsTiledSceneRenderer cannot be copied – use clone() instead. More...
 
virtual void renderLine (QgsTiledSceneRenderContext &context, const QPolygonF &line)=0
 Renders a line. More...
 
virtual void renderTriangle (QgsTiledSceneRenderContext &context, const QPolygonF &triangle)=0
 Renders a triangle. More...
 
virtual QDomElement save (QDomDocument &doc, const QgsReadWriteContext &context) const =0
 Saves the renderer configuration to an XML element. More...
 
void setMaximumScreenError (double error)
 Sets the maximum screen error allowed when rendering the tiled scene. More...
 
void setMaximumScreenErrorUnit (Qgis::RenderUnit unit)
 Sets the unit for the maximum screen error allowed when rendering the tiled scene. More...
 
void setTileBorderRenderingEnabled (bool enabled)
 Sets whether to render the borders of tiles. More...
 
virtual void startRender (QgsTiledSceneRenderContext &context)
 Must be called when a new render cycle is started. More...
 
virtual void stopRender (QgsTiledSceneRenderContext &context)
 Must be called when a render cycle has finished, to allow the renderer to clean up. More...
 
virtual QString type () const =0
 Returns the identifier of the renderer type. More...
 

Static Public Member Functions

static QgsTiledSceneRenderercreate (QDomElement &element, const QgsReadWriteContext &context)
 Creates a textured renderer from an XML element. More...
 
static QgsFillSymbolcreateDefaultFillSymbol ()
 Returns a copy of the default fill symbol used to render triangles in the wireframe. More...
 
static QgsLineSymbolcreateDefaultLineSymbol ()
 Returns a copy of the default line symbol used to render lines in the wireframe. More...
 
- Static Public Member Functions inherited from QgsTiledSceneRenderer
static QgsTiledSceneRendererload (QDomElement &element, const QgsReadWriteContext &context)
 Creates a renderer from an XML element. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QgsTiledSceneRenderer
void copyCommonProperties (QgsTiledSceneRenderer *destination) const
 Copies common tiled scene renderer properties (such as screen error) to the destination renderer. More...
 
void restoreCommonProperties (const QDomElement &element, const QgsReadWriteContext &context)
 Restores common renderer properties (such as screen error) from the specified DOM element. More...
 
void saveCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const
 Saves common renderer properties (such as point size and screen error) to the specified DOM element. More...
 

Detailed Description

Renders tiled scene layers using the raw primitive wireframes.

Since
QGIS 3.34

Definition at line 34 of file qgstiledscenewireframerenderer.h.

Constructor & Destructor Documentation

◆ QgsTiledSceneWireframeRenderer()

QgsTiledSceneWireframeRenderer::QgsTiledSceneWireframeRenderer ( )

Constructor for QgsTiledSceneWireframeRenderer.

Definition at line 23 of file qgstiledscenewireframerenderer.cpp.

◆ ~QgsTiledSceneWireframeRenderer()

QgsTiledSceneWireframeRenderer::~QgsTiledSceneWireframeRenderer ( )
default

Member Function Documentation

◆ clone()

QgsTiledSceneRenderer * QgsTiledSceneWireframeRenderer::clone ( ) const
overridevirtual

Create a deep copy of this renderer.

Should be implemented by all subclasses and generate a proper subclass.

Implements QgsTiledSceneRenderer.

Definition at line 36 of file qgstiledscenewireframerenderer.cpp.

◆ create()

QgsTiledSceneRenderer * QgsTiledSceneWireframeRenderer::create ( QDomElement &  element,
const QgsReadWriteContext context 
)
static

Creates a textured renderer from an XML element.

Definition at line 49 of file qgstiledscenewireframerenderer.cpp.

◆ createDefaultFillSymbol()

QgsFillSymbol * QgsTiledSceneWireframeRenderer::createDefaultFillSymbol ( )
static

Returns a copy of the default fill symbol used to render triangles in the wireframe.

See also
setFillSymbol()

Definition at line 79 of file qgstiledscenewireframerenderer.cpp.

◆ createDefaultLineSymbol()

QgsLineSymbol * QgsTiledSceneWireframeRenderer::createDefaultLineSymbol ( )
static

Returns a copy of the default line symbol used to render lines in the wireframe.

See also
setLineSymbol()

Definition at line 102 of file qgstiledscenewireframerenderer.cpp.

◆ fillSymbol()

QgsFillSymbol * QgsTiledSceneWireframeRenderer::fillSymbol ( ) const

Returns the fill symbol used to render triangles in the wireframe.

See also
setFillSymbol()

Definition at line 92 of file qgstiledscenewireframerenderer.cpp.

◆ flags()

Qgis::TiledSceneRendererFlags QgsTiledSceneWireframeRenderer::flags ( ) const
overridevirtual

Returns flags which control how the renderer behaves.

Reimplemented from QgsTiledSceneRenderer.

Definition at line 217 of file qgstiledscenewireframerenderer.cpp.

◆ lineSymbol()

QgsLineSymbol * QgsTiledSceneWireframeRenderer::lineSymbol ( ) const

Returns the line symbol used to render lines in the wireframe.

See also
setLineSymbol()

Definition at line 110 of file qgstiledscenewireframerenderer.cpp.

◆ renderLine()

void QgsTiledSceneWireframeRenderer::renderLine ( QgsTiledSceneRenderContext context,
const QPolygonF &  line 
)
overridevirtual

Renders a line.

Implements QgsTiledSceneRenderer.

Definition at line 192 of file qgstiledscenewireframerenderer.cpp.

◆ renderTriangle()

void QgsTiledSceneWireframeRenderer::renderTriangle ( QgsTiledSceneRenderContext context,
const QPolygonF &  triangle 
)
overridevirtual

Renders a triangle.

Implements QgsTiledSceneRenderer.

Definition at line 160 of file qgstiledscenewireframerenderer.cpp.

◆ save()

QDomElement QgsTiledSceneWireframeRenderer::save ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const
overridevirtual

Saves the renderer configuration to an XML element.

See also
load()

Implements QgsTiledSceneRenderer.

Definition at line 130 of file qgstiledscenewireframerenderer.cpp.

◆ setFillSymbol()

void QgsTiledSceneWireframeRenderer::setFillSymbol ( QgsFillSymbol symbol)

Sets the fill symbol used to render triangles in the wireframe.

Ownership of symbol is transferred.

See also
fillSymbol()

Definition at line 97 of file qgstiledscenewireframerenderer.cpp.

◆ setLineSymbol()

void QgsTiledSceneWireframeRenderer::setLineSymbol ( QgsLineSymbol symbol)

Sets the line symbol used to render lines in the wireframe.

Ownership of symbol is transferred.

See also
lineSymbol()

Definition at line 115 of file qgstiledscenewireframerenderer.cpp.

◆ setUseTextureColors()

void QgsTiledSceneWireframeRenderer::setUseTextureColors ( bool  enabled)

Sets whether representative colors from the textures should be used to recolor the symbols used to render the wireframe.

See also
useTextureColors()

Definition at line 125 of file qgstiledscenewireframerenderer.cpp.

◆ startRender()

void QgsTiledSceneWireframeRenderer::startRender ( QgsTiledSceneRenderContext context)
overridevirtual

Must be called when a new render cycle is started.

A call to startRender() must always be followed by a corresponding call to stopRender() after all features have been rendered.

See also
stopRender()
Warning
This method is not thread safe. Before calling startRender() in a non-main thread, the renderer should instead be cloned and startRender()/stopRender() called on the clone.

Reimplemented from QgsTiledSceneRenderer.

Definition at line 197 of file qgstiledscenewireframerenderer.cpp.

◆ stopRender()

void QgsTiledSceneWireframeRenderer::stopRender ( QgsTiledSceneRenderContext context)
overridevirtual

Must be called when a render cycle has finished, to allow the renderer to clean up.

Calls to stopRender() must always be preceded by a call to startRender().

Warning
This method is not thread safe. Before calling startRender() in a non-main thread, the renderer should instead be cloned and startRender()/stopRender() called on the clone.
See also
startRender()

Reimplemented from QgsTiledSceneRenderer.

Definition at line 207 of file qgstiledscenewireframerenderer.cpp.

◆ type()

QString QgsTiledSceneWireframeRenderer::type ( ) const
overridevirtual

Returns the identifier of the renderer type.

Implements QgsTiledSceneRenderer.

Definition at line 31 of file qgstiledscenewireframerenderer.cpp.

◆ useTextureColors()

bool QgsTiledSceneWireframeRenderer::useTextureColors ( ) const

Returns true if representative colors from the textures will be used to recolor the symbols used to render the wireframe.

See also
setUseTextureColors()

Definition at line 120 of file qgstiledscenewireframerenderer.cpp.


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