Debian Codegraph @

interfaces/extkinectmanager.h

raw symbols SCIP
1 /*
2 IanniX — a graphical real-time open-source sequencer for digital art
3 Copyright (C) 2010-2012 — IanniX Association
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef KINECT_H
20 #define KINECT_H
21
22 #include <QObject>
23 #include <QPixmap>
24 #include <QLabel>
25 #include <QKeyEvent>
26 #include <QGLWidget>
27 #include <QPainter>
28 #include <qmath.h>
29 #include "qkinect/QKinect.h"
30
31 #define KINECT_PRECISION 1280
32
33 class ExtKinectManager : public QLabel {
34 Q_OBJECT
35 public:
36 explicit ExtKinectManager(QWidget *parent = 0);
37
38 public:
39 void paint();
40 qreal getDepthAt(qreal x, qreal y) const;
41
42 private:
43 quint16 frameCounter;
44 int timerCounter, timerFrame;
45 qreal threshMin, threshMax;
46 QKinect *kinect;
47 QLabel *labelCam;
48 std::vector<uint8_t> bufferCam, bufferDepth;
49 std::vector<uint16_t> bufferDepth16;
50 qreal bufferFinal[FREENECT_FRAME_PIX], bufferFinalOld[FREENECT_FRAME_PIX];
51 qreal rawToMeters[2048];
52 quint8 colorK[KINECT_PRECISION+1], colorR[KINECT_PRECISION+1], colorG[KINECT_PRECISION+1], colorB[KINECT_PRECISION+1];
53
54 private:
55 void timerEvent(QTimerEvent *);
56 void keyPressEvent(QKeyEvent *);
57
58 signals:
59
60 public slots:
61
62 };
63
64 #endif // KINECT_H