summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/options-dialog.cpp4
-rw-r--r--facetracknoir/settings.ui97
-rw-r--r--facetracknoir/ui.cpp2
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h6
-rw-r--r--ftnoir_tracker_pt/point_tracker.h6
-rw-r--r--opentrack/main-settings.hpp4
-rw-r--r--opentrack/plugin-support.hpp13
7 files changed, 73 insertions, 59 deletions
diff --git a/facetracknoir/options-dialog.cpp b/facetracknoir/options-dialog.cpp
index 08c92ee8..705f7672 100644
--- a/facetracknoir/options-dialog.cpp
+++ b/facetracknoir/options-dialog.cpp
@@ -67,7 +67,7 @@ OptionsDialog::OptionsDialog(State& state) : state(state), trans_calib_running(f
tie_setting(pt.fov, ui.camera_fov);
- tie_setting(pt.is_cap, ui.model_cap);
+ tie_setting(pt.model_used, ui.model_used);
tie_setting(acc.rot_threshold, ui.rotation_slider);
tie_setting(acc.trans_threshold, ui.translation_slider);
@@ -84,6 +84,7 @@ void OptionsDialog::doOK() {
s.b->save();
pt.b->save();
s.s_main.b->save();
+ acc.b->save();
ui.game_detector->save();
this->close();
emit reload();
@@ -93,6 +94,7 @@ void OptionsDialog::doCancel() {
s.b->reload();
pt.b->reload();
s.s_main.b->reload();
+ acc.b->reload();
ui.game_detector->revert();
close();
}
diff --git a/facetracknoir/settings.ui b/facetracknoir/settings.ui
index 5c6c7f32..29919d91 100644
--- a/facetracknoir/settings.ui
+++ b/facetracknoir/settings.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>462</width>
- <height>522</height>
+ <height>605</height>
</rect>
</property>
<property name="windowTitle">
@@ -629,42 +629,13 @@
<property name="title">
<string/>
</property>
- <widget class="QRadioButton" name="model_cap">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>82</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Cap</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QRadioButton" name="model_clip">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>140</y>
- <width>82</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Clip</string>
- </property>
- </widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
- <x>80</x>
- <y>0</y>
- <width>171</width>
- <height>121</height>
+ <x>40</x>
+ <y>40</y>
+ <width>206</width>
+ <height>156</height>
</rect>
</property>
<property name="text">
@@ -680,10 +651,10 @@
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
- <x>70</x>
- <y>130</y>
- <width>201</width>
- <height>161</height>
+ <x>135</x>
+ <y>150</y>
+ <width>221</width>
+ <height>191</height>
</rect>
</property>
<property name="text">
@@ -696,6 +667,39 @@
<bool>true</bool>
</property>
</widget>
+ <widget class="QLabel" name="label_31">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>310</y>
+ <width>61</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Model used</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="model_used">
+ <property name="geometry">
+ <rect>
+ <x>90</x>
+ <y>305</y>
+ <width>81</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <item>
+ <property name="text">
+ <string>Cap</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Clip</string>
+ </property>
+ </item>
+ </widget>
</widget>
</item>
<item>
@@ -1668,6 +1672,23 @@ background:none;</string>
<include location="ui-res.qrc"/>
</resources>
<connections/>
+ <designerdata>
+ <property name="gridDeltaX">
+ <number>5</number>
+ </property>
+ <property name="gridDeltaY">
+ <number>5</number>
+ </property>
+ <property name="gridSnapX">
+ <bool>true</bool>
+ </property>
+ <property name="gridSnapY">
+ <bool>true</bool>
+ </property>
+ <property name="gridVisible">
+ <bool>true</bool>
+ </property>
+ </designerdata>
<slots>
<slot>startEngineClicked()</slot>
<slot>stopEngineClicked()</slot>
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 9620dce3..c646808c 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -55,8 +55,6 @@ MainWindow::MainWindow() :
connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(showKeyboardShortcuts()));
connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showProtocolSettings()));
- modules.filters().push_front(std::make_shared<dylib>("", dylib::Filter));
-
for (auto x : modules.protocols())
ui.iconcomboProtocol->addItem(x->icon, x->name);
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
index 1abb8897..4c6bab48 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
@@ -19,7 +19,7 @@ struct settings_pt : opts
value<int> t_MH_x, t_MH_y, t_MH_z;
value<int> fov, camera_mode;
- value<bool> is_cap;
+ value<int> model_used;
settings_pt() :
opts("tracker-pt"),
@@ -29,9 +29,9 @@ struct settings_pt : opts
t_MH_x(b, "model-centroid-x", 0),
t_MH_y(b, "model-centroid-y", 0),
t_MH_z(b, "model-centroid-z", 0),
- fov(b, "camera-fov", 56),
+ fov(b, "camera-fov", 0),
camera_mode(b, "camera-mode", 0),
- is_cap(b, "model-is-cap", true)
+ model_used(b, "model-used", 0)
{}
};
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index 39071351..344a05c0 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -70,8 +70,6 @@ public:
cv::Matx22f P;
- enum Model { Clip = 0, Cap = 1 };
-
PointModel(settings_pt& s)
{
set_model(s);
@@ -86,9 +84,11 @@ public:
P = 1.0/(s11*s22-s12*s12) * cv::Matx22f(s22, -s12, -s12, s11);
}
+ enum { Cap = 0, Clip = 1 };
+
void set_model(settings_pt& s)
{
- if (s.is_cap)
+ if (s.model_used == Cap)
{
const double z = 100, x = 120, y = 60;
M01 = cv::Vec3f(-x, -y, -z);
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp
index f47b3873..8e56ebab 100644
--- a/opentrack/main-settings.hpp
+++ b/opentrack/main-settings.hpp
@@ -21,7 +21,7 @@ private:
};
struct main_settings : opts {
- value<QString> tracker_dll, filter_dll, protocol_dll;
+ value<QString> protocol_dll;
axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll;
value<bool> tcomp_p, tcomp_tz;
value<bool> tray_enabled;
@@ -29,8 +29,6 @@ struct main_settings : opts {
value<bool> center_at_startup;
main_settings() :
opts("opentrack-ui"),
- tracker_dll(b, "tracker-dll", ""),
- filter_dll(b, "filter-dll", ""),
protocol_dll(b, "protocol-dll", ""),
a_x(b, "x", TX),
a_y(b, "y", TY),
diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp
index bc07c106..1c334e14 100644
--- a/opentrack/plugin-support.hpp
+++ b/opentrack/plugin-support.hpp
@@ -52,7 +52,7 @@ extern "C" typedef void* (*OPENTRACK_CTOR_FUNPTR)(void);
extern "C" typedef Metadata* (*OPENTRACK_METADATA_FUNPTR)(void);
struct dylib {
- enum Type { Filter, Tracker, Protocol };
+ enum Type { Protocol };
dylib(const QString& filename, Type t) :
type(t),
@@ -159,17 +159,14 @@ struct dylib {
static QList<mem<dylib>> enum_libraries()
{
- const char* filters_n[] = { "opentrack-filter-*.",
- "opentrack-tracker-*.",
- "opentrack-proto-*."
- };
- const Type filters_t[] = { Filter, Tracker, Protocol };
+ const char* filters_n[] = { "opentrack-proto-*." };
+ const Type filters_t[] = { Protocol };
QDir settingsDir( QCoreApplication::applicationDirPath() );
QList<mem<dylib>> ret;
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 1; i++)
{
QString filter = filters_n[i];
auto t = filters_t[i];
@@ -223,8 +220,6 @@ private:
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; }