Host-app-agnostic controller that owns the ordered renderable set and dispatches picks back to the producing layer. More...
#include <multimodalscene.h>
Public Types | |
| using | BoundsFn |
Signals | |
| void | layersChanged () |
| void | timeSampleChanged (int sample) |
| void | timeCursorChanged (double seconds) |
| void | overlayThresholdsChanged (float fmin, float fmid, float fmax) |
| void | picked (const DISP3DLIB::PickResult &pick) |
Public Member Functions | |
| MultimodalScene (QObject *parent=nullptr) | |
| ~MultimodalScene () override | |
| void | addLayer (SceneLayer layer) |
| bool | removeLayer (const QString &id) |
| void | clear () |
| QVector< SceneLayer > | layers () const |
| const SceneLayer * | findLayer (const QString &id) const |
| void | setLayerVisible (const QString &id, bool visible) |
| void | setLayerOpacity (const QString &id, float opacity) |
| int | currentTimeSample () const |
| void | setCurrentTimeSample (int sample) |
| double | timeCursor () const |
| void | setTimeCursor (double seconds) |
| float | overlayFmin () const |
| float | overlayFmid () const |
| float | overlayFmax () const |
| void | setOverlayThresholds (float fmin, float fmid, float fmax) |
| const PickResult & | lastPick () const |
| void | reportPick (const PickResult &pick) |
| void | worldBounds (QVector3D &bbMin, QVector3D &bbMax) const |
| void | registerBoundsFn (SceneLayerKind kind, BoundsFn fn) |
Host-app-agnostic controller that owns the ordered renderable set and dispatches picks back to the producing layer.
Responsibilities:
The class is non-virtual on purpose: it is a pure data/dispatch hub with no rendering logic. The renderer (BrainRenderer or a future MultimodalRenderer) reads layers via layers() and per-kind downcasts the payload pointer.
Definition at line 114 of file multimodalscene.h.

Per-kind callback that returns a layer's AABB in world coordinates. The host registers one fn per payload type it actually loads. Layers whose kind has no registered fn are silently skipped during bounds computation.
Definition at line 266 of file multimodalscene.h.
|
explicit |
Definition at line 32 of file multimodalscene.cpp.
|
overridedefault |
| void MultimodalScene::addLayer | ( | SceneLayer | layer | ) |
Add or replace a layer.
If a layer with the same SceneLayer::id already exists, the stored layer is overwritten in place (preserving its slot in the draw order). Otherwise the new layer is appended to its kind's group.
| [in] | layer | Layer record. The caller retains ownership of the underlying payload via the shared_ptr. |
Definition at line 43 of file multimodalscene.cpp.
| void MultimodalScene::clear | ( | ) |
Remove every layer.
Definition at line 77 of file multimodalscene.cpp.
| int MultimodalScene::currentTimeSample | ( | ) | const |
Definition at line 138 of file multimodalscene.cpp.
| const SceneLayer * MultimodalScene::findLayer | ( | const QString & | id | ) | const |
| [in] | id | Layer id. |
Definition at line 96 of file multimodalscene.cpp.
| const PickResult & MultimodalScene::lastPick | ( | ) | const |
Definition at line 221 of file multimodalscene.cpp.
| QVector< SceneLayer > MultimodalScene::layers | ( | ) | const |
Definition at line 89 of file multimodalscene.cpp.
|
signal |
Emitted whenever the layer set or any layer flag (visibility, opacity, drawOrder) changes. The renderer should treat this as "rebuild the draw list".
| float MultimodalScene::overlayFmax | ( | ) | const |
Definition at line 191 of file multimodalscene.cpp.
| float MultimodalScene::overlayFmid | ( | ) | const |
Definition at line 184 of file multimodalscene.cpp.
| float MultimodalScene::overlayFmin | ( | ) | const |
Definition at line 177 of file multimodalscene.cpp.
|
signal |
Emitted when any of the shared overlay thresholds change.
|
signal |
Emitted when a pick is reported. Pick dock, status bar, and MRI ortho viewer subscribe.
| void MultimodalScene::registerBoundsFn | ( | SceneLayerKind | kind, |
| BoundsFn | fn ) |
Register an AABB extractor for a given layer kind. Replaces any previously registered fn for that kind.
Definition at line 274 of file multimodalscene.cpp.
| bool MultimodalScene::removeLayer | ( | const QString & | id | ) |
Remove a layer by id.
| [in] | id | Layer id supplied to addLayer. |
Definition at line 63 of file multimodalscene.cpp.
| void MultimodalScene::reportPick | ( | const PickResult & | pick | ) |
Report a pick result from a layer's renderer or hit-tester. Emits picked. Used by both real ray-cast picking and synthetic picks (e.g. wizard "show this contact" navigation).
Definition at line 228 of file multimodalscene.cpp.
| void MultimodalScene::setCurrentTimeSample | ( | int | sample | ) |
Set the current time index. Emits timeSampleChanged if it actually changes. Negative values are clamped to -1.
Definition at line 145 of file multimodalscene.cpp.
| void MultimodalScene::setLayerOpacity | ( | const QString & | id, |
| float | opacity ) |
Set per-layer opacity in [0, 1]. No-op if the id is unknown.
Definition at line 122 of file multimodalscene.cpp.
| void MultimodalScene::setLayerVisible | ( | const QString & | id, |
| bool | visible ) |
Toggle visibility of a layer. No-op if the id is unknown.
Definition at line 107 of file multimodalscene.cpp.
| void MultimodalScene::setOverlayThresholds | ( | float | fmin, |
| float | fmid, | ||
| float | fmax ) |
Set the shared (fmin, fmid, fmax) overlay thresholds used by the data-driven Overlay dock and the renderables it drives. The values are clamped to fmin <= fmid <= fmax. Emits overlayThresholdsChanged if any value actually changes.
Definition at line 198 of file multimodalscene.cpp.
| void MultimodalScene::setTimeCursor | ( | double | seconds | ) |
Set the shared time cursor in seconds. Emits timeCursorChanged if the value actually changes.
Definition at line 166 of file multimodalscene.cpp.
| double MultimodalScene::timeCursor | ( | ) | const |
Definition at line 159 of file multimodalscene.cpp.
|
signal |
Emitted when the shared time cursor (seconds) changes. Driven by the Overlay dock's continuous time slider; consumed by per-sample value lookup on electrodes / surface overlays.
|
signal |
Emitted when the shared time index changes. Data overlays and timeline scrubbers subscribe.
| void MultimodalScene::worldBounds | ( | QVector3D & | bbMin, |
| QVector3D & | bbMax ) const |
Definition at line 236 of file multimodalscene.cpp.