32 #ifndef __KINECTDEVICE_H__    33 #define __KINECTDEVICE_H__    35 #include "lib/common.h"    36 #include "core/Thread.h"    37 #include "objects/KinectUser.h"    40                                                                         public openni::OpenNI::DeviceDisconnectedListener,
    41                                                                         public openni::OpenNI::DeviceStateChangedListener
    49     openni::Device& GetDevice();
    55     void DestroyKinectUser(
KinectUser* existingKinectUser);
    58     int GetExistingAvailableId();
    59     void AddExistingId(
unsigned int id);
    60     void RemoveExistingId(
unsigned int id);
    64     Depth* GetDepthGenerator();
    65     Image* GetImageGenerator();
    66     User* GetUserGenerator();
    68     void GetGeneratorsSize(
int &width, 
int &height);
    69     void SetGeneratorsSize(
int width, 
int height);
    71     void SetSkeletonSmoothing(
float value);
    72     float GetSkeletonSmoothing();
    74     void SetMirrorMode(
bool state);
    77     void SetDistCutoff(
int dist);
    79     void SetAngCutoff(
float ang);
    82     void GetHandsPixels(PtrObjBitmap Bcolor, PtrObjBitmap Balpha);
    83     void GetDepthBuffer(PtrObjBitmap Bcolor);
    84     void GetImageBuffer(PtrObjBitmap Bcolor);
    85     void GetImageGreyBuffer(PtrObjBitmap Bcolor);
    86     void GetValidUserPixels(PtrObjBitmap Bcolor, PtrObjBitmap Balpha);
    87     void GetValidUserPixelsRGB(PtrObjBitmap Bcolor, PtrObjBitmap Balpha);
    89     bool GetSklMutexLock();
    90     void ReleaseSklMutex();
    95     KinectUserList listOfUsers;
    96     boost::mutex uListMutex;
    97     boost::mutex updateMutex;
    98     boost::mutex updateHandsMutex;
    99     boost::mutex uFingersUpdate;
   100     boost::mutex uGeneratorsCreate;
   101     boost::mutex uSklMutex;
   102     OpenNIUserList listOfAvalaibleUsers;
   112     openni::Device NiDevice;
   117     Depth* mDepthGenerator;
   118     Image* mImageGenerator;
   119     User* mUserGenerator;
   123     bool CreateAndStartGenerators();
   124     void StopAndDestroyGenerators();
   128     virtual void onDeviceStateChanged(
const openni::DeviceInfo* pInfo, openni::DeviceState state);
   129           virtual void onDeviceConnected(
const openni::DeviceInfo* pInfo);
   130           virtual void onDeviceDisconnected(
const openni::DeviceInfo* pInfo);
 
User generator handling. . 
 
Image generator handling. . 
 
Depth generator handling. . 
 
Kinect device handling. .