-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathKinectPatch.h
36 lines (28 loc) · 970 Bytes
/
KinectPatch.h
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
#include <libusb.h>
#include "libfreenect.h"
#import <pthread.h>
@interface KinectPatch : QCPatch
{
QCIndexPort *inputDeviceID;
QCBooleanPort *outputConnected;
QCImagePort *outputColorImage;
QCImagePort *outputDepthImage;
QCNumberPort *outputAccelerationX;
QCNumberPort *outputAccelerationY;
QCNumberPort *outputAccelerationZ;
NSThread *usbHandlerThread;
pthread_mutex_t usbHandlerUpdatingLock;
// set in usbHandlerThread, use usbHandlerUpdatingLock
bool connected;
QCImage *colorImage;
QCImage *depthImage;
double ax,ay,az;
}
+(BOOL)allowsSubpatchesWithIdentifier:(id)identifier;
+(QCPatchExecutionMode)executionModeWithIdentifier:(id)identifier;
-(id)initWithIdentifier:(id)identifier;
-(void)disable:(QCOpenGLContext*)context;
-(BOOL)execute:(QCOpenGLContext*)context time:(double)time arguments:(NSDictionary*)arguments;
- (void)updateDepthImageWithBuffer:(freenect_depth *)depth;
- (void)updateColorImageWithBuffer:(freenect_pixel *)rgb;
@end