summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp32
-rw-r--r--FaceTrackNoIR/tracker.h7
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();