summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_rs/ftnoir_tracker_rs.h
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_rs/ftnoir_tracker_rs.h')
-rw-r--r--ftnoir_tracker_rs/ftnoir_tracker_rs.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/ftnoir_tracker_rs/ftnoir_tracker_rs.h b/ftnoir_tracker_rs/ftnoir_tracker_rs.h
new file mode 100644
index 00000000..7cda7370
--- /dev/null
+++ b/ftnoir_tracker_rs/ftnoir_tracker_rs.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Intel Corporation
+ * Author: Xavier Hallade <xavier.hallade@intel.com>
+ * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#pragma once
+
+#include "ui_ftnoir_tracker_rs_controls.h"
+#include "opentrack/plugin-api.hpp"
+#include <QProcess>
+#include <QMutex>
+#include <QThread>
+#include <QUdpSocket>
+
+class RSTracker : protected QObject, public ITracker
+{
+ Q_OBJECT
+
+public:
+ RSTracker();
+ ~RSTracker();
+ void start_tracker(QFrame *) override;
+ void data(double *data) override;
+
+private:
+ QMutex mMutex;
+ QThread mThread;
+ QProcess mRealSenseImplProcess;
+ QUdpSocket mSocket;
+ double mPose[6];
+
+private slots:
+ void rsImplProcessError(QProcess::ProcessError);
+ void rsImplProcessFinished(int);
+ void readPendingUdpPoseData();
+
+};
+
+class RSTrackerMetaData : public Metadata
+{
+public:
+ QString name();
+ QIcon icon();
+};