diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2012-09-14 11:03:31 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2012-09-14 11:03:31 +0000 |
commit | c3cb475db1012a7e652ee8e654970eba97f6e64e (patch) | |
tree | e7d4e237651c29f55a298050cb7415fb81d4c099 | |
parent | 541fb8cb1744c9c3ef7524b2d9491ed08032b36e (diff) |
registerTracker and unRegisterTracker methods added to TrackerControls (4 Patrick).
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@132 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 32 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.h | 7 |
2 files changed, 22 insertions, 17 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index ae05a9b6..65793ba7 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -659,24 +659,19 @@ void FaceTrackNoIR::startTracker( ) { tracker->start( QThread::TimeCriticalPriority );
+ //
+ // Register the Tracker instance with the Tracker Dialog (if open)
+ //
+ if (pTrackerDialog) {
+ pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
+ }
+
ui.headPoseWidget->show();
//
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;
- //}
-
// Enable/disable Protocol-server Settings
ui.iconcomboTrackerSource->setEnabled ( false );
ui.iconcomboProtocol->setEnabled ( false );
@@ -756,6 +751,13 @@ void FaceTrackNoIR::stopTracker( ) { ui.txtAxisReverse->setVisible(false);
//
+ // UnRegister the Tracker instance with the Tracker Dialog (if open)
+ //
+ if (pTrackerDialog) {
+ pTrackerDialog->unRegisterTracker();
+ }
+
+ //
// Delete the tracker (after stopping things and all).
//
if ( tracker ) {
@@ -939,7 +941,7 @@ QString libName; getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
- qDebug() << "FaceTrackNoIR::showEngineControls resolved?." << getIT;
+ qDebug() << "FaceTrackNoIR::showEngineControls resolved." << getIT;
if (getIT) {
ITrackerDialog *ptrXyz(getIT());
@@ -948,6 +950,10 @@ QString libName; pTrackerDialog = ptrXyz;
pTrackerDialog->Initialize( this );
qDebug() << "FaceTrackNoIR::showEngineControls GetTrackerDialog Function Resolved!";
+ if (tracker) {
+ pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
+ qDebug() << "FaceTrackNoIR::showEngineControls RegisterTracker Function Executed";
+ }
}
}
else {
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index 721d150e..ce34f6d2 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -174,9 +174,6 @@ private: HANDLE m_StopThread;
HANDLE m_WaitThread;
-// FTNoIR_Client selectedClient;
-// FTNoIR_Face_Tracker selectedTracker;
-
static T6DOF current_camera; // Used for filtering
static T6DOF target_camera;
static T6DOF new_camera;
@@ -257,7 +254,9 @@ public: static void setUseFilter(bool set) { useFilter = set; }
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 IFilterPtr getFilterPtr() { return pFilter; } // Return the pointer for the active Filter
+ ITracker *getTrackerPtr() { return pTracker; } // Return the pointer for the active Tracker
+
void doRefreshVideo() { // Call the face-tracker-function RefreshVideo
if (pTracker) {
pTracker->refreshVideo();
|