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

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>
Include dependency graph for raypicker.h:
This graph shows which files directly or indirectly include this file:

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...

Detailed Description

Mouse-ray vs scene-object intersection for picking dipoles, electrodes and surfaces.

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

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.