QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsTiledSceneTextureRenderer Class Reference

Renders tiled scene layers using textures. More...

#include <qgstiledscenetexturerenderer.h>

Inheritance diagram for QgsTiledSceneTextureRenderer:
Inheritance graph
[legend]

Public Member Functions

 QgsTiledSceneTextureRenderer ()
 Constructor for QgsTiledSceneTextureRenderer.
 
 ~QgsTiledSceneTextureRenderer ()
 
QgsTiledSceneRendererclone () const override
 Create a deep copy of this renderer.
 
QgsFillSymbolfillSymbol () const
 Returns the fill symbol used to render triangles without textures.
 
Qgis::TiledSceneRendererFlags flags () const override
 Returns flags which control how the renderer behaves.
 
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 without textures.
 
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.
 
- 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 QgsFillSymbolcreateDefaultFillSymbol ()
 Returns a copy of the default fill symbol used to render triangles without textures.
 
- 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 textures.

Since
QGIS 3.34

Definition at line 33 of file qgstiledscenetexturerenderer.h.

Constructor & Destructor Documentation

◆ QgsTiledSceneTextureRenderer()

QgsTiledSceneTextureRenderer::QgsTiledSceneTextureRenderer ( )

Constructor for QgsTiledSceneTextureRenderer.

Definition at line 23 of file qgstiledscenetexturerenderer.cpp.

◆ ~QgsTiledSceneTextureRenderer()

QgsTiledSceneTextureRenderer::~QgsTiledSceneTextureRenderer ( )
default

Member Function Documentation

◆ clone()

QgsTiledSceneRenderer * QgsTiledSceneTextureRenderer::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 35 of file qgstiledscenetexturerenderer.cpp.

◆ create()

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

Creates a textured renderer from an XML element.

Definition at line 45 of file qgstiledscenetexturerenderer.cpp.

◆ createDefaultFillSymbol()

QgsFillSymbol * QgsTiledSceneTextureRenderer::createDefaultFillSymbol ( )
static

Returns a copy of the default fill symbol used to render triangles without textures.

See also
setFillSymbol()

Definition at line 64 of file qgstiledscenetexturerenderer.cpp.

◆ fillSymbol()

QgsFillSymbol * QgsTiledSceneTextureRenderer::fillSymbol ( ) const

Returns the fill symbol used to render triangles without textures.

See also
setFillSymbol()

Definition at line 77 of file qgstiledscenetexturerenderer.cpp.

◆ flags()

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

Returns flags which control how the renderer behaves.

Reimplemented from QgsTiledSceneRenderer.

Definition at line 108 of file qgstiledscenetexturerenderer.cpp.

◆ renderLine()

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

Renders a line.

Implements QgsTiledSceneRenderer.

Definition at line 256 of file qgstiledscenetexturerenderer.cpp.

◆ renderTriangle()

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

Renders a triangle.

Implements QgsTiledSceneRenderer.

Definition at line 118 of file qgstiledscenetexturerenderer.cpp.

◆ save()

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

Saves the renderer configuration to an XML element.

See also
load()

Implements QgsTiledSceneRenderer.

Definition at line 87 of file qgstiledscenetexturerenderer.cpp.

◆ setFillSymbol()

void QgsTiledSceneTextureRenderer::setFillSymbol ( QgsFillSymbol symbol)

Sets the fill symbol used to render triangles without textures.

Ownership of symbol is transferred.

See also
fillSymbol()

Definition at line 82 of file qgstiledscenetexturerenderer.cpp.

◆ startRender()

void QgsTiledSceneTextureRenderer::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 261 of file qgstiledscenetexturerenderer.cpp.

◆ stopRender()

void QgsTiledSceneTextureRenderer::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 267 of file qgstiledscenetexturerenderer.cpp.

◆ type()

QString QgsTiledSceneTextureRenderer::type ( ) const
overridevirtual

Returns the identifier of the renderer type.

Implements QgsTiledSceneRenderer.

Definition at line 30 of file qgstiledscenetexturerenderer.cpp.


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