Mouse-ray vs scene-object intersection for picking dipoles, electrodes and surfaces. More...
#include "../disp3D_global.h"#include "core/viewstate.h"#include <QPoint>#include <QRect>#include <QMatrix4x4>#include <QVector3D>#include <QMap>#include <QStandardItem>#include <memory>

Go to the source code of this file.
Classes | |
| struct | PickResult |
| Result of a ray–mesh intersection test containing the hit point, triangle index, and distance. More... | |
| class | RayPicker |
| Ray casting and intersection testing. More... | |
Mouse-ray vs scene-object intersection for picking dipoles, electrodes and surfaces.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
RayPicker unprojects the current mouse position through the active camera into a world-space ray and tests it against every selectable scene primitive: per-triangle Moller-Trumbore against BrainSurface meshes, per-arrow segment / cylinder for DipoleObject and ECoG electrodes, and per-sphere for source-space points and digitizer fiducials.
The closest hit is returned as a PickResult that names the object, the triangle / instance index and the world-space intersection point — enough for the surrounding GUI to highlight a region, show a tooltip, or seed an interactive label.
Definition in file raypicker.h.