v2.0.0
Loading...
Searching...
No Matches
cameracontroller.h File Reference

Camera state and projection / view / model matrix computation for single- and multi-view layouts. More...

#include "../disp3D_global.h"
#include "core/viewstate.h"
#include <QMatrix4x4>
#include <QQuaternion>
#include <QVector3D>
#include <QVector2D>
#include <QPoint>
#include <QSize>
Include dependency graph for cameracontroller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CameraResult
 Computed camera matrices (projection, view, model) and vectors for a single viewport. More...
class  CameraController
 Camera state and matrix computation. More...

Detailed Description

Camera state and projection / view / model matrix computation for single- and multi-view layouts.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

CameraController is widget-agnostic: it takes the visible scene centroid + extent and a per-pane SubView and produces the CameraResult bundle (projection, view, model, eye position, look-at and up vector) consumed by BrainRenderer.

It also encodes the mouse-interaction conventions used everywhere in disp3D: left-drag rotates via quaternion accumulation, wheel zooms by exponential scaling around the scene centre, middle-drag pans by projecting screen-space deltas into the camera's local right / up basis, and the multi-view perspective pane orbits while the orthographic Top / Left / Front panes only pan + zoom.

Definition in file cameracontroller.h.