forked from GerhardR/kfusion
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinterface_openni2.hpp
More file actions
46 lines (28 loc) · 783 Bytes
/
Copy pathinterface_openni2.hpp
File metadata and controls
46 lines (28 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef KFUSION_INTERFACE_OPENNI2
#define KFUSION_INTERFACE_OPENNI2
#include <openni2/OpenNI.h>
// #include <pthread.h>
#include "interface.h"
#include <thread>
class OpenNIDevice : public RGBD {
openni::Device device;
openni::VideoStream depth_stream;
openni::VideoStream color_stream;
bool gotDepth;
std::thread capture_thread;
bool die;
// RGBD interface
public:
OpenNIDevice();
int open();
bool available() const { return true; }
int update();
void close();
bool stopped() const { return this->die; }
void setDirty(bool isDirty) { gotDepth = isDirty; }
bool dirty() const { return gotDepth; }
void setDepthBuffer();
openni::VideoStream& getDepthStream();
virtual ~OpenNIDevice() {}
};
#endif