From 9184ea73941814b95c2768d8bcca8bdb77655891 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sat, 17 Mar 2012 16:15:51 +0000 Subject: Changed Tracker code, so the DLL's are true plug-ins. FaceTrackNoIR will scan the bin folder for FTNoIR_Tracker*.dll and put the names in the combobox. All Trackers have 3 new member-functions (like the filters). git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@104 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR/FaceTrackNoIR.cpp | 249 ++++++++++++++++++++++++++++------------ FaceTrackNoIR/FaceTrackNoIR.h | 3 + FaceTrackNoIR/FaceTrackNoIR.qrc | 1 - FaceTrackNoIR/FaceTrackNoIR.ui | 20 ++-- FaceTrackNoIR/tracker.cpp | 66 ++++++----- FaceTrackNoIR/tracker.h | 17 ++- 6 files changed, 232 insertions(+), 124 deletions(-) (limited to 'FaceTrackNoIR') diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 7e7800bf..bb078b07 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -23,6 +23,10 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120317 - WVR: The Filter and Tracker-code was moved to separate DLL's. The calling-method + was changed accordingly. The save() and LoadSettings() functions were adapted. + The face-tracker member-functions NotifyZeroed and refreshVideo were added, as + requested by Stanislaw. 20110813 - WVR: Changed the presentation of the raw inputs: now a decimal digit will even show when '0'. 20110404 - WVR: Migrated the FlightGear protocol to a separate DLL. The rest must follow... 20110401 - WVR: The about-dialog was shown 'misplaced'. It was corrected. @@ -223,6 +227,22 @@ QFrame *FaceTrackNoIR::getVideoWidget() { return ui.video_frame; } +// +// Return the name of the Filter-DLL +// +QString FaceTrackNoIR::getCurrentFilterName() +{ + return filterFileList.at(ui.iconcomboFilter->currentIndex()); +} + +// +// Return the name of the Tracker-DLL +// +QString FaceTrackNoIR::getCurrentTrackerName() +{ + return trackerFileList.at(ui.iconcomboTrackerSource->currentIndex()); +} + /** read the name of the first video-capturing device at start up **/ /** FaceAPI can only use this first one... **/ void FaceTrackNoIR::GetCameraNameDX() { @@ -341,6 +361,14 @@ void FaceTrackNoIR::save() { iniFile.beginGroup ( "TrackerSource" ); iniFile.setValue ( "Selection", ui.iconcomboTrackerSource->currentIndex() ); + iniFile.setValue ( "DLL", getCurrentTrackerName() ); + iniFile.endGroup (); + + // + // Save the name of the filter in the INI-file. + // + iniFile.beginGroup ( "Filter" ); + iniFile.setValue ( "DLL", getCurrentFilterName() ); iniFile.endGroup (); settingsDirty = false; @@ -458,16 +486,42 @@ void FaceTrackNoIR::loadSettings() { setIcon( ui.iconcomboBox->currentIndex() ); iniFile.endGroup (); + // + // Read the currently selected Tracker from the INI-file. + // If the setting "DLL" isn't found (pre-1.7 version), then the setting 'Selection' is evaluated. + // iniFile.beginGroup ( "TrackerSource" ); - ui.iconcomboTrackerSource->setCurrentIndex(iniFile.value ( "Selection", 0 ).toInt()); - trackingSourceSelected( ui.iconcomboTrackerSource->currentIndex() ); + QString selectedTrackerName = iniFile.value ( "DLL", "" ).toString(); + qDebug() << "createIconGroupBox says: selectedTrackerName = " << selectedTrackerName; + if (selectedTrackerName.length() == 0) { + int index = iniFile.value ( "Selection", 0 ).toInt(); + switch ( index ) { + case 0: // Face API + selectedTrackerName = "FTNoIR_Tracker_SM.dll"; + break; + case 1: // FTNoir server + selectedTrackerName = "FTNoIR_Tracker_UDP.dll"; + break; + default: + selectedTrackerName = "FTNoIR_Tracker_SM.dll"; + break; + } + } iniFile.endGroup (); + disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int))); + for ( int i = 0; i < trackerFileList.size(); i++) { + if (trackerFileList.at(i) == selectedTrackerName) { + ui.iconcomboTrackerSource->setCurrentIndex( i ); + } + } + connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int))); + // // Read the currently selected Filter from the INI-file. // iniFile.beginGroup ( "Filter" ); - QString selectedFilterName = iniFile.value ( "Selection", "FTNoIR_Filter_EWMA2.dll" ).toString(); + QString selectedFilterName = iniFile.value ( "DLL", "FTNoIR_Filter_EWMA2.dll" ).toString(); qDebug() << "createIconGroupBox says: selectedFilterName = " << selectedFilterName; iniFile.endGroup (); @@ -542,22 +596,23 @@ void FaceTrackNoIR::startTracker( ) { ui.btnStartTracker->setEnabled ( false ); ui.btnStopTracker->setEnabled ( true ); - // Engine controls - switch (ui.iconcomboTrackerSource->currentIndex()) { - case FT_SM_FACEAPI: // Face API - ui.btnShowEngineControls->setEnabled ( true ); // Active only when started! - break; - case FT_FTNOIR: // FTNoir server - ui.btnShowEngineControls->setEnabled ( false ); - break; - default: - break; - } + //// Engine controls + //switch (ui.iconcomboTrackerSource->currentIndex()) { + //case FT_SM_FACEAPI: // Face API + // ui.btnShowEngineControls->setEnabled ( true ); // Active only when started! + // break; + //case FT_FTNOIR: // FTNoir server + // ui.btnShowEngineControls->setEnabled ( false ); + // break; + //default: + // break; + //} // Enable/disable Protocol-server Settings ui.iconcomboTrackerSource->setEnabled ( false ); ui.iconcomboBox->setEnabled ( false ); ui.btnShowServerControls->setEnabled ( false ); + ui.iconcomboFilter->setEnabled ( false ); // // Update the camera-name, FaceAPI can only use the 1st one found! @@ -642,24 +697,25 @@ void FaceTrackNoIR::stopTracker( ) { } ui.btnStartTracker->setEnabled ( true ); ui.btnStopTracker->setEnabled ( false ); - ui.btnShowEngineControls->setEnabled ( false ); +// ui.btnShowEngineControls->setEnabled ( false ); ui.iconcomboBox->setEnabled ( true ); ui.iconcomboTrackerSource->setEnabled ( true ); + ui.iconcomboFilter->setEnabled ( true ); // Enable/disable Protocol-server Settings ui.btnShowServerControls->setEnabled ( true ); - // Engine controls - switch (ui.iconcomboTrackerSource->currentIndex()) { - case FT_SM_FACEAPI: // Face API - ui.btnShowEngineControls->setEnabled ( false ); // Active only when started! - break; - case FT_FTNOIR: // FTNoir server - ui.btnShowEngineControls->setEnabled ( true ); - break; - default: - break; - } + //// Engine controls + //switch (ui.iconcomboTrackerSource->currentIndex()) { + //case FT_SM_FACEAPI: // Face API + // ui.btnShowEngineControls->setEnabled ( false ); // Active only when started! + // break; + //case FT_FTNOIR: // FTNoir server + // ui.btnShowEngineControls->setEnabled ( true ); + // break; + //default: + // break; + //} // // Stop the timer, so it won't go off again... @@ -745,6 +801,13 @@ THeadPoseData newdata; ui.lcdNumOutputRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1)); ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1)); } + + // + // Update the video-widget. + // Requested by Stanislaw + // + Tracker::doRefreshVideo(); + } /** set the smoothing from the slider **/ @@ -793,21 +856,21 @@ QString libName; // Show the appropriate Tracker Settings libName.clear(); + libName = getCurrentTrackerName(); - switch (ui.iconcomboTrackerSource->currentIndex()) { - case FT_SM_FACEAPI: // Face API - qDebug() << "FaceTrackNoIR::showEngineControls case FT_SM_FACEAPI."; - libName = QString("FTNoIR_Tracker_SM.dll"); - break; + //switch (ui.iconcomboTrackerSource->currentIndex()) { + // case FT_SM_FACEAPI: // Face API + // qDebug() << "FaceTrackNoIR::showEngineControls case FT_SM_FACEAPI."; + // break; - case FT_FTNOIR: // FTNoir server - qDebug() << "FaceTrackNoIR::showEngineControls case FT_FTNOIR."; - libName = QString("FTNoIR_Tracker_UDP.dll"); - break; + // case FT_FTNOIR: // FTNoir server + // qDebug() << "FaceTrackNoIR::showEngineControls case FT_FTNOIR."; + // libName = QString("FTNoIR_Tracker.dll"); + // break; - default: - break; - } + // default: + // break; + //} // // Load the Server-settings dialog (if any) and show it. @@ -1013,7 +1076,8 @@ void FaceTrackNoIR::exit() { // void FaceTrackNoIR::createIconGroupBox() { -importGetFilterDialog getIT; +importGetFilterDialog getFilter; +importGetTrackerDialog getTracker; QLibrary *filterLib; QString *filterName; QIcon *filterIcon; @@ -1032,14 +1096,6 @@ QIcon *filterIcon; ui.iconcomboBox->addItem(QIcon(":/images/FS9.ico"), tr("FS2002/FS2004")); ui.iconcomboBox->addItem(QIcon(":/images/Mouse.ico"), tr("Mouse look")); - ui.iconcomboTrackerSource->addItem(QIcon(":/images/SeeingMachines.ico"), tr("Face API")); - ui.iconcomboTrackerSource->addItem(QIcon(":/images/FaceTrackNoIR.ico"), tr("FTNoir server")); - -# ifdef USE_VISAGE - ui.iconcomboTrackerSource->addItem(QIcon(":/images/Visage.ico"), tr("Visage Tracker")); -# endif - - // // Get a List of all the Filter-DLL-files in the Program-folder. // @@ -1070,13 +1126,13 @@ QIcon *filterIcon; filterName = new QString(""); filterIcon = new QIcon(); - getIT = (importGetFilterDialog) filterLib->resolve("GetFilterDialog"); - if (getIT) { - IFilterDialogPtr ptrXyz(getIT()); + getFilter = (importGetFilterDialog) filterLib->resolve("GetFilterDialog"); + if (getFilter) { + IFilterDialogPtr ptrXyz(getFilter()); if (ptrXyz) { pFilterDialog = ptrXyz; - pFilterDialog->getFilterFullName( filterName ); + pFilterDialog->getFullName( filterName ); pFilterDialog->getIcon( filterIcon ); qDebug() << "FaceTrackNoIR::showServerControls GetFilterDialog Function Resolved!"; } @@ -1085,13 +1141,65 @@ QIcon *filterIcon; } } else { - QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton); + QMessageBox::warning(0,"FaceTrackNoIR Error", "Filter-DLL not loaded, please check if the DLL is version 1.7",QMessageBox::Ok,QMessageBox::NoButton); } ui.iconcomboFilter->addItem(*filterIcon, *filterName ); } connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int))); + // + // Get a List of all the Filter-DLL-files in the Program-folder. + // + filters.clear(); + filters << "FTNoIR_Tracker_*.dll"; + trackerFileList.clear(); + trackerFileList = settingsDir.entryList( filters, QDir::Files, QDir::Name ); + + // + // Add strings to the Listbox. + // + disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int))); + ui.iconcomboTrackerSource->clear(); + for ( int i = 0; i < trackerFileList.size(); i++) { + + qDebug() << "createIconGroupBox says: TrackerName = " << trackerFileList.at(i); + + // + // Delete the existing QDialog + // + if (pTrackerDialog) { + pTrackerDialog.Release(); + } + + // Show the appropriate Protocol-server Settings + filterLib = new QLibrary(trackerFileList.at(i)); + filterName = new QString(""); + filterIcon = new QIcon(); + + getTracker = (importGetTrackerDialog) filterLib->resolve("GetTrackerDialog"); + if (getTracker) { + ITrackerDialogPtr ptrXyz(getTracker()); + if (ptrXyz) + { + pTrackerDialog = ptrXyz; + pTrackerDialog->getFullName( filterName ); + pTrackerDialog->getIcon( filterIcon ); + qDebug() << "FaceTrackNoIR::showServerControls GetTrackerDialog Function Resolved!"; + } + else { + qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!"; + } + } + else { + QMessageBox::warning(0,"FaceTrackNoIR Error", "Facetracker-DLL not loaded, please check if the DLL is version 1.7",QMessageBox::Ok,QMessageBox::NoButton); + } + + ui.iconcomboTrackerSource->addItem(*filterIcon, *filterName ); + } + connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int))); + + } // @@ -1195,18 +1303,18 @@ void FaceTrackNoIR::iconActivated(QSystemTrayIcon::ActivationReason reason) void FaceTrackNoIR::trackingSourceSelected(int index) { settingsDirty = true; - switch ( index ) { - case FT_SM_FACEAPI: // Face API - ui.btnShowEngineControls->setEnabled ( false ); - break; - case FT_FTNOIR: // FTNoir server - ui.video_frame->hide(); - ui.headPoseWidget->show(); - ui.btnShowEngineControls->setEnabled ( true ); - break; - default: - break; - } + //switch ( index ) { + // case FT_SM_FACEAPI: // Face API + // ui.btnShowEngineControls->setEnabled ( false ); + // break; + // case FT_FTNOIR: // FTNoir server + // ui.video_frame->hide(); + // ui.headPoseWidget->show(); + ui.btnShowEngineControls->setEnabled ( true ); + // break; + // default: + // break; + //} } // @@ -1233,17 +1341,12 @@ void FaceTrackNoIR::profileSelected(int index) // void FaceTrackNoIR::filterSelected(int index) { - QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER) + settingsDirty = true; - QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) + //QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER) - // - // Save the name of the filter in the INI-file. Do this immediately, so the Tracker can just read it from the INI-file to load the filter. - // - iniFile.beginGroup ( "Filter" ); - iniFile.setValue ( "Selection", filterFileList.at(ui.iconcomboFilter->currentIndex()) ); - iniFile.endGroup (); + //QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); + //QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) ui.btnShowFilterControls->setEnabled ( true ); } diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h index f39062bc..1bc2d7b7 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.h +++ b/FaceTrackNoIR/FaceTrackNoIR.h @@ -78,6 +78,8 @@ public: void updateSettings(); // Update the settings (let Tracker read INI-file). QFrame *getVideoWidget(); // Get a pointer to the video-widget, to use in the DLL + QString getCurrentFilterName(); // Get the name of the selected filter + QString getCurrentTrackerName(); // Get the name of the selected face-tracker private: Ui::FaceTrackNoIRClass ui; @@ -86,6 +88,7 @@ private: QTimer *timUpdateHeadPose; // Timer to display headpose QStringList iniFileList; // List of INI-files, that are present in the Settings folder QStringList filterFileList; // List of Filter-DLL-files, that are present in the program-folder + QStringList trackerFileList; // List of Tracker-DLL-files, that are present in the program-folder ITrackerDialogPtr pTrackerDialog; // Pointer to Tracker dialog instance (in DLL) IProtocolDialogPtr pProtocolDialog; // Pointer to Protocol dialog instance (in DLL) diff --git a/FaceTrackNoIR/FaceTrackNoIR.qrc b/FaceTrackNoIR/FaceTrackNoIR.qrc index b24c4e2f..bc1b34f4 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.qrc +++ b/FaceTrackNoIR/FaceTrackNoIR.qrc @@ -10,7 +10,6 @@ images/330px-6DOF_en.png images/Freetrack.ico images/FaceTrackNoIR.ico - images/SeeingMachines.ico images/Mouse.ico images/FS9.ico images/FSX.ico diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui index 7fa1f42c..3e367e4e 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.ui +++ b/FaceTrackNoIR/FaceTrackNoIR.ui @@ -1786,12 +1786,12 @@ background:none; -1 - 3 + 5 - false + true @@ -1855,7 +1855,7 @@ background:none; - + 190 @@ -1872,9 +1872,9 @@ background:none; - Game protocol + Filter - + 10 @@ -1893,7 +1893,7 @@ background:none; 7 - + true @@ -1918,7 +1918,7 @@ background:none; - + 190 @@ -1935,9 +1935,9 @@ background:none; - Filter + Game protocol - + 10 @@ -1956,7 +1956,7 @@ background:none; 7 - + true diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index cb3a5b79..e529b243 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -3,10 +3,10 @@ * gamers from Holland, who don't like to pay much for * * head-tracking. * * * -* Copyright (C) 2010 Wim Vriend (Developing) * +* Copyright (C) 2012 Wim Vriend (Developing) * * Ron Hendriks (Researching and Testing) * * * -* Homepage * +* Homepage: http://facetracknoir.sourceforge.net/home/default.htm * * * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -23,6 +23,10 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120317 - WVR: The Filter and Tracker-code was moved to separate DLL's. The calling-method + was changed accordingly. + The face-tracker member-functions NotifyZeroed and refreshVideo were added, as + requested by Stanislaw. 20110411 - WVR: Finished moving all Protocols to separate C++ projects. Every protocol now has it's own Class, that's inside it's own DLL. This reduces the size of the program, makes it more structured and enables a more sophisticated installer. @@ -120,7 +124,7 @@ QFrame *video_frame; // Remember the selected client, from the ListBox // If the Tracker runs, this can NOT be changed... selectedClient = (FTNoIR_Client) clientID; - selectedTracker = (FTNoIR_Face_Tracker) facetrackerID; +// selectedTracker = (FTNoIR_Face_Tracker) facetrackerID; // Create events m_StopThread = CreateEvent(0, TRUE, FALSE, 0); @@ -145,29 +149,30 @@ QFrame *video_frame; video_frame = mainApp->getVideoWidget(); qDebug() << "Tracker::setup VideoFrame = " << video_frame; - // - // Select the Tracker-engine DLL - // - switch (selectedTracker) { - case FT_SM_FACEAPI: - libName = QString("FTNoIR_Tracker_SM.dll"); - break; + //// + //// Select the Tracker-engine DLL + //// + //switch (selectedTracker) { + // case FT_SM_FACEAPI: + // libName = QString("FTNoIR_Tracker_SM.dll"); + // break; - case FT_FTNOIR: - libName = QString("FTNoIR_Tracker_UDP.dll"); - break; + // case FT_FTNOIR: + // libName = QString("FTNoIR_Tracker_UDP.dll"); + // break; - case FT_VISAGE: - libName = QString("FTNoIR_Tracker_Visage.dll"); - break; + // case FT_VISAGE: + // libName = QString("FTNoIR_Tracker_Visage.dll"); + // break; - default: - break; - } + // default: + // break; + //} // // Load the Tracker-engine DLL, get the tracker-class from it and do stuff... // + libName = mainApp->getCurrentTrackerName(); if (!libName.isEmpty()) { trackerLib = new QLibrary(libName); getIT = (importGetTracker) trackerLib->resolve("GetTracker"); @@ -182,7 +187,7 @@ QFrame *video_frame; } } else { - QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton); + QMessageBox::warning(0,"FaceTrackNoIR Error", "Facetracker DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton); } } @@ -255,18 +260,8 @@ QFrame *video_frame; // // Load the DLL with the filter-logic and retrieve a pointer to the Filter-class. - // The name of the filter can be found in the INI-file... - libName.clear(); - QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER) - - QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); - QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) - - iniFile.beginGroup ( "Filter" ); - libName = iniFile.value ( "Selection", "FTNoIR_Filter_EWMA2.dll" ).toString(); - qDebug() << "Tracker::Tracker() says: selectedFilterName = " << libName; - iniFile.endGroup (); - + // + libName = mainApp->getCurrentFilterName(); filterLib = new QLibrary(libName); getFilter = (importGetFilter) filterLib->resolve("GetFilter"); @@ -380,7 +375,7 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); // if (pFilter) { QString filterName; - pFilter->getFilterFullName(&filterName); + pFilter->getFullName(&filterName); qDebug() << "Tracker::run() FilterName = " << filterName; } @@ -553,9 +548,12 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); // // If Set Game Zero is pressed, copy the current values to the offsets. + // Change requested by Stanislaw // if (Tracker::confid && Tracker::do_game_zero) { - gamezero_camera.position = gameoutput_camera.position; + if (!pTracker->notifyZeroed()) + gamezero_camera.position = gameoutput_camera.position; +// gamezero_camera.position = gameoutput_camera.position; Tracker::do_game_zero = false; } diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index b9a39eba..fa0c5111 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -76,11 +76,11 @@ enum FTNoIR_Client { MOUSE = 7 }; -enum FTNoIR_Face_Tracker { - FT_SM_FACEAPI = 0, - FT_FTNOIR = 1, - FT_VISAGE = 2 -}; +//enum FTNoIR_Face_Tracker { +// FT_SM_FACEAPI = 0, +// FT_FTNOIR = 1, +// FT_VISAGE = 2 +//}; enum FTNoIR_Tracker_Status { TRACKER_OFF = 0, @@ -148,7 +148,7 @@ private: HANDLE m_WaitThread; FTNoIR_Client selectedClient; - FTNoIR_Face_Tracker selectedTracker; +// FTNoIR_Face_Tracker selectedTracker; static T6DOF current_camera; // Used for filtering static T6DOF target_camera; @@ -231,6 +231,11 @@ public: static void getHeadPose(THeadPoseData *data); // Return the current headpose data static void getOutputHeadPose(THeadPoseData *data); // Return the current (processed) headpose data static IFilterPtr getFilterPtr() { return pFilter; } + static void doRefreshVideo() { // Call the face-tracker-function RefreshVideo + if (pTracker) { + pTracker->refreshVideo(); + } + }; static float getSmoothFromList ( QList *rawList ); static float getDegreesFromRads ( float rads ) { return (rads * 57.295781f); } -- cgit v1.2.3