4#ifdef ENABLE_KINECT_SDK
16#pragma comment(lib, "Kinect10.lib")
28#define KINECT_JOINT_NUM NUI_SKELETON_POSITION_COUNT
29#define KINECT_USERS_NUM 7
33#define KINECT_SKEL_PROFILE_ALL 2
34#define KINECT_SKEL_PROFILE_UPPER 3
43class CKinectImage :
public EventHandler
47 virtual ~CKinectImage(
void) { free();}
67class CKinectDepth :
public EventHandler
71 virtual ~CKinectDepth(
void) { free();}
89 int userLabel[KINECT_USERS_NUM];
95 void delete_map(
void);
96 void correct_map(
int cx,
int cy);
98 int get_user_index(
int i,
int j);
99 uWord get_depth(
int i,
int j);
101 void get_users(
void);
102 void get_image_coord(
int* i,
int* j);
110class CKinectSkeleton :
public EventHandler
113 CKinectSkeleton(
void);
114 virtual ~CKinectSkeleton(
void) { free();}
118 NUI_SKELETON_DATA m_data;
134 virtual ~CKinectDevice(
void);
139 CKinectSkeleton* skeleton;
140 CKinectFaceTracker* face;
142 NUI_IMAGE_FRAME imageFrame;
143 NUI_IMAGE_FRAME depthFrame;
144 NUI_SKELETON_FRAME skltnFrame;
155 NUI_TRANSFORM_SMOOTH_PARAMETERS* smoothParam;
158 Vector4 jointPosData[KINECT_JOINT_NUM];
161 BOOL init(DWORD mode, BOOL use_image);
163 void clear_JointsData(
void);
165 BOOL create_Context(DWORD mode,
int index=0);
167 BOOL create_Image(
void);
168 BOOL create_Depth(
void);
169 BOOL create_Skeleton(
int profile);
170 BOOL create_Face(
void);
172 void delete_Context(
void);
173 void delete_Image(
void);
174 void delete_Depth(
void);
175 void delete_Skeleton(
void);
176 void delete_Face(
void);
178 BOOL wait_Image(DWORD msec=INFINITE);
179 BOOL wait_Depth(DWORD msec=INFINITE);
180 int wait_Skeleton(
int tuser,
int duser, DWORD msec=INFINITE);
182 BOOL start_Detection(
int profile);
183 BOOL stop_Detection(
void);
185 int get_TrackingUser(
int duser);