blob: 2c37e5eb1aaa02be3ec837d0500ebf41f890dd03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include <vector>
#include "opentrack/options.hpp"
using namespace options;
#include "opentrack/plugin-support.h"
#include "opentrack/main-settings.hpp"
#include "opentrack/mappings.hpp"
struct Modules {
Modules() :
module_list(dylib::enum_libraries()),
filter_modules(filter(dylib::Filter)),
tracker_modules(filter(dylib::Tracker)),
protocol_modules(filter(dylib::Protocol))
{}
QList<mem<dylib>>& filters() { return filter_modules; }
QList<mem<dylib>>& trackers() { return tracker_modules; }
QList<mem<dylib>>& protocols() { return protocol_modules; }
private:
QList<mem<dylib>> module_list;
QList<mem<dylib>> filter_modules;
QList<mem<dylib>> tracker_modules;
QList<mem<dylib>> protocol_modules;
QList<mem<dylib>> filter(dylib::Type t)
{
QList<mem<dylib>> ret;
for (auto x : module_list)
if (x->type == t)
ret.push_back(x);
return ret;
}
};
struct Work;
struct State {
State() :
pose(std::vector<axis_opts*>{&s.a_x, &s.a_y, &s.a_z, &s.a_yaw, &s.a_pitch, &s.a_roll})
{}
Modules modules;
SelectedLibraries libs;
main_settings s;
Mappings pose;
mem<Work> work;
};
|