SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SWMMLayerQSGRenderer Class Reference

#include <swmmlayerqsgrenderer.h>

Inheritance diagram for SWMMLayerQSGRenderer:
Collaboration diagram for SWMMLayerQSGRenderer:

Public Member Functions

 SWMMLayerQSGRenderer (QQuickItem *parent=nullptr)
 
 ~SWMMLayerQSGRenderer () override
 
void setLayer (SWMMModelLayer *layer)
 
void setMapExtent (const MapExtent &extent)
 
void forceRebuild ()
 
quint64 contentRevision () const noexcept
 

Protected Member Functions

QSGNode * updatePaintNode (QSGNode *oldNode, UpdatePaintNodeData *) override
 

Constructor & Destructor Documentation

◆ SWMMLayerQSGRenderer()

SWMMLayerQSGRenderer::SWMMLayerQSGRenderer ( QQuickItem *  parent = nullptr)
explicit

◆ ~SWMMLayerQSGRenderer()

SWMMLayerQSGRenderer::~SWMMLayerQSGRenderer ( )
overridedefault

Member Function Documentation

◆ contentRevision()

quint64 SWMMLayerQSGRenderer::contentRevision ( ) const
inlinenoexcept

Monotonic counter bumped every time an external change marks this renderer's content dirty. MapCanvas caches the grabbed QSG framebuffer and must regrab whenever the overlay's content has moved on; comparing this revision against the one recorded at grab time closes the window where a renderer learns of a change after the canvas has already consumed (and cleared) its own dirty flag. Extent and layer-pointer changes are keyed separately by the canvas and deliberately do NOT bump this — bumping there would force a regrab on the paint that pushed them, one frame late, every frame.

◆ forceRebuild()

void SWMMLayerQSGRenderer::forceRebuild ( )

Force a full geometry rebuild on the next updatePaintNode, even when the bound layer pointer is unchanged. Needed when the GPU/CPU render toggle flips qsgRenderKinds back on: setLayer() no-ops on the same layer, and a self-render while the overlay was off may have already consumed m_contentDirty against empty (un-owned) geometry.

◆ setLayer()

void SWMMLayerQSGRenderer::setLayer ( SWMMModelLayer layer)

Bind the renderer to a SWMMModelLayer. Disconnects the previous layer's signals; connects the new one's repaintRequested to trigger a geometry rebuild. Pass nullptr to clear.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMapExtent()

void SWMMLayerQSGRenderer::setMapExtent ( const MapExtent extent)

Update the visible map extent. A pure pan (same extent dimensions) only schedules a matrix update. A zoom (changed dimensions) sets m_contentDirty so line widths and glyph sizes are recomputed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePaintNode()

QSGNode * SWMMLayerQSGRenderer::updatePaintNode ( QSGNode *  oldNode,
UpdatePaintNodeData *   
)
overrideprotected
Here is the call graph for this function:

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