v2.0.0
Loading...
Searching...
No Matches
mne_msh_light_set.h
Go to the documentation of this file.
1//=============================================================================================================
16
17#ifndef MNEMSHLIGHTSET_H
18#define MNEMSHLIGHTSET_H
19
20//=============================================================================================================
21// INCLUDES
22//=============================================================================================================
23
24#include "mne_global.h"
25#include "mne_msh_light.h"
26
27//=============================================================================================================
28// STL INCLUDES
29//=============================================================================================================
30
31#include <memory>
32#include <vector>
33
34//=============================================================================================================
35// QT INCLUDES
36//=============================================================================================================
37
38#include <QSharedPointer>
39#include <QString>
40
41//=============================================================================================================
42// DEFINE NAMESPACE MNELIB
43//=============================================================================================================
44
45namespace MNELIB
46{
47
48//=============================================================================================================
53{
54public:
55 typedef QSharedPointer<MNEMshLightSet> SPtr;
56 typedef QSharedPointer<const MNEMshLightSet> ConstSPtr;
57
58 //=========================================================================================================
62 MNEMshLightSet() = default;
63
65 : name(other.name)
66 {
67 lights.reserve(other.lights.size());
68 for (const auto& l : other.lights)
69 lights.push_back(std::make_unique<MNEMshLight>(*l));
70 }
71
73 {
74 if (this != &other) {
75 name = other.name;
76 lights.clear();
77 lights.reserve(other.lights.size());
78 for (const auto& l : other.lights)
79 lights.push_back(std::make_unique<MNEMshLight>(*l));
80 }
81 return *this;
82 }
83
86
87 //=========================================================================================================
91 ~MNEMshLightSet() = default;
92
93public:
94 QString name;
95 std::vector<std::unique_ptr<MNEMshLight>> lights;
96
100 int nlight() const { return static_cast<int>(lights.size()); }
101};
102
103//=============================================================================================================
104// INLINE DEFINITIONS
105//=============================================================================================================
106} // NAMESPACE MNELIB
107
108#endif // MNEMSHLIGHTSET_H
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
Single directional / positional light source for the mesh viewer.
for(int p=0;p< np;++p)
Core MNE data structures (source spaces, source estimates, hemispheres).
MNEMshLightSet(const MNEMshLightSet &other)
int nlight() const
Returns the number of lights in the set.
MNEMshLightSet(MNEMshLightSet &&)=default
QSharedPointer< MNEMshLightSet > SPtr
MNEMshLightSet & operator=(MNEMshLightSet &&)=default
std::vector< std::unique_ptr< MNEMshLight > > lights
QSharedPointer< const MNEMshLightSet > ConstSPtr
MNEMshLightSet & operator=(const MNEMshLightSet &other)