QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsTiledSceneWireframeRenderer Class Reference

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

#include <qgstiledscenewireframerenderer.h>

Inheritance diagram for QgsTiledSceneWireframeRenderer:

Public Member Functions

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

Static Public Member Functions

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

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.
void restoreCommonProperties (const QDomElement &element, const QgsReadWriteContext &context)
 Restores common renderer properties (such as screen error) from the specified DOM element.
void saveCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const
 Saves common renderer properties (such as point size and screen error) to the specified DOM element.

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 24 of file qgstiledscenewireframerenderer.cpp.

◆ ~QgsTiledSceneWireframeRenderer()

QgsTiledSceneWireframeRenderer::~QgsTiledSceneWireframeRenderer ( )
overridedefault

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 37 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 50 of file qgstiledscenewireframerenderer.cpp.

◆ createDefaultFillSymbol()

std::unique_ptr< 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 80 of file qgstiledscenewireframerenderer.cpp.

◆ createDefaultLineSymbol()

std::unique_ptr< 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 103 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 93 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 218 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 111 of file qgstiledscenewireframerenderer.cpp.

◆ renderLine()

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

Renders a line.

Implements QgsTiledSceneRenderer.

Definition at line 193 of file qgstiledscenewireframerenderer.cpp.

◆ renderTriangle()

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

Renders a triangle.

Implements QgsTiledSceneRenderer.

Definition at line 161 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 131 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 98 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 116 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 126 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 198 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 208 of file qgstiledscenewireframerenderer.cpp.

◆ type()

QString QgsTiledSceneWireframeRenderer::type ( ) const
overridevirtual

Returns the identifier of the renderer type.

Implements QgsTiledSceneRenderer.

Definition at line 32 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 121 of file qgstiledscenewireframerenderer.cpp.


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