MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / PoseDetectedCallback

Method PoseDetectedCallback

Samples/NiUserSelection/ExitPoseDetector.cpp:114–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114void XN_CALLBACK_TYPE ExitPoseDetector::PoseDetectedCallback(xn::PoseDetectionCapability& /*capability*/, const XnChar* strPose, XnUserID nUserId, void* pCookie)
115{
116 if(xnOSStrCmp(strPose,CROSS_HANDS_POSE)!=0)
117 {
118 return; // irrelevant pose
119 }
120 ExitPoseDetector *detector=(ExitPoseDetector *)pCookie;
121 XnUInt64 tmpTime;
122 if(detector->m_userExitPoseTimes.Get(nUserId,tmpTime)!=XN_STATUS_OK || tmpTime==0)
123 {
124 tmpTime=detector->m_userGenerator.GetTimestamp();
125 detector->m_userExitPoseTimes.Set(nUserId,tmpTime);
126 }
127}
128
129void XN_CALLBACK_TYPE ExitPoseDetector::OutOfPoseDetectedCallback(xn::PoseDetectionCapability& /*capability*/, const XnChar* strPose, XnUserID nUserId, void* pCookie)
130{

Callers

nothing calls this directly

Calls 4

xnOSStrCmpFunction · 0.50
GetMethod · 0.45
GetTimestampMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected