Renderable cortical / BEM mesh with interleaved vertex attributes and Qt-RHI buffer management. More...
#include "../disp3D_global.h"#include "../core/rendertypes.h"#include <QVector>#include <QVector3D>#include <QColor>#include <memory>#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 | VertexData |
| Interleaved vertex attributes (position, normal, color, curvature) for brain surface GPU upload. More... | |
| class | BrainSurface |
| Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management. More... | |
Renderable cortical / BEM mesh with interleaved vertex attributes and Qt-RHI buffer management.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
BrainSurface is the core 3-D primitive of disp3D. It owns the interleaved VertexData stream (position, normal, packed-ABGR base / annotation colour, surface-id) and the matching index buffer, plus the QRhi vertex / index buffer pair that the renderer binds for every draw.
Per-vertex colour is computed once on the CPU from one of four sources selected by 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 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.