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 #include "Hands.h"
00036
00037 #include "../core/Exception.h"
00038 #include "../DeviceManager.h"
00039
00040
00041 void XN_CALLBACK_TYPE HandCreated(xn::HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
00042 {
00043 }
00044
00045 void XN_CALLBACK_TYPE HandUpdated(xn::HandsGenerator &generator, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void *pCookie)
00046 {
00047 }
00048
00049 void XN_CALLBACK_TYPE HandDestroyed(xn::HandsGenerator &generator, XnUserID user, XnFloat fTime, void *pCookie)
00050 {
00051 }
00052
00053
00054 namespace NIDevice
00055 {
00056 namespace Generator
00057 {
00058 Hands::Hands(NIDevice::Objects::KinectDevice* pDevice) : NIDevice::Core::GenericGenerator<xn::HandsGenerator, XN_NODE_TYPE_HANDS>(pDevice)
00059 {
00060 }
00061
00062 Hands::Hands() : NIDevice::Core::GenericGenerator<xn::HandsGenerator, XN_NODE_TYPE_HANDS>(0)
00063 {
00064 }
00065
00066 Hands::~Hands()
00067 {
00068 }
00069
00070 void Hands::RegisterCallbacks()
00071 {
00072 nRetVal = GetGenerator().RegisterHandCallbacks(HandCreated, HandUpdated, HandDestroyed, NULL, hHandsCallbacks);
00073 }
00074
00075 void Hands::UnregisterCallbacks()
00076 {
00077 if (hHandsCallbacks)
00078 {
00079 GetGenerator().UnregisterHandCallbacks(hHandsCallbacks);
00080 hHandsCallbacks = 0;
00081 }
00082 }
00083 }
00084 }
00085