Renderable cortical / BEM mesh: CPU geometry, colour and annotation streams for the renderer. More...
#include "../disp3D_global.h"#include "../core/rendertypes.h"#include <QVector>#include <QVector3D>#include <QColor>#include <memory>#include <optional>#include <vector>#include <fs/fs_surface.h>#include <fs/fs_annotation.h>#include <mne/mne_bem.h>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| struct | DISP3DLIB::VertexData |
| Geometry of one brain surface vertex: position and normal. More... | |
| class | DISP3DLIB::BrainSurface |
| Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management. More... | |
Namespaces | |
| namespace | DISP3DLIB |
| 3-D brain visualisation using the Qt RHI rendering backend. | |
Renderable cortical / BEM mesh: CPU geometry, colour and annotation streams for the renderer.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
BrainSurface is the core 3-D primitive of disp3D. It owns the CPU streams the renderer uploads: geometry (DISP3DLIB::VertexData, position and normal), packed-ABGR colour, packed-ABGR annotation colour and the triangle indices. Each stream has its own generation, so a source-estimate frame re-uploads only the 4-byte colour stream.
Per-vertex colour is computed once on the CPU from one of four sources selected by DISP3DLIB::VisualizationMode — flat base colour, FsAnnotation parcellation, scientific curvature shading (Lambertian ambient + sulcal darkening), or a source-time-course value mapped through the active colormap — then packed into the second colour slot so a single fragment shader covers every mode by blending the two colour streams.
The class accepts geometry from a FSLIB::FsSurface, an MNELIB::MNEBemSurface or raw Eigen matrices, and can carry a BrainSurface::TissueType "TissueType" tag so the renderer knows whether the mesh is a cortex, skin, skull or generic shell for alpha / lighting tuning.
Definition in file brainsurface.h.