MNEMshLight
Namespace: MNELIB · Library: MNE Library
#include <mne/mne_msh_light.h>
class MNELIB::MNEMshLight
Replaces *mshLight,mshLightRec struct (analyze_types.c).
Single light source with position, color, and state for 3-D surface rendering.
Public Methods
MNEMshLight()
Constructs the MNEMshLight.
MNEMshLight(p_mneMshLight)
Copy Constructs of the MNEMshLight.
Parameters:
- p_mneMshLight : const MNEMshLight & Light to copy.
MNEMshLight(state, posX, posY, posZ, diffX, diffY, diffZ)
Constructs the MNEMshLight.
Parameters:
-
state : int Non-zero to switch the light on.
-
posX : float Light position x coordinate.
-
posY : float Light position y coordinate.
-
posZ : float Light position z coordinate.
-
diffX : float Diffuse intensity, red component.
-
diffY : float Diffuse intensity, green component.
-
diffZ : float Diffuse intensity, blue component.
~MNEMshLight()
Destroys the MNEMshLight.
Example
No example of its own: Light of the legacy MNE-C mesh viewer held by MNEMshDisplaySurfaceSet; UI state with no computation to demonstrate.
It is exercised by:
// Total solid angle seen from a point: 4 pi inside a closed surface, 0 outside
auto skull = MNESurface::read_bem_surface2(bemFile.fileName(), FIFFV_BEM_SURF_ID_BRAIN, true);
skull->compute_surface_cm();
const double inside = skull->sum_solids(Map<const Vector3f>(skull->cm)) / (4.0 * M_PI);
const double outside = skull->sum_solids(Vector3f(0.0f, 0.0f, 0.2f)) / (4.0 * M_PI);
// The same surface as an MNE-C viewer display surface
MNEMshDisplaySurfaceSet display;
display.add_bem_surface(bemFile.fileName(), FIFFV_BEM_SURF_ID_BRAIN, "inner skull", 1, 1); // checks closure
const MNEMshDisplaySurface& shown = *display.surfs[0];
From ex_mne_api.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>