/** Internal callback implementations **/ void XN_CALLBACK_TYPE GestureRecognized_callback(xn::GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pIDPosition, const XnPoint3D *pEndPosition, void *pCookie) { std::string gesture (strGesture); BP::object& func = ((BP::object*)pCookie)[0]; //Call the function func(generator, gesture, convertVec3D(*pIDPosition), convertVec3D(*pEndPosition)); }
void XN_CALLBACK_TYPE GestureProgress_callback(xn::GestureGenerator &generator, const XnChar *strGesture, const XnPoint3D *pPosition, XnFloat fProgress, void *pCookie) { std::string gesture (strGesture); BP::object& func = ((BP::object*)pCookie)[1]; //Call the function func(generator, gesture, convertVec3D(*pPosition), fProgress); }
void XN_CALLBACK_TYPE Update_callback(xn::HandsGenerator& src, XnUserID user, const XnPoint3D *pPosition, XnFloat fTime, void* cookie) { BP::object& func = ((BP::object*)cookie)[1]; //Call the function func(src, user, convertVec3D(*pPosition), fTime); }