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
meshprofilesampler.h File Reference

Pure-logic sampler that turns a user-traced polyline across the 2D surface mesh into a longitudinal cross-section: cumulative chainage, ground elevation, current-frame water depth, and the max-depth envelope at evenly-spaced samples along the path. More...

#include "plot/profilesection.h"
#include <QPointF>
#include <QVector>
Include dependency graph for meshprofilesampler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  MeshProfileSampler
 

Typedefs

using MeshProfileSampler::Sample = ProfileSection::Sample
 
using MeshProfileSampler::CellCrossing = ProfileSection::CellCrossing
 
using MeshProfileSampler::MeshProfile = ProfileSection::Section
 

Functions

MeshProfile MeshProfileSampler::buildMeshProfile (SWMM2DMeshLayer *mesh, SWMM2DResultsLayer *results, const QVector< QPointF > &scenePolyline, double stepHint=0.0)
 Resample scenePolyline at fixed arc length and sample ground / depth / max-depth along it.
 

Variables

constexpr int MeshProfileSampler::kMaxSamples = ProfileSection::kMaxSamples
 

Detailed Description

Pure-logic sampler that turns a user-traced polyline across the 2D surface mesh into a longitudinal cross-section: cumulative chainage, ground elevation, current-frame water depth, and the max-depth envelope at evenly-spaced samples along the path.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Mirrors ProfileBuilder's "pre-fetch then assemble" decoupling, but queries the live layers directly (mesh for ground, results layer for depth) since the 2D mesh has no first-class path/topology object. The geometry-dependent columns (chainage / ground / triIdx / maxDepth) are static once traced; only depthNow changes per animation frame — recompute just that column via SWMM2DResultsLayer::depthAtSceneInterp on each tick (barycentric per-vertex depth, so the water-surface line stays smooth across cells).