Static factory for procedural Qt-RHI meshes (spheres, plates, barbells, cylinders, batched point clouds). More...
#include "../disp3D_global.h"#include <QVector3D>#include <QMatrix4x4>#include <QColor>#include <Eigen/Core>#include <memory>

Go to the source code of this file.
Classes | |
| class | MeshFactory |
| Static factory for procedural mesh primitives. More... | |
Static factory for procedural Qt-RHI meshes (spheres, plates, barbells, cylinders, batched point clouds).
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
MeshFactory builds the small primitive geometries used throughout disp3D — subdivided icosahedron spheres for source-space and digitizer points, oriented plates for MEG magnetometers, barbell shapes for gradiometers, cylinders for sensor leads and connectivity edges. Each primitive is returned as a fully populated BrainSurface with interleaved position / normal / colour vertex data so it drops straight into the standard render pipeline.
For point clouds (source-space, head-shape digitization), all spheres are merged into a single BrainSurface so the GPU draws thousands of points with one drawIndexed call — this is the same single-draw constraint imposed by the WebGL backend that the rest of disp3D obeys.
Definition in file meshfactory.h.