diff options
Diffstat (limited to 'tracker-easy')
-rw-r--r-- | tracker-easy/lang/nl_NL.ts | 53 | ||||
-rw-r--r-- | tracker-easy/lang/ru_RU.ts | 53 | ||||
-rw-r--r-- | tracker-easy/lang/stub.ts | 53 | ||||
-rw-r--r-- | tracker-easy/lang/zh_CN.ts | 53 | ||||
-rw-r--r-- | tracker-easy/module.cpp | 3 | ||||
-rw-r--r-- | tracker-easy/settings.h | 9 | ||||
-rw-r--r-- | tracker-easy/tracker-easy-dialog.cpp | 51 | ||||
-rw-r--r-- | tracker-easy/tracker-easy-dialog.h | 4 | ||||
-rw-r--r-- | tracker-easy/tracker-easy-settings.ui | 1115 | ||||
-rw-r--r-- | tracker-easy/tracker-easy.cpp | 28 | ||||
-rw-r--r-- | tracker-easy/tracker-easy.h | 11 |
11 files changed, 386 insertions, 1047 deletions
diff --git a/tracker-easy/lang/nl_NL.ts b/tracker-easy/lang/nl_NL.ts index 9b7ae1dd..fe73b271 100644 --- a/tracker-easy/lang/nl_NL.ts +++ b/tracker-easy/lang/nl_NL.ts @@ -2,16 +2,9 @@ <!DOCTYPE TS> <TS version="2.1" language="nl_NL"> <context> - <name>EasyTracker::Dialog</name> - <message> - <source>Tracker offline</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> <name>EasyTracker::Metadata</name> <message> - <source>Easy Tracker 0.1</source> + <source>Easy Tracker 1.0</source> <translation type="unfinished"></translation> </message> </context> @@ -98,46 +91,14 @@ <translation type="unfinished"></translation> </message> <message> - <source>Clip</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Model Dimensions</source> - <translation type="unfinished"></translation> - </message> - <message> <source> mm</source> <translation type="unfinished"></translation> </message> <message> - <source>Side</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Front</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Cap</source> - <translation type="unfinished"></translation> - </message> - <message> <source>About</source> <translation type="unfinished"></translation> </message> <message> - <source>Status</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Extracted Points:</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Camera Info:</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Debug (full size preview)</source> <translation type="unfinished"></translation> </message> @@ -146,10 +107,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 0.1</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999AA;">documentation on GitHub</span></a></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Size in pixels of half the edge defining deadzone squares around tracked points</source> <translation type="unfinished"></translation> </message> @@ -194,10 +151,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Custom</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Top Right</source> <translation type="unfinished"></translation> </message> @@ -249,5 +202,9 @@ <source><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 1.0</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999aa;">documentation on GitHub</span></a></p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-easy/lang/ru_RU.ts b/tracker-easy/lang/ru_RU.ts index ba8caacb..022acd68 100644 --- a/tracker-easy/lang/ru_RU.ts +++ b/tracker-easy/lang/ru_RU.ts @@ -2,16 +2,9 @@ <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> <context> - <name>EasyTracker::Dialog</name> - <message> - <source>Tracker offline</source> - <translation type="unfinished">Отслеживание отключено</translation> - </message> -</context> -<context> <name>EasyTracker::Metadata</name> <message> - <source>Easy Tracker 0.1</source> + <source>Easy Tracker 1.0</source> <translation type="unfinished"></translation> </message> </context> @@ -98,46 +91,14 @@ <translation>Модель</translation> </message> <message> - <source>Clip</source> - <translation>Клипса</translation> - </message> - <message> - <source>Model Dimensions</source> - <translation>Размеры модели</translation> - </message> - <message> <source> mm</source> <translation> мм</translation> </message> <message> - <source>Side</source> - <translation>Сбоку</translation> - </message> - <message> - <source>Front</source> - <translation>Спереди</translation> - </message> - <message> - <source>Cap</source> - <translation>Кепка</translation> - </message> - <message> <source>About</source> <translation>О программе</translation> </message> <message> - <source>Status</source> - <translation>Статус</translation> - </message> - <message> - <source>Extracted Points:</source> - <translation>Извлечено точек:</translation> - </message> - <message> - <source>Camera Info:</source> - <translation>Параметры камеры:</translation> - </message> - <message> <source>Debug (full size preview)</source> <translation type="unfinished"></translation> </message> @@ -146,10 +107,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 0.1</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999AA;">documentation on GitHub</span></a></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Size in pixels of half the edge defining deadzone squares around tracked points</source> <translation type="unfinished"></translation> </message> @@ -194,10 +151,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Custom</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Top Right</source> <translation type="unfinished"></translation> </message> @@ -249,5 +202,9 @@ <source><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 1.0</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999aa;">documentation on GitHub</span></a></p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-easy/lang/stub.ts b/tracker-easy/lang/stub.ts index 55a0bd46..60c84d35 100644 --- a/tracker-easy/lang/stub.ts +++ b/tracker-easy/lang/stub.ts @@ -2,16 +2,9 @@ <!DOCTYPE TS> <TS version="2.1"> <context> - <name>EasyTracker::Dialog</name> - <message> - <source>Tracker offline</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> <name>EasyTracker::Metadata</name> <message> - <source>Easy Tracker 0.1</source> + <source>Easy Tracker 1.0</source> <translation type="unfinished"></translation> </message> </context> @@ -98,46 +91,14 @@ <translation type="unfinished"></translation> </message> <message> - <source>Clip</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Model Dimensions</source> - <translation type="unfinished"></translation> - </message> - <message> <source> mm</source> <translation type="unfinished"></translation> </message> <message> - <source>Side</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Front</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Cap</source> - <translation type="unfinished"></translation> - </message> - <message> <source>About</source> <translation type="unfinished"></translation> </message> <message> - <source>Status</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Extracted Points:</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Camera Info:</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Debug (full size preview)</source> <translation type="unfinished"></translation> </message> @@ -146,10 +107,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 0.1</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999AA;">documentation on GitHub</span></a></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Size in pixels of half the edge defining deadzone squares around tracked points</source> <translation type="unfinished"></translation> </message> @@ -194,10 +151,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Custom</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Top Right</source> <translation type="unfinished"></translation> </message> @@ -249,5 +202,9 @@ <source><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 1.0</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999aa;">documentation on GitHub</span></a></p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-easy/lang/zh_CN.ts b/tracker-easy/lang/zh_CN.ts index 73f0f0be..ee89b5b6 100644 --- a/tracker-easy/lang/zh_CN.ts +++ b/tracker-easy/lang/zh_CN.ts @@ -2,16 +2,9 @@ <!DOCTYPE TS> <TS version="2.1" language="zh_CN"> <context> - <name>EasyTracker::Dialog</name> - <message> - <source>Tracker offline</source> - <translation type="unfinished">跟踪器脱机</translation> - </message> -</context> -<context> <name>EasyTracker::Metadata</name> <message> - <source>Easy Tracker 0.1</source> + <source>Easy Tracker 1.0</source> <translation type="unfinished"></translation> </message> </context> @@ -98,46 +91,14 @@ <translation>点模式</translation> </message> <message> - <source>Clip</source> - <translation>夹子式</translation> - </message> - <message> - <source>Model Dimensions</source> - <translation>尺寸</translation> - </message> - <message> <source> mm</source> <translation> 毫米</translation> </message> <message> - <source>Side</source> - <translation>侧面</translation> - </message> - <message> - <source>Front</source> - <translation>正面</translation> - </message> - <message> - <source>Cap</source> - <translation>帽子式</translation> - </message> - <message> <source>About</source> <translation>关于</translation> </message> <message> - <source>Status</source> - <translation>状态</translation> - </message> - <message> - <source>Extracted Points:</source> - <translation>解析出的点:</translation> - </message> - <message> - <source>Camera Info:</source> - <translation>设备信息:</translation> - </message> - <message> <source>Debug (full size preview)</source> <translation type="unfinished"></translation> </message> @@ -146,10 +107,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 0.1</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999AA;">documentation on GitHub</span></a></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Size in pixels of half the edge defining deadzone squares around tracked points</source> <translation type="unfinished"></translation> </message> @@ -194,10 +151,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Custom</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Top Right</source> <translation type="unfinished"></translation> </message> @@ -249,5 +202,9 @@ <source><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 1.0</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999aa;">documentation on GitHub</span></a></p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-easy/module.cpp b/tracker-easy/module.cpp index 9f5461d5..3a9df22b 100644 --- a/tracker-easy/module.cpp +++ b/tracker-easy/module.cpp @@ -6,8 +6,7 @@ namespace EasyTracker { - - QString Metadata::name() { return tr("Easy Tracker 0.1"); } + QString Metadata::name() { return tr("Easy Tracker 1.0"); } QIcon Metadata::icon() { return QIcon(":/Resources/easy-tracker-logo.png"); } } diff --git a/tracker-easy/settings.h b/tracker-easy/settings.h index 825282d4..5a4dff84 100644 --- a/tracker-easy/settings.h +++ b/tracker-easy/settings.h @@ -40,15 +40,6 @@ namespace EasyTracker { value<int> iVertexTopLeftX{ b, "iVertexTopLeftX", 0 }, iVertexTopLeftY{ b, "iVertexTopLeftY", 0 }, iVertexTopLeftZ{ b, "iVertexTopLeftZ", 0 }; - value<int> clip_ty{ b, "clip-ty", 40 }, - clip_tz{ b, "clip-tz", 30 }, - clip_by{ b, "clip-by", 70 }, - clip_bz{ b, "clip-bz", 80 }; - - value<int> active_model_panel{ b, "active-model-panel", 0 }, - cap_x{ b, "cap-x", 35 }, - cap_y{ b, "cap-y", 55 }, - cap_z{ b, "cap-z", 100 }; value<int> fov{ b, "camera-fov", 56 }; diff --git a/tracker-easy/tracker-easy-dialog.cpp b/tracker-easy/tracker-easy-dialog.cpp index b30efed4..d1aafee1 100644 --- a/tracker-easy/tracker-easy-dialog.cpp +++ b/tracker-easy/tracker-easy-dialog.cpp @@ -26,9 +26,7 @@ namespace EasyTracker Dialog::Dialog() : s(KModuleName), - tracker(nullptr), - timer(this), - trans_calib(1, 2) + tracker(nullptr) { init_resources(); @@ -46,15 +44,6 @@ namespace EasyTracker tie_setting(s.iMaxBlobSize, ui.maxdiam_spin); tie_setting(s.DeadzoneRectHalfEdgeSize, ui.spinDeadzone); - tie_setting(s.clip_by, ui.clip_bheight_spin); - tie_setting(s.clip_bz, ui.clip_blength_spin); - tie_setting(s.clip_ty, ui.clip_theight_spin); - tie_setting(s.clip_tz, ui.clip_tlength_spin); - - tie_setting(s.cap_x, ui.cap_width_spin); - tie_setting(s.cap_y, ui.cap_height_spin); - tie_setting(s.cap_z, ui.cap_length_spin); - tie_setting(s.iVertexTopX, ui.iSpinVertexTopX); tie_setting(s.iVertexTopY, ui.iSpinVertexTopY); tie_setting(s.iVertexTopZ, ui.iSpinVertexTopZ); @@ -79,11 +68,8 @@ namespace EasyTracker tie_setting(s.iVertexTopLeftY, ui.iSpinVertexTopLeftY); tie_setting(s.iVertexTopLeftZ, ui.iSpinVertexTopLeftZ); - tie_setting(s.fov, ui.fov); - tie_setting(s.active_model_panel, ui.model_tabs); - tie_setting(s.debug, ui.debug); @@ -103,17 +89,12 @@ namespace EasyTracker tie_setting(s.iCustomModelFour, ui.iRadioButtonCustomModelFour); tie_setting(s.iCustomModelFive, ui.iRadioButtonCustomModelFive); - connect(&timer, &QTimer::timeout, this, &Dialog::poll_tracker_info_impl); - timer.setInterval(250); - - - poll_tracker_info_impl(); - - connect(this, &Dialog::poll_tracker_info, this, &Dialog::poll_tracker_info_impl, Qt::DirectConnection); - for (unsigned k = 0; k < cv::SOLVEPNP_MAX_COUNT; k++) + { ui.comboBoxSolvers->setItemData(k, k); + } + tie_setting(s.PnpSolver, ui.comboBoxSolvers); @@ -143,26 +124,6 @@ namespace EasyTracker } - void Dialog::poll_tracker_info_impl() - { - //SL: sort this out - /* - pt_camera_info info; - if (tracker && tracker->get_cam_info(info)) - { - ui.caminfo_label->setText(tr("%1x%2 @ %3 FPS").arg(info.res_x).arg(info.res_y).arg(iround(info.fps))); - - // display point info - const int n_points = tracker->get_n_points(); - ui.pointinfo_label->setText((n_points == 3 ? tr("%1 OK!") : tr("%1 BAD!")).arg(n_points)); - } - else - */ - { - ui.caminfo_label->setText(tr("Tracker offline")); - ui.pointinfo_label->setText(QString()); - } - } void Dialog::set_camera_settings_available(const QString& /* camera_name */) { @@ -200,14 +161,10 @@ namespace EasyTracker void Dialog::register_tracker(ITracker *t) { tracker = static_cast<Tracker*>(t); - poll_tracker_info(); - timer.start(); } void Dialog::unregister_tracker() { tracker = nullptr; - poll_tracker_info(); - timer.stop(); } } diff --git a/tracker-easy/tracker-easy-dialog.h b/tracker-easy/tracker-easy-dialog.h index f63ef66f..7eb1ffb1 100644 --- a/tracker-easy/tracker-easy-dialog.h +++ b/tracker-easy/tracker-easy-dialog.h @@ -33,7 +33,6 @@ namespace EasyTracker void doOK(); void doCancel(); - void poll_tracker_info_impl(); void set_camera_settings_available(const QString& camera_name); void show_camera_settings(); signals: @@ -42,9 +41,6 @@ namespace EasyTracker Settings s; Tracker* tracker; - QTimer timer; - TranslationCalibrator trans_calib; - QMutex calibrator_mutex; Ui::UICPTClientControls ui; }; diff --git a/tracker-easy/tracker-easy-settings.ui b/tracker-easy/tracker-easy-settings.ui index 6690a3e5..c6c3fbd7 100644 --- a/tracker-easy/tracker-easy-settings.ui +++ b/tracker-easy/tracker-easy-settings.ui @@ -36,7 +36,7 @@ <property name="sizeConstraint"> <enum>QLayout::SetFixedSize</enum> </property> - <item row="8" column="0"> + <item row="7" column="0"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> @@ -61,7 +61,7 @@ <locale language="English" country="UnitedStates"/> </property> <property name="currentIndex"> - <number>0</number> + <number>2</number> </property> <widget class="QWidget" name="tabTracker"> <attribute name="title"> @@ -477,698 +477,362 @@ <attribute name="title"> <string>Model</string> </attribute> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="0" column="0"> - <widget class="QTabWidget" name="model_tabs"> - <property name="enabled"> - <bool>true</bool> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QGroupBox" name="groupBoxCustomModelType"> + <property name="title"> + <string>Vertex count</string> </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QRadioButton" name="iRadioButtonCustomModelThree"> + <property name="text"> + <string>Three vertices</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="iRadioButtonCustomModelFour"> + <property name="text"> + <string>Four vertices</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="iRadioButtonCustomModelFive"> + <property name="text"> + <string>Five vertices</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string/> </property> - <property name="tabShape"> - <enum>QTabWidget::Rounded</enum> + <property name="flat"> + <bool>false</bool> </property> - <property name="currentIndex"> - <number>2</number> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string><html><head/><body><p><span style=" font-size:12pt;">X</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string><html><head/><body><p><span style=" font-size:12pt;">Y</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxTop"> + <property name="title"> + <string>Top</string> </property> - <property name="usesScrollButtons"> - <bool>false</bool> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="topMargin"> + <number>9</number> + </property> + <item> + <widget class="QSpinBox" name="iSpinVertexTopX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxRight"> + <property name="title"> + <string>Right</string> </property> - <property name="documentMode"> - <bool>false</bool> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QSpinBox" name="iSpinVertexRightX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexRightY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexRightZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxLeft"> + <property name="title"> + <string>Left</string> </property> - <property name="tabsClosable"> - <bool>false</bool> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QSpinBox" name="iSpinVertexLeftX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexLeftY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexLeftZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxCenter"> + <property name="title"> + <string>Center</string> </property> - <widget class="QWidget" name="tabClip"> - <property name="enabled"> - <bool>false</bool> - </property> - <attribute name="title"> - <string>Clip</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_6"> - <item row="0" column="0"> - <widget class="QGroupBox" name="groupBox_8"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>331</width> - <height>208</height> - </size> - </property> - <property name="title"> - <string>Model Dimensions</string> - </property> - <widget class="QSpinBox" name="clip_tlength_spin"> - <property name="geometry"> - <rect> - <x>70</x> - <y>35</y> - <width>100</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QSpinBox" name="clip_bheight_spin"> - <property name="geometry"> - <rect> - <x>150</x> - <y>130</y> - <width>100</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QLabel" name="label_44"> - <property name="geometry"> - <rect> - <x>65</x> - <y>55</y> - <width>71</width> - <height>111</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="tracker_easy.qrc">:/Resources/clip_side.png</pixmap> - </property> - </widget> - <widget class="QLabel" name="label_50"> - <property name="geometry"> - <rect> - <x>20</x> - <y>40</y> - <width>46</width> - <height>13</height> - </rect> - </property> - <property name="text"> - <string>Side</string> - </property> - </widget> - <widget class="QSpinBox" name="clip_blength_spin"> - <property name="geometry"> - <rect> - <x>50</x> - <y>160</y> - <width>100</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QSpinBox" name="clip_theight_spin"> - <property name="geometry"> - <rect> - <x>150</x> - <y>70</y> - <width>100</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QLabel" name="label_51"> - <property name="geometry"> - <rect> - <x>290</x> - <y>40</y> - <width>46</width> - <height>13</height> - </rect> - </property> - <property name="text"> - <string>Front</string> - </property> - </widget> - <widget class="QLabel" name="label_45"> - <property name="geometry"> - <rect> - <x>300</x> - <y>70</y> - <width>21</width> - <height>111</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="tracker_easy.qrc">:/Resources/clip_front.png</pixmap> - </property> - </widget> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="tabCap"> - <attribute name="title"> - <string>Cap</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_14"> - <item> - <widget class="QGroupBox" name="groupBox_9"> - <property name="minimumSize"> - <size> - <width>331</width> - <height>208</height> - </size> - </property> - <property name="title"> - <string>Model Dimensions</string> - </property> - <widget class="QLabel" name="label_46"> - <property name="geometry"> - <rect> - <x>100</x> - <y>60</y> - <width>111</width> - <height>81</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="tracker_easy.qrc">:/Resources/cap_side.png</pixmap> - </property> - </widget> - <widget class="QLabel" name="label_48"> - <property name="geometry"> - <rect> - <x>20</x> - <y>40</y> - <width>46</width> - <height>13</height> - </rect> - </property> - <property name="text"> - <string>Side</string> - </property> - </widget> - <widget class="QSpinBox" name="cap_length_spin"> - <property name="geometry"> - <rect> - <x>90</x> - <y>40</y> - <width>101</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QLabel" name="label_47"> - <property name="geometry"> - <rect> - <x>220</x> - <y>100</y> - <width>81</width> - <height>81</height> - </rect> - </property> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="tracker_easy.qrc">:/Resources/cap_front.png</pixmap> - </property> - </widget> - <widget class="QSpinBox" name="cap_width_spin"> - <property name="geometry"> - <rect> - <x>240</x> - <y>70</y> - <width>81</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - <widget class="QLabel" name="label_49"> - <property name="geometry"> - <rect> - <x>240</x> - <y>40</y> - <width>46</width> - <height>13</height> - </rect> - </property> - <property name="text"> - <string>Front</string> - </property> - </widget> - <widget class="QSpinBox" name="cap_height_spin"> - <property name="geometry"> - <rect> - <x>20</x> - <y>90</y> - <width>81</width> - <height>22</height> - </rect> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="tabModelCustom"> - <property name="enabled"> - <bool>true</bool> - </property> - <attribute name="title"> - <string>Custom</string> - </attribute> - <layout class="QGridLayout" name="gridLayout"> - <item row="1" column="0"> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string/> - </property> - <property name="flat"> - <bool>false</bool> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string><html><head/><body><p><span style=" font-size:12pt;">X</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_6"> - <property name="text"> - <string><html><head/><body><p><span style=" font-size:12pt;">Y</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_11"> - <property name="text"> - <string><html><head/><body><p><span style=" font-size:12pt;">Z</span></p></body></html></string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="7" column="0"> - <widget class="QGroupBox" name="iGroupBoxTopRight"> - <property name="title"> - <string>Top Right</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <item> - <widget class="QSpinBox" name="iSpinVertexTopRightX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopRightY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopRightZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="8" column="0"> - <widget class="QGroupBox" name="iGroupBoxTopLeft"> - <property name="title"> - <string>Top Left</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <item> - <widget class="QSpinBox" name="iSpinVertexTopLeftX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopLeftY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopLeftZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="5" column="0"> - <widget class="QGroupBox" name="iGroupBoxLeft"> - <property name="title"> - <string>Left</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QSpinBox" name="iSpinVertexLeftX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexLeftY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexLeftZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="0"> - <widget class="QGroupBox" name="groupBoxCustomModelType"> - <property name="title"> - <string>Vertex count</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QRadioButton" name="iRadioButtonCustomModelThree"> - <property name="text"> - <string>Three vertices</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="iRadioButtonCustomModelFour"> - <property name="text"> - <string>Four vertices</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="iRadioButtonCustomModelFive"> - <property name="text"> - <string>Five vertices</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="6" column="0"> - <widget class="QGroupBox" name="iGroupBoxCenter"> - <property name="title"> - <string>Center</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <item> - <widget class="QSpinBox" name="iSpinVertexCenterX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexCenterY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexCenterZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="3" column="0"> - <widget class="QGroupBox" name="iGroupBoxRight"> - <property name="title"> - <string>Right</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QSpinBox" name="iSpinVertexRightX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexRightY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexRightZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="2" column="0"> - <widget class="QGroupBox" name="iGroupBoxTop"> - <property name="title"> - <string>Top</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="topMargin"> - <number>9</number> - </property> - <item> - <widget class="QSpinBox" name="iSpinVertexTopX"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopY"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="iSpinVertexTopZ"> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65535</number> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QSpinBox" name="iSpinVertexCenterX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexCenterY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexCenterZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxTopRight"> + <property name="title"> + <string>Top Right</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QSpinBox" name="iSpinVertexTopRightX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopRightY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopRightZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="iGroupBoxTopLeft"> + <property name="title"> + <string>Top Left</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QSpinBox" name="iSpinVertexTopLeftX"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopLeftY"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="iSpinVertexTopLeftZ"> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + </widget> + </item> + </layout> </widget> </item> </layout> @@ -1181,7 +845,7 @@ <item row="0" column="0"> <widget class="QLabel" name="label_10"> <property name="text"> - <string><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 0.1</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999AA;">documentation on GitHub</span></a></p></body></html></string> + <string><html><head/><body><p><span style=" font-weight:600;">Easy Tracker<br/>Version 1.0</span></p><p><span style=" font-weight:600;">by Stéphane Lenclud</span></p><p>See <a href="https://github.com/opentrack/opentrack/wiki/Easy-Tracker"><span style=" font-weight:600; text-decoration: underline; color:#9999aa;">documentation on GitHub</span></a></p></body></html></string> </property> <property name="alignment"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> @@ -1208,73 +872,6 @@ </widget> </widget> </item> - <item row="7" column="0" alignment="Qt::AlignVCenter"> - <widget class="QGroupBox" name="groupBox_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Status</string> - </property> - <layout class="QGridLayout" name="gridLayout_10"> - <item row="1" column="0"> - <widget class="QLabel" name="label_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Extracted Points:</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_38"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Camera Info:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="pointinfo_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="caminfo_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </widget> - </item> </layout> </widget> <tabstops> @@ -1285,14 +882,6 @@ <tabstop>fps_spin</tabstop> <tabstop>fov</tabstop> <tabstop>camera_settings</tabstop> - <tabstop>model_tabs</tabstop> - <tabstop>clip_tlength_spin</tabstop> - <tabstop>clip_theight_spin</tabstop> - <tabstop>clip_bheight_spin</tabstop> - <tabstop>clip_blength_spin</tabstop> - <tabstop>cap_length_spin</tabstop> - <tabstop>cap_height_spin</tabstop> - <tabstop>cap_width_spin</tabstop> </tabstops> <resources> <include location="tracker_easy.qrc"/> diff --git a/tracker-easy/tracker-easy.cpp b/tracker-easy/tracker-easy.cpp index 3f0855a0..1bb6b5e1 100644 --- a/tracker-easy/tracker-easy.cpp +++ b/tracker-easy/tracker-easy.cpp @@ -129,28 +129,18 @@ namespace EasyTracker // We are converting them from millimeters to centimeters. // TODO: Need to support clip too. That's cap only for now. iModel.clear(); - if (iSettings.active_model_panel == Model::Custom) - { - iModel.push_back(cv::Point3f(iSettings.iVertexTopX / 10.0, iSettings.iVertexTopY / 10.0, iSettings.iVertexTopZ / 10.0)); // Top - iModel.push_back(cv::Point3f(iSettings.iVertexRightX / 10.0, iSettings.iVertexRightY / 10.0, iSettings.iVertexRightZ / 10.0)); // Right - iModel.push_back(cv::Point3f(iSettings.iVertexLeftX / 10.0, iSettings.iVertexLeftY / 10.0, iSettings.iVertexLeftZ / 10.0)); // Left + iModel.push_back(cv::Point3f(iSettings.iVertexTopX / 10.0, iSettings.iVertexTopY / 10.0, iSettings.iVertexTopZ / 10.0)); // Top + iModel.push_back(cv::Point3f(iSettings.iVertexRightX / 10.0, iSettings.iVertexRightY / 10.0, iSettings.iVertexRightZ / 10.0)); // Right + iModel.push_back(cv::Point3f(iSettings.iVertexLeftX / 10.0, iSettings.iVertexLeftY / 10.0, iSettings.iVertexLeftZ / 10.0)); // Left - if (iSettings.iCustomModelFour) - { - iModel.push_back(cv::Point3f(iSettings.iVertexCenterX / 10.0, iSettings.iVertexCenterY / 10.0, iSettings.iVertexCenterZ / 10.0)); // Center - } - else if (iSettings.iCustomModelFive) - { - iModel.push_back(cv::Point3f(iSettings.iVertexTopRightX / 10.0, iSettings.iVertexTopRightY / 10.0, iSettings.iVertexTopRightZ / 10.0)); // Top Right - iModel.push_back(cv::Point3f(iSettings.iVertexTopLeftX / 10.0, iSettings.iVertexTopLeftY / 10.0, iSettings.iVertexTopLeftZ / 10.0)); // Top Left - } + if (iSettings.iCustomModelFour) + { + iModel.push_back(cv::Point3f(iSettings.iVertexCenterX / 10.0, iSettings.iVertexCenterY / 10.0, iSettings.iVertexCenterZ / 10.0)); // Center } - // Default to Cap for now - else //if (iSettings.active_model_panel == Cap) + else if (iSettings.iCustomModelFive) { - iModel.push_back(cv::Point3f(0, 0, 0)); // Top - iModel.push_back(cv::Point3f(iSettings.cap_x / 10.0, iSettings.cap_z / 10.0, -iSettings.cap_y / 10.0)); // Right - iModel.push_back(cv::Point3f(-iSettings.cap_x / 10.0, iSettings.cap_z / 10.0, -iSettings.cap_y / 10.0)); // Left + iModel.push_back(cv::Point3f(iSettings.iVertexTopRightX / 10.0, iSettings.iVertexTopRightY / 10.0, iSettings.iVertexTopRightZ / 10.0)); // Top Right + iModel.push_back(cv::Point3f(iSettings.iVertexTopLeftX / 10.0, iSettings.iVertexTopLeftY / 10.0, iSettings.iVertexTopLeftZ / 10.0)); // Top Left } } diff --git a/tracker-easy/tracker-easy.h b/tracker-easy/tracker-easy.h index d99d4662..952f05a4 100644 --- a/tracker-easy/tracker-easy.h +++ b/tracker-easy/tracker-easy.h @@ -46,17 +46,6 @@ namespace EasyTracker }; } - namespace Model - { - // Order matters, it must match the order of the UI tabs - enum Type - { - Clip, - Cap, - Custom - }; - } - static const QString KModuleName = "tracker-easy"; class Dialog; |