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

Method GetExitPoseState

Samples/NiUserSelection/UserTracker.cpp:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282XnFloat UserTracker::GetExitPoseState(XnUserID nUserId)
283{
284 if(m_pExitPoseDetector==NULL)
285 {
286 return 0.0f; // no exit pose detector.
287 }
288 XnUInt64 tmpTime=m_pExitPoseDetector->GetExitPoseTimeStamp(nUserId);
289 if(tmpTime==0)
290 {
291 return 0.0f;
292 }
293 tmpTime=m_UserGenerator.GetTimestamp()-tmpTime;
294 if(tmpTime>=m_timeSpanForExitPose)
295 {
296 return 1.0f;
297 }
298 return ((XnFloat)tmpTime)/((XnFloat)m_timeSpanForExitPose);
299}
300
301
302XnStatus UserTracker::GetUserStringPos(XnUserID nUserId, XnPoint3D &com, char *strLabel, XnUInt32 maxStrLen)

Callers 2

DrawLabelsMethod · 0.80
glutDisplayMethod · 0.80

Calls 2

GetExitPoseTimeStampMethod · 0.80
GetTimestampMethod · 0.45

Tested by

no test coverage detected