summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt44
-rw-r--r--FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp8
-rw-r--r--FTNoIR_Tracker_PT/ftnoir_tracker_pt.h4
-rw-r--r--facetracknoir/images/facetracknoir.pngbin691 -> 26466 bytes
-rw-r--r--facetracknoir/mingw-version-script.txt8
-rw-r--r--facetracknoir/tracker.cpp31
-rw-r--r--ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui159
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.cpp11
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.h5
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp4
-rw-r--r--ftnoir_filter_base/ftnoir_filter_base.h2
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp3
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2.h2
-rw-r--r--ftnoir_filter_kalman/ftnoir_filter_kalman.h3
-rw-r--r--ftnoir_filter_kalman/kalman.cpp3
-rw-r--r--ftnoir_posewidget/glwidget.cpp8
-rw-r--r--ftnoir_posewidget/images/side1.pngbin9018 -> 26449 bytes
-rw-r--r--ftnoir_posewidget/images/side6.pngbin4768 -> 26493 bytes
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp4
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.h2
-rw-r--r--ftnoir_tracker_base/ftnoir_tracker_base.h2
-rw-r--r--ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp7
-rw-r--r--ftnoir_tracker_hatire/ftnoir_tracker_hat.h4
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp23
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.h2
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp4
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.h2
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp10
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.h2
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.cpp3
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.h2
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.cpp3
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.h2
-rw-r--r--installer/opentrack-installer.iss2
-rw-r--r--opentrack-api/opentrack.h2
-rw-r--r--opentrack-api/trackers.cpp5
36 files changed, 140 insertions, 236 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc9aaec3..d760937f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_COMPILER_IS_GNUCXX TRUE)
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
if(MINGW)
set(version-script mingw)
else()
@@ -45,7 +45,7 @@ if(MSVC)
add_definitions(-DNOMINMAX)
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
add_definitions(-std=c++11)
endif()
@@ -412,12 +412,12 @@ target_link_libraries(opentrack-filter-accela ${MY_QT_LIBS})
add_library(opentrack-filter-kalman SHARED ${opentrack-filter-kalman-c} ${opentrack-filter-kalman-h} ${opentrack-filter-kalman-moc} ${opentrack-filter-kalman-uih} ${opentrack-filter-kalman-rcc})
target_link_libraries(opentrack-filter-kalman ${MY_QT_LIBS} ${OpenCV_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-filter-kalman
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-filter-accela
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -425,14 +425,14 @@ endif()
add_library(opentrack-filter-ewma SHARED ${opentrack-filter-ewma-uih} ${opentrack-filter-ewma-c} ${opentrack-filter-ewma-h} ${opentrack-filter-ewma-moc} ${opentrack-filter-ewma-rcc})
target_link_libraries(opentrack-filter-ewma ${MY_QT_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-filter-ewma
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
add_library(opentrack-proto-fgfs SHARED ${opentrack-proto-fgfs-c} ${opentrack-proto-fgfs-h} ${opentrack-proto-fgfs-moc} ${opentrack-proto-fgfs-uih} ${opentrack-proto-fgfs-rcc})
target_link_libraries(opentrack-proto-fgfs ${MY_QT_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-fgfs
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -445,7 +445,7 @@ if(WIN32 AND SDK_VJOY)
else()
target_link_libraries(opentrack-proto-vjoy ${MY_QT_LIBS} "${SDK_VJOY}/VJoy.dll")
endif()
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-vjoy
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt -Wl,--enable-stdcall-fixup")
endif()
@@ -454,7 +454,7 @@ endif()
if(UNIX AND SDK_ENABLE_LIBEVDEV)
add_library(opentrack-proto-libevdev SHARED ${opentrack-proto-libevdev-c} ${opentrack-proto-libevdev-h} ${opentrack-proto-libevdev-moc} ${opentrack-proto-libevdev-uih} ${opentrack-proto-libevdev-rcc})
target_link_libraries(opentrack-proto-libevdev ${MY_QT_LIBS} evdev)
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-libevdev
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -494,7 +494,7 @@ endif()
add_library(opentrack-proto-udp SHARED ${opentrack-proto-udp-c} ${opentrack-proto-udp-h} ${opentrack-proto-udp-moc} ${opentrack-proto-udp-uih} ${opentrack-proto-udp-rcc})
target_link_libraries(opentrack-proto-udp ${MY_QT_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-udp
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -502,7 +502,7 @@ endif()
if(WIN32)
add_library(opentrack-tracker-joystick SHARED ${opentrack-tracker-joystick-c} ${opentrack-tracker-joystick-h} ${opentrack-tracker-joystick-moc} ${opentrack-tracker-joystick-uih} ${opentrack-tracker-joystick-rcc})
target_link_libraries(opentrack-tracker-joystick ${MY_QT_LIBS})
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-joystick
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -511,7 +511,7 @@ endif()
if(NOT WIN32 AND SDK_WINE_PREFIX)
add_library(opentrack-proto-wine SHARED ${opentrack-proto-wine-c} ${opentrack-proto-wine-h} ${opentrack-proto-wine-moc} ${opentrack-proto-wine-uih} ${opentrack-proto-wine-rcc})
target_link_libraries(opentrack-proto-wine ${MY_QT_LIBS} opentrack-compat opentrack-csv)
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-wine
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -536,14 +536,14 @@ if(NOT WIN32 AND SDK_WINE_PREFIX)
endif()
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-proto-fgfs
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
add_library(opentrack-tracker-ht SHARED ${opentrack-tracker-ht-c} ${opentrack-tracker-ht-h} ${opentrack-tracker-ht-moc} ${opentrack-tracker-ht-uih} ${opentrack-tracker-ht-rcc})
target_link_libraries(opentrack-tracker-ht ${MY_QT_LIBS} opentrack-compat)
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-ht
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -552,7 +552,7 @@ if(SDK_ARUCO_LIBPATH)
include_directories(${CMAKE_SOURCE_DIR}/ftnoir_tracker_aruco/include)
add_library(opentrack-tracker-aruco SHARED ${opentrack-tracker-aruco-c} ${opentrack-tracker-aruco-h} ${opentrack-tracker-aruco-moc} ${opentrack-tracker-aruco-uih} ${opentrack-tracker-aruco-rcc})
target_link_libraries(opentrack-tracker-aruco ${MY_QT_LIBS} ${SDK_ARUCO_LIBPATH} ${OpenCV_LIBS})
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-aruco
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -567,7 +567,7 @@ endif()
add_library(opentrack-tracker-hatire SHARED ${opentrack-tracker-hatire-c} ${opentrack-tracker-hatire-h} ${opentrack-tracker-hatire-moc} ${opentrack-tracker-hatire-uih} ${opentrack-tracker-hatire-rcc})
target_link_libraries(opentrack-tracker-hatire ${MY_QT_LIBS})
install(TARGETS opentrack-tracker-hatire RUNTIME DESTINATION . LIBRARY DESTINATION . )
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-hatire
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -591,7 +591,7 @@ if(APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-pt PROPERTIES COMPILE_FLAGS "-std=c++11")
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-pt
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -606,7 +606,7 @@ endif()
add_library(opentrack-tracker-udp SHARED ${opentrack-tracker-udp-c} ${opentrack-tracker-udp-h} ${opentrack-tracker-udp-moc} ${opentrack-tracker-udp-uih} ${opentrack-tracker-udp-rcc})
target_link_libraries(opentrack-tracker-udp ${MY_QT_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-udp
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -630,7 +630,7 @@ if(SDK_RIFT)
endif()
endif()
endif()
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-rift
PROPERTIES
LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt"
@@ -675,7 +675,7 @@ if(SDK_HYDRA)
)
target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/lib/${sixense-plat}${underscore-sixtyfour}/release${underscore-dll}/libsixense${underscore-sixtyfour}.${soext}" "${SDK_HYDRA}/lib/${sixense-plat}${underscore-sixtyfour}/release${underscore-dll}/libsixense_utils${underscore-sixtyfour}.${soext}")
endif()
- if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-tracker-hydra
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/${version-script}-version-script.txt")
endif()
@@ -705,7 +705,7 @@ endif()
add_library(opentrack-api SHARED ${opentrack-lib-c} ${opentrack-lib-h} ${opentrack-lib-moc})
target_link_libraries(opentrack-api ${MY_QT_LIBS})
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(opentrack-api PROPERTIES
LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/opentrack-api/gnuc-version-script.txt"
COMPILE_FLAGS "-fvisibility=protected -fvisibility-inlines-hidden"
@@ -715,13 +715,13 @@ endif()
set_target_properties(opentrack PROPERTIES COMPILE_DEFINITIONS OPENTRACK_VERSION=\"${OPENTRACK__COMMIT}\")
-if(UNIX)
+if(UNIX OR APPLE)
target_link_libraries(opentrack opentrack-qxt-mini)
endif()
target_link_libraries(opentrack ${OpenCV_LIBS})
include_directories(${OpenCV_INCLUDE_DIRS})
-if(UNIX)
+if(UNIX OR APPLE)
install(TARGETS opentrack-qxt-mini RUNTIME DESTINATION . LIBRARY DESTINATION . )
endif()
diff --git a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp
index dcf28f04..e3af446f 100644
--- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp
+++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp
@@ -234,12 +234,12 @@ void Tracker::StopTracker(bool exit)
#define THeadPoseData double
#endif
-bool Tracker::GiveHeadPoseData(THeadPoseData *data)
+void Tracker::GetHeadPoseData(THeadPoseData *data)
{
{
QMutexLocker lock(&mutex);
- if (!tracking_valid) return false;
+ if (!tracking_valid) return;
FrameTrafo X_CM = point_tracker.get_pose();
FrameTrafo X_MH(Matx33f::eye(), t_MH);
@@ -281,7 +281,9 @@ bool Tracker::GiveHeadPoseData(THeadPoseData *data)
if (bEnableRoll) data[Roll] = rad2deg * gamma;
#endif
}
- return true;
+#ifndef OPENTRACK_API
+ return true;
+#endif
}
//-----------------------------------------------------------------------------
diff --git a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h
index 64f282b6..54edafb2 100644
--- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h
+++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h
@@ -44,11 +44,11 @@ public:
virtual void Initialize(QFrame *videoframe);
#ifdef OPENTRACK_API
virtual void StartTracker(QFrame* parent_window);
- virtual bool GiveHeadPoseData(double* data);
+ virtual void GetHeadPoseData(double* data);
#else
virtual void StartTracker(HWND parent_window);
virtual void StopTracker(bool exit);
- virtual bool GiveHeadPoseData(THeadPoseData *data);
+ virtual bool GetHeadPoseData(THeadPoseData *data);
#endif
virtual void refreshVideo();
diff --git a/facetracknoir/images/facetracknoir.png b/facetracknoir/images/facetracknoir.png
index b57724e0..41b54524 100644
--- a/facetracknoir/images/facetracknoir.png
+++ b/facetracknoir/images/facetracknoir.png
Binary files differ
diff --git a/facetracknoir/mingw-version-script.txt b/facetracknoir/mingw-version-script.txt
new file mode 100644
index 00000000..fe20ad37
--- /dev/null
+++ b/facetracknoir/mingw-version-script.txt
@@ -0,0 +1,8 @@
+{
+ global:
+ GetDialog?0;
+ GetConstructor?0;
+ GetMetadata?0;
+ local:
+ *;
+};
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index b65ccde8..8f8ad356 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -85,14 +85,9 @@ static void t_compensate(double* input, double* output)
/** QThread run method @override **/
void Tracker::run() {
- T6DOF offset_camera, gameoutput_camera, target_camera;
-
- bool bTracker1Confid = false;
- bool bTracker2Confid = false;
+ T6DOF offset_camera;
double newpose[6] = {0};
- double last_post_filter[6] ;
-
int sleep_ms = 15;
if (Libraries->pTracker)
@@ -113,25 +108,22 @@ void Tracker::run() {
break;
if (Libraries->pSecondTracker) {
- bTracker2Confid = Libraries->pSecondTracker->GiveHeadPoseData(newpose);
+ Libraries->pSecondTracker->GetHeadPoseData(newpose);
}
if (Libraries->pTracker) {
- bTracker1Confid = Libraries->pTracker->GiveHeadPoseData(newpose);
+ Libraries->pTracker->GetHeadPoseData(newpose);
}
{
QMutexLocker foo(&mtx);
- const bool confid = bTracker1Confid || bTracker2Confid;
- if ( confid ) {
- for (int i = 0; i < 6; i++)
- mainApp->axis(i).headPos = newpose[i];
- }
+ for (int i = 0; i < 6; i++)
+ mainApp->axis(i).headPos = newpose[i];
if (do_center) {
for (int i = 0; i < 6; i++)
- offset_camera.axes[i] = target_camera.axes[i];
+ offset_camera.axes[i] = mainApp->axis(i).headPos;
do_center = false;
@@ -139,9 +131,9 @@ void Tracker::run() {
Libraries->pFilter->Initialize();
}
- T6DOF target_camera2, new_camera;
+ T6DOF target_camera, target_camera2, new_camera;
- if (enabled && confid)
+ if (enabled)
{
for (int i = 0; i < 6; i++)
target_camera.axes[i] = mainApp->axis(i).headPos;
@@ -150,9 +142,7 @@ void Tracker::run() {
}
if (Libraries->pFilter) {
- for (int i = 0; i < 6; i++)
- last_post_filter[i] = gameoutput_camera.axes[i];
- Libraries->pFilter->FilterHeadPoseData(target_camera2.axes, new_camera.axes, last_post_filter);
+ Libraries->pFilter->FilterHeadPoseData(target_camera2.axes, new_camera.axes);
} else {
new_camera = target_camera2;
}
@@ -165,8 +155,7 @@ void Tracker::run() {
t_compensate(output_camera.axes, output_camera.axes);
if (Libraries->pProtocol) {
- gameoutput_camera = output_camera;
- Libraries->pProtocol->sendHeadposeToGame( gameoutput_camera.axes ); // degrees & centimeters
+ Libraries->pProtocol->sendHeadposeToGame( output_camera.axes ); // degrees & centimeters
}
}
diff --git a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
index b48496bf..fb6a9565 100644
--- a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
+++ b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
@@ -78,6 +78,9 @@
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<layout class="QFormLayout" name="formLayout_2">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ </property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
@@ -160,76 +163,77 @@
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="lblSensYaw_5">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Order #2</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QDoubleSpinBox" name="order_2nd">
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+ <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
+ <property name="correctionMode">
+ <enum>QAbstractSpinBox::CorrectToPreviousValue</enum>
</property>
- <property name="styleSheet">
- <string notr="true">color:#0;
-background:none;</string>
+ <property name="decimals">
+ <number>4</number>
+ </property>
+ <property name="minimum">
+ <double>0.100000000000000</double>
</property>
+ <property name="maximum">
+ <double>65535.000000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_12">
<property name="text">
- <string>Zoomed</string>
+ <string>Order #3</string>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="spinZoom">
+ <item row="3" column="1">
+ <widget class="QDoubleSpinBox" name="order_3rd">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>20</width>
- <height>22</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
- <property name="readOnly">
- <bool>false</bool>
+ <property name="correctionMode">
+ <enum>QAbstractSpinBox::CorrectToPreviousValue</enum>
</property>
- <property name="suffix">
- <string>%</string>
+ <property name="decimals">
+ <number>4</number>
</property>
<property name="minimum">
- <number>0</number>
+ <double>0.100000000000000</double>
</property>
<property name="maximum">
- <number>200</number>
- </property>
- <property name="singleStep">
- <number>1</number>
+ <double>65535.000000000000000</double>
</property>
<property name="value">
- <number>45</number>
+ <double>1.000000000000000</double>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="lblSensYaw_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
@@ -258,7 +262,7 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="4" column="1">
<widget class="QDoubleSpinBox" name="deadzone">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
@@ -286,14 +290,14 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Exponent</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="5" column="1">
<widget class="QDoubleSpinBox" name="expt">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -315,76 +319,6 @@ background:none;</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Order #2</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QDoubleSpinBox" name="order_2nd">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="correctionMode">
- <enum>QAbstractSpinBox::CorrectToPreviousValue</enum>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- <property name="minimum">
- <double>0.100000000000000</double>
- </property>
- <property name="maximum">
- <double>65535.000000000000000</double>
- </property>
- <property name="value">
- <double>1.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QDoubleSpinBox" name="order_3rd">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="correctionMode">
- <enum>QAbstractSpinBox::CorrectToPreviousValue</enum>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- <property name="minimum">
- <double>0.100000000000000</double>
- </property>
- <property name="maximum">
- <double>65535.000000000000000</double>
- </property>
- <property name="value">
- <double>1.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>Order #3</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
@@ -720,7 +654,6 @@ background:none;</string>
<tabstop>translation_alpha</tabstop>
<tabstop>order_2nd</tabstop>
<tabstop>order_3rd</tabstop>
- <tabstop>spinZoom</tabstop>
<tabstop>deadzone</tabstop>
<tabstop>expt</tabstop>
<tabstop>doubleSpinBox</tabstop>
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
index a78a38c5..1046c268 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
@@ -31,7 +31,6 @@ void FTNoIR_Filter::loadSettings() {
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup ( "Accela" );
- zoom_factor = iniFile.value("zoom-slowness", ACCELA_ZOOM_SLOWNESS).toDouble();
rotation_alpha = iniFile.value("rotation-alpha", ACCELA_SMOOTHING_ROTATION).toDouble();
translation_alpha = iniFile.value("translation-alpha", ACCELA_SMOOTHING_TRANSLATION).toDouble();
second_order_alpha = iniFile.value("second-order-alpha", ACCELA_SECOND_ORDER_ALPHA).toDouble();
@@ -80,8 +79,7 @@ static inline T clamp(const T min, const T max, const T value)
}
void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
- double *new_camera_position,
- const double* last_post_filter_values)
+ double *new_camera_position)
{
if (first_run)
{
@@ -136,11 +134,10 @@ void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
const double a = i >= 3 ? rotation_alpha : translation_alpha;
const double a2 = a * second_order_alpha;
const double a3 = a * third_order_alpha;
- const double reduction = 1. / std::max(1., 1. + zoom_factor * -last_post_filter_values[TZ] / 1000);
const double velocity =
- parabola(a, vec * scaling[i], deadzone, expt) * reduction +
- parabola(a2, vec2 * scaling[i], deadzone, expt) * reduction +
- parabola(a3, vec3 * scaling[i], deadzone, expt) * reduction;
+ parabola(a, vec * scaling[i], deadzone, expt) +
+ parabola(a2, vec2 * scaling[i], deadzone, expt) +
+ parabola(a3, vec3 * scaling[i], deadzone, expt);
const double result = last_output[0][i] + velocity;
const bool done = sign > 0 ? result >= target_camera_position[i] : result <= target_camera_position[i];
new_camera_position[i] = done ? target_camera_position[i] : result;
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h
index 0a550f0e..d91a5e42 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.h
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.h
@@ -34,7 +34,6 @@
#define ACCELA_SMOOTHING_ROTATION 60.0
#define ACCELA_SMOOTHING_TRANSLATION 40.0
-#define ACCELA_ZOOM_SLOWNESS 0
#define ACCELA_SECOND_ORDER_ALPHA 100.0
#define ACCELA_THIRD_ORDER_ALPHA 180.0
@@ -46,7 +45,7 @@ class FTNoIR_Filter : public IFilter
public:
FTNoIR_Filter();
virtual ~FTNoIR_Filter();
- void FilterHeadPoseData(const double* target_camera_position, double *new_camera_position, const double* last_post_filter_values);
+ void FilterHeadPoseData(const double* target_camera_position, double *new_camera_position);
void Initialize() {
first_run = true;
}
@@ -55,7 +54,7 @@ private:
QMutex mutex;
void loadSettings();
bool first_run;
- double rotation_alpha, translation_alpha, zoom_factor;
+ double rotation_alpha, translation_alpha;
double second_order_alpha, third_order_alpha;
double scaling[6];
double deadzone;
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
index be6836c2..a14db280 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
+++ b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
@@ -47,8 +47,6 @@ FilterControls::FilterControls() :
connect(ui.rotation_alpha, SIGNAL(valueChanged(double)), this, SLOT(settingChanged(double)));
connect(ui.translation_alpha, SIGNAL(valueChanged(double)), this, SLOT(settingChanged(double)));
- connect(ui.spinZoom, SIGNAL(valueChanged(int)), this, SLOT(settingChanged(int)));
-
QDoubleSpinBox* boxen[] = {
ui.doubleSpinBox,
ui.doubleSpinBox_2,
@@ -157,7 +155,6 @@ void FilterControls::loadSettings() {
//qDebug() << "FTNoIR_Filter::loadSettings2 says: size = " << NUM_OF(defScaleRotation);
iniFile.beginGroup ( "Accela" );
- ui.spinZoom->setValue(iniFile.value("zoom-slowness", ACCELA_ZOOM_SLOWNESS).toInt());
ui.rotation_alpha->setValue(iniFile.value("rotation-alpha", ACCELA_SMOOTHING_ROTATION).toDouble());
ui.translation_alpha->setValue(iniFile.value("translation-alpha", ACCELA_SMOOTHING_TRANSLATION).toDouble());
ui.order_2nd->setValue(iniFile.value("second-order-alpha", ACCELA_SECOND_ORDER_ALPHA).toDouble());
@@ -210,7 +207,6 @@ void FilterControls::save() {
iniFile.beginGroup ( "Accela" );
iniFile.setValue("rotation-alpha", ui.rotation_alpha->value());
iniFile.setValue("translation-alpha", ui.translation_alpha->value());
- iniFile.setValue("zoom-slowness", ui.spinZoom->value());
iniFile.setValue("deadzone", ui.deadzone->value());
iniFile.setValue("exponent", ui.expt->value());
iniFile.setValue("second-order-alpha", ui.order_2nd->value());
diff --git a/ftnoir_filter_base/ftnoir_filter_base.h b/ftnoir_filter_base/ftnoir_filter_base.h
index 48a4a6b9..800e5deb 100644
--- a/ftnoir_filter_base/ftnoir_filter_base.h
+++ b/ftnoir_filter_base/ftnoir_filter_base.h
@@ -13,7 +13,7 @@
struct IFilter
{
virtual ~IFilter() = 0;
- virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position, const double *last_post_filter) = 0;
+ virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position) = 0;
virtual void Initialize() = 0;
};
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
index 3b208ef2..5f66be96 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
@@ -80,8 +80,7 @@ void FTNoIR_Filter::loadSettings() {
}
void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position,
- double *new_camera_position,
- const double *)
+ double *new_camera_position)
{
double delta;
double new_alpha;
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
index 7f2f21e6..86e4b65c 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
@@ -45,7 +45,7 @@ public:
void Initialize() {}
void FilterHeadPoseData(const double *target_camera_position,
- double *new_camera_position, const double *);
+ double *new_camera_position);
void receiveSettings(double smin, double smax, double sexpt);
private:
diff --git a/ftnoir_filter_kalman/ftnoir_filter_kalman.h b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
index 6c2cb6a9..da6df2b1 100644
--- a/ftnoir_filter_kalman/ftnoir_filter_kalman.h
+++ b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
@@ -30,8 +30,7 @@ public:
}
void Initialize() virt_override;
void FilterHeadPoseData(const double *target_camera_position,
- double *new_camera_position,
- const double *) virt_override;
+ double *new_camera_position) virt_override;
cv::KalmanFilter kalman;
double prev_position[6];
double prev2_filter_pos[6];
diff --git a/ftnoir_filter_kalman/kalman.cpp b/ftnoir_filter_kalman/kalman.cpp
index 5ecd417c..629cfcc8 100644
--- a/ftnoir_filter_kalman/kalman.cpp
+++ b/ftnoir_filter_kalman/kalman.cpp
@@ -93,8 +93,7 @@ static inline T clamp(const T min, const T max, const T value)
}
void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
- double *new_camera_position,
- const double *)
+ double *new_camera_position)
{
bool new_target = false;
diff --git a/ftnoir_posewidget/glwidget.cpp b/ftnoir_posewidget/glwidget.cpp
index 93c98c9c..70667f06 100644
--- a/ftnoir_posewidget/glwidget.cpp
+++ b/ftnoir_posewidget/glwidget.cpp
@@ -181,10 +181,10 @@ void GLWidget::project_quad_texture() {
double qy = origs[i][0].y
+ coords.x * (origs[i][2].y - origs[i][0].y)
+ coords.y * (origs[i][1].y - origs[i][0].y);
- int qx1 = std::min<int>(ow - 1, std::max<int>(0, qx - 0.5));
- int qy1 = std::min<int>(oh - 1, std::max<int>(0, qy - 0.5));
- int qx2 = std::min<int>(ow - 1, std::max<int>(0, qx + 0.5));
- int qy2 = std::min<int>(oh - 1, std::max<int>(0, qy + 0.5));
+ int qx1 = std::min<int>(ow - 1, std::max<int>(0, qx));
+ int qy1 = std::min<int>(oh - 1, std::max<int>(0, qy));
+ int qx2 = std::min<int>(ow - 1, std::max<int>(0, qx + 1.0));
+ int qy2 = std::min<int>(oh - 1, std::max<int>(0, qy + 1.0));
double dx1 = qx1 - qx;
double dy1 = qy1 - qy;
diff --git a/ftnoir_posewidget/images/side1.png b/ftnoir_posewidget/images/side1.png
index e0315b77..d7467943 100644
--- a/ftnoir_posewidget/images/side1.png
+++ b/ftnoir_posewidget/images/side1.png
Binary files differ
diff --git a/ftnoir_posewidget/images/side6.png b/ftnoir_posewidget/images/side6.png
index f4160001..eaa80d7e 100644
--- a/ftnoir_posewidget/images/side6.png
+++ b/ftnoir_posewidget/images/side6.png
Binary files differ
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index 7581b77a..6d06d4a8 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -375,7 +375,7 @@ void Tracker::run()
}
}
-bool Tracker::GiveHeadPoseData(double *data)
+void Tracker::GetHeadPoseData(double *data)
{
QMutexLocker lck(&mtx);
@@ -391,8 +391,6 @@ bool Tracker::GiveHeadPoseData(double *data)
data[TY] = pose[TY];
if (enableTZ)
data[TZ] = pose[TZ];
-
- return true;
}
class TrackerDll : public Metadata
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
index 1518ba4d..be2ad3d7 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
@@ -26,7 +26,7 @@ public:
Tracker();
virtual ~Tracker();
void StartTracker(QFrame* frame);
- bool GiveHeadPoseData(double *data);
+ void GetHeadPoseData(double *data);
bool enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ;
void run();
void load_settings();
diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h
index 38c24afe..16f76cf3 100644
--- a/ftnoir_tracker_base/ftnoir_tracker_base.h
+++ b/ftnoir_tracker_base/ftnoir_tracker_base.h
@@ -43,7 +43,7 @@ struct ITracker
{
virtual ~ITracker() = 0;
virtual void StartTracker( QFrame* frame ) = 0;
- virtual bool GiveHeadPoseData(double *data) = 0;
+ virtual void GetHeadPoseData(double *data) = 0;
virtual int preferredHz() { return 66; }
};
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp b/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp
index b933dd14..f902b207 100644
--- a/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp
+++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat.cpp
@@ -323,7 +323,7 @@ void FTNoIR_Tracker::StartTracker(QFrame*)
#define THeadPoseData double
#endif
-bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
+void FTNoIR_Tracker::GetHeadPoseData(THeadPoseData *data)
{
QMutexLocker lck(&mutex);
while (dataRead.length()>=30) {
@@ -354,7 +354,7 @@ bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
if (CptError>50) {
emit sendMsgInfo("Can't find HAT frame") ;
CptError=0;
- return false;
+ return;
}
#ifdef OPENTRACK_API
data[frame_cnt] = (long) HAT.Code;
@@ -425,9 +425,6 @@ bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
// For debug
//data->x=dataRead.length();
//data->y=CptError;
-
- return true;
-
}
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
index a1b4ecda..ec1125b9 100644
--- a/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
+++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat.h
@@ -29,12 +29,12 @@ public:
#ifdef OPENTRACK_API
virtual void StartTracker(QFrame*);
- virtual bool GiveHeadPoseData(double* data);
+ virtual void GetHeadPoseData(double* data);
#else
void Initialize( QFrame *videoframe );
virtual void StartTracker(HWND parent_window);
virtual void StopTracker(bool exit);
- virtual bool GiveHeadPoseData(THeadPoseData *data);
+ virtual bool GetHeadPoseData(THeadPoseData *data);
#endif
void applysettings(const TrackerSettings& settings);
void notifyCenter();
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index ab726aa1..00dd9919 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -97,28 +97,28 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
iniFile.beginGroup( "HT-Tracker" );
config->classification_delay = 500;
config->field_of_view = iniFile.value("fov", 52).toFloat();
- config->pyrlk_pyramids = 2;
+ config->pyrlk_pyramids = 0;
config->pyrlk_win_size_w = config->pyrlk_win_size_h = 21;
- config->max_keypoints = 300;
- config->keypoint_distance = 4.3;
+ config->max_keypoints = 400;
+ config->keypoint_distance = 3.3;
//config->force_width = 640;
//config->force_height = 480;
config->force_fps = iniFile.value("fps", 0).toInt();
config->camera_index = iniFile.value("camera-index", -1).toInt();
config->ransac_num_iters = 100;
- config->ransac_max_reprojection_error = 6.5;
- config->ransac_max_inlier_error = 6.5;
+ config->ransac_max_reprojection_error = 7.2;
+ config->ransac_max_inlier_error = 7.2;
config->ransac_abs_max_mean_error = 15;
- config->ransac_max_mean_error = 4.5;
+ config->ransac_max_mean_error = 5.0;
config->debug = 0;
- config->ransac_min_features = 0.76;
+ config->ransac_min_features = 0.78;
int res = iniFile.value("resolution", 0).toInt();
if (res < 0 || res >= (int)(sizeof(resolution_choices) / sizeof(resolution_tuple)))
res = 0;
resolution_tuple r = resolution_choices[res];
config->force_width = r.width;
config->force_height = r.height;
- config->flandmark_delay = 250;
+ config->flandmark_delay = 325;
qDebug() << "width" << r.width << "height" << r.height;
if (tracker)
{
@@ -186,10 +186,8 @@ void Tracker::StartTracker(QFrame* videoframe)
#endif
}
-bool Tracker::GiveHeadPoseData(double *data)
+void Tracker::GetHeadPoseData(double *data)
{
- bool ret = false;
-
lck_shm.lock();
shm->timer = 0;
if (shm->frame.width > 0)
@@ -213,7 +211,6 @@ bool Tracker::GiveHeadPoseData(double *data)
data[TY] = shm->result.ty;
if (enableTZ)
data[TZ] = shm->result.tz;
- ret = true;
if (fabs(data[Yaw]) > 60 || fabs(data[Pitch]) > 50 || fabs(data[Roll]) > 40)
{
shm->pause = true;
@@ -222,8 +219,6 @@ bool Tracker::GiveHeadPoseData(double *data)
shm->pause = false;
}
lck_shm.unlock();
-
- return ret;
}
//-----------------------------------------------------------------------------
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
index c19e2d93..404dbf6e 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h
@@ -23,7 +23,7 @@ public:
Tracker();
virtual ~Tracker();
void StartTracker(QFrame* frame);
- bool GiveHeadPoseData(double *data);
+ void GetHeadPoseData(double *data);
bool enableTX, enableTY, enableTZ, enableRX, enableRY, enableRZ;
ht_shm_t* shm;
private:
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
index 86ca8888..31e3f319 100644
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
+++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
@@ -66,7 +66,7 @@ void Hydra_Tracker::StartTracker(QFrame*)
}
-bool Hydra_Tracker::GiveHeadPoseData(double *data)
+void Hydra_Tracker::GetHeadPoseData(double *data)
{
sixenseSetActiveBase(0);
@@ -109,8 +109,6 @@ bool Hydra_Tracker::GiveHeadPoseData(double *data)
if (bEnableRoll) {
data[Roll] = newHeadPose[Roll] * 57.295781f;
}
-
- return true;
}
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
index 3daaf239..240f0687 100644
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
+++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
@@ -12,7 +12,7 @@ public:
~Hydra_Tracker();
void StartTracker(QFrame *) virt_override;
- bool GiveHeadPoseData(double *data) virt_override;
+ void GetHeadPoseData(double *data) virt_override;
void loadSettings();
volatile bool should_quit;
protected:
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
index 66138e90..5be6b3db 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
@@ -175,13 +175,13 @@ fail:
qDebug() << "joy init failure";
}
-bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
+void FTNoIR_Tracker::GetHeadPoseData(double *data)
{
QMutexLocker foo(&mtx);
DIJOYSTATE js = {0};
if( !g_pDI || !g_pJoystick)
- return false;
+ return;
auto hr = g_pJoystick->Poll();
if( FAILED( hr ))
@@ -190,11 +190,11 @@ bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
for (int i = 0; hr == DIERR_INPUTLOST && i < 200; i++)
hr = g_pJoystick->Acquire();
if (hr != DI_OK)
- return false;
+ return;
}
if( FAILED( hr = g_pJoystick->GetDeviceState( sizeof( js ), &js ) ) )
- return false;
+ return;
const LONG values[] = {
js.lRx,
@@ -232,8 +232,6 @@ bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
data[i] = val * limits[i] / (double) (val >= 0 ? max : min);
}
}
-
- return true;
}
void FTNoIR_Tracker::loadSettings() {
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
index cdf4fc7b..9c856d85 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h
@@ -42,7 +42,7 @@ public:
~FTNoIR_Tracker();
void StartTracker(QFrame *frame);
- bool GiveHeadPoseData(double *data);
+ void GetHeadPoseData(double *data);
void loadSettings();
LPDIRECTINPUT8 g_pDI;
LPDIRECTINPUTDEVICE8 g_pJoystick;
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
index 4816cea4..da44ea0c 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
@@ -68,7 +68,7 @@ void Rift_Tracker::StartTracker(QFrame*)
}
-bool Rift_Tracker::GiveHeadPoseData(double *data)
+void Rift_Tracker::GetHeadPoseData(double *data)
{
if (pSFusion != NULL && pSensor != NULL) {
Quatf hmdOrient = pSFusion->GetOrientation();
@@ -113,7 +113,6 @@ bool Rift_Tracker::GiveHeadPoseData(double *data)
data[Roll] = newHeadPose[Roll] * 57.295781f;
}
}
- return pSensor != NULL;
}
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
index 7a4533d3..3920c6ad 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h
@@ -15,7 +15,7 @@ public:
virtual ~Rift_Tracker() virt_override;
void StartTracker(QFrame *) virt_override;
- bool GiveHeadPoseData(double *data) virt_override;
+ void GetHeadPoseData(double *data) virt_override;
void loadSettings();
virtual int preferredHz() virt_override { return 250; }
volatile bool should_quit;
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
index 1539707e..e70bfdc7 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
@@ -110,7 +110,7 @@ void FTNoIR_Tracker::StartTracker(QFrame*)
return;
}
-bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
+void FTNoIR_Tracker::GetHeadPoseData(double *data)
{
mutex.lock();
if (bEnableX) {
@@ -132,7 +132,6 @@ bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
data[Roll] = newHeadPose[Roll];
}
mutex.unlock();
- return true;
}
//
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
index d158630b..c7e9decf 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h
@@ -16,7 +16,7 @@ public:
~FTNoIR_Tracker();
void StartTracker(QFrame *);
- bool GiveHeadPoseData(double *data);
+ void GetHeadPoseData(double *data);
void loadSettings();
volatile bool should_quit;
protected:
diff --git a/installer/opentrack-installer.iss b/installer/opentrack-installer.iss
index 9021caf9..5f25c917 100644
--- a/installer/opentrack-installer.iss
+++ b/installer/opentrack-installer.iss
@@ -1,7 +1,7 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-#include "../build/opentrack-version.h"
+#include "../build-mingw-w64/opentrack-version.h"
#define MyAppName "opentrack"
#define MyAppVersion OPENTRACK_VERSION
#define MyAppPublisher "opentrack"
diff --git a/opentrack-api/opentrack.h b/opentrack-api/opentrack.h
index 990b6aa4..88ba6cf0 100644
--- a/opentrack-api/opentrack.h
+++ b/opentrack-api/opentrack.h
@@ -50,7 +50,7 @@ OPENTRACK_EXPORT const char** opentrack_enum_trackers(opentrack self);
*/
OPENTRACK_EXPORT opentrack_tracker opentrack_make_tracker(opentrack ctx, const char* name);
OPENTRACK_EXPORT void opentrack_tracker_start(opentrack self, opentrack_tracker tracker);
-OPENTRACK_EXPORT int opentrack_tracker_tick(opentrack_tracker tracker, double* headpose);
+OPENTRACK_EXPORT void opentrack_tracker_tick(opentrack_tracker tracker, double* headpose);
OPENTRACK_EXPORT void opentrack_finalize_tracker(opentrack_tracker tracker);
#ifdef __cplusplus
}
diff --git a/opentrack-api/trackers.cpp b/opentrack-api/trackers.cpp
index 0f698e4c..5027ec1d 100644
--- a/opentrack-api/trackers.cpp
+++ b/opentrack-api/trackers.cpp
@@ -29,11 +29,10 @@ void OPENTRACK_EXPORT opentrack_tracker_start(opentrack self, opentrack_tracker
return tracker->StartTracker(&self->fake_frame);
}
-int OPENTRACK_EXPORT opentrack_tracker_tick(opentrack_tracker tracker, double* headpose)
+void OPENTRACK_EXPORT opentrack_tracker_tick(opentrack_tracker tracker, double* headpose)
{
- int ret = tracker->GiveHeadPoseData(headpose);
+ tracker->GetHeadPoseData(headpose);
QApplication::processEvents(0, 5);
- return ret;
}
}