From 88f3a9e7f6bc7d54fa98a63166eaf55e4762224e Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Fri, 21 Aug 2015 20:22:52 +0200 Subject: added a tracker that uses the RealSense SDK --- ftnoir_tracker_rs/ftnoir_tracker_rs.h | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ftnoir_tracker_rs/ftnoir_tracker_rs.h (limited to 'ftnoir_tracker_rs/ftnoir_tracker_rs.h') 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 + * 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 +#include +#include +#include + +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(); +}; -- cgit v1.2.3