diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2011-01-21 16:26:41 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2011-01-21 16:26:41 +0000 |
commit | edd74a92a7d6e3c11d2409ba34085073185af43f (patch) | |
tree | a68aea51bc62efba9c9db9d047ce58e40182eaa9 /FaceTrackNoIR/tracker.cpp | |
parent | 2a3ec553d3737f2d94c32c3372ebac5333819ddd (diff) |
Starting work on Tracker in DLL
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@40 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.cpp')
-rw-r--r-- | FaceTrackNoIR/tracker.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index d1ebe6ea..974b1251 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -82,6 +82,8 @@ TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking /** constructor **/
Tracker::Tracker( int clientID, int facetrackerID ) {
+importGetTracker getIT;
+QLibrary *trackerLib;
// Remember the selected client, from the ListBox
// If the Tracker runs, this can NOT be changed...
@@ -117,7 +119,23 @@ Tracker::Tracker( int clientID, int facetrackerID ) { QMessageBox::warning(0,"faceAPI Error",e.what(),QMessageBox::Ok,QMessageBox::NoButton);
}
break;
+
case FT_FTNOIR:
+ trackerLib = new QLibrary("FTNoIR_Tracker_UDP.dll");
+
+ getIT = (importGetTracker) trackerLib->resolve("GetTracker");
+
+ if (getIT) {
+ ITrackerPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pTracker = ptrXyz;
+ qDebug() << "Tracker::setup Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
break;
default:
@@ -224,6 +242,11 @@ void Tracker::setup(QWidget *head, FaceTrackNoIR *parent) { smLoggingSetFileOutputEnable( false );
}
+ if (selectedTracker == FT_FTNOIR) {
+ int fooResult = pTracker->Foo(42);
+ qDebug() << "Tracker::setup Foo gives: " << fooResult;
+ }
+
// set up the line edits for calling
headXLine = headPoseWidget->findChild<QLineEdit *>("headXLine");
headYLine = headPoseWidget->findChild<QLineEdit *>("headYLine");
|