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

Slice BA — Animation Controller for time-stepped result playback. More...

#include <QDateTime>
#include <QList>
#include <QObject>
#include <QPointer>
#include "layers/swmm2dresultslayer.h"
Include dependency graph for animationcontroller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AnimationController
 Central coordinator for result-layer time-stepping and playback. More...
 

Detailed Description

Slice BA — Animation Controller for time-stepped result playback.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026

AnimationController drives playback of one or more SWMMResultsLayers using a primary/secondary model. The primary layer's time grid is authoritative; each secondary layer is snapped to its nearest period via SWMMResultsLayer::periodIndexForDateTime on every tick.

Ownership: the controller is owned by SWMMVis. Whenever a new results layer is added to the canvas it is auto-promoted to primary and the prior primary silently becomes a secondary. The user may re-designate via the layer-tree context menu "Set as Active Results Layer" → SWMMVis::setActiveResultsLayer.

Tick interval = (primaryLayer->reportStepSeconds() * 1000 / speed), clamped to kMinIntervalMs so the UI stays responsive.