-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenni_callbacks.h
More file actions
executable file
·33 lines (27 loc) · 1.25 KB
/
openni_callbacks.h
File metadata and controls
executable file
·33 lines (27 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef OPENNICALLBACKS
#define OPENNICALLBACKS
#include <XnCppWrapper.h>
extern xn::Context g_Context;
extern xn::ScriptNode g_scriptNode;
extern xn::DepthGenerator g_DepthGenerator;
extern xn::UserGenerator g_UserGenerator;
extern XnBool g_bNeedPose;
extern XnChar g_strPose[20];
void XN_CALLBACK_TYPE User_NewUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/);
void XN_CALLBACK_TYPE User_LostUser(xn::UserGenerator& /*generator*/, XnUserID nId, void* /*pCookie*/);
void XN_CALLBACK_TYPE UserPose_PoseDetected(xn::PoseDetectionCapability& /*capability*/, const XnChar* strPose, XnUserID nId, void* /*pCookie*/);
void XN_CALLBACK_TYPE UserCalibration_CalibrationStart(xn::SkeletonCapability& /*capability*/, XnUserID nId, void* /*pCookie*/);
void XN_CALLBACK_TYPE UserCalibration_CalibrationComplete(xn::SkeletonCapability& /*capability*/, XnUserID nId, XnCalibrationStatus eStatus, void* /*pCookie*/);
inline XnBool fileExists(const char *fn)
{
XnBool exists;
xnOSDoesFileExist(fn, &exists);
return exists;
}
#define CHECK_RC(nRetVal, what) \
if (nRetVal != XN_STATUS_OK) \
{ \
printf("%s failed: %s\n", what, xnGetStatusString(nRetVal)); \
return nRetVal; \
}
#endif