00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00035 #ifndef __USER_H__
00036 #define __USER_H__
00037
00038 #include "../lib/common.h"
00039 #include "../core/GenericGenerator.h"
00040
00041 namespace NIDevice
00042 {
00043 namespace Generator
00044 {
00045 class User : public NIDevice::Core::GenericGenerator<xn::UserGenerator, XN_NODE_TYPE_USER>
00046 {
00047 public:
00048 User(NIDevice::Objects::KinectDevice* pDevice);
00049 ~User();
00050
00051
00052 const unsigned short* GetUserPixels();
00053
00054 void GetImageSize(int &w, int &h);
00055
00056 void registerCallbacks();
00057 void unRegisterCallbacks();
00058 void requestInitialPos(NIDevice::Objects::KinectUser* user);
00059 void stopTracking(NIDevice::Objects::KinectUser* user);
00060
00064 NIDEVICE_GET_OBJECT_TYPE_AS_STRING(User);
00065 NIDEVICE_GET_ERROR_MESSAGE(nRetVal,description);
00066
00067 private:
00068 xn::SceneMetaData g_sceneMD;
00069 std::string description;
00070 XnCallbackHandle hUserCallbacks;
00071 XnCallbackHandle m_hCalibrationCallbacks;
00072 XnCallbackHandle m_hPoseCallbacks;
00073 XnStatus nRetVal;
00074 protected:
00075 User();
00076
00077 };
00078 }
00079 }
00080
00081
00082 #endif