kinect-viewer / KFKinect.h

 * Copyright 2010 Cliff L. Biffle.  All Rights Reserved.
 * Use of this source code is governed by the Apache License 2.0,
 * which can be found in the LICENSE file.

#import <Cocoa/Cocoa.h>
#import "libfreenect.h"
#import "types.h"

@protocol KFKinectDepthDelegate;
@protocol KFKinectColorDelegate;

@interface KFKinect : NSObject {
  freenect_context *_context;
  freenect_device *_device;
  BOOL _running;
  id<KFKinectDepthDelegate> depthDelegate;
  id<KFKinectColorDelegate> colorDelegate;

- initWithDepthDelegate: (id<KFKinectDepthDelegate>)depthDelegate
          colorDelegate: (id<KFKinectColorDelegate>)colorDelegate;
- (void)open;
- (void)close;


@protocol KFKinectDepthDelegate
- (void)depthFieldUpdated: (const depth_t *)buffer from: (KFKinect *)kinect;

@protocol KFKinectColorDelegate
- (void)colorFieldUpdated: (const colors_t *)bytes from: (KFKinect *)kinect;