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

Method StartTracking

Samples/NiUserSelection/SinglePoseUserSelector.cpp:42–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42XnStatus SinglePoseUserSelector::StartTracking(XnUserID nUserId)
43{
44 XnStatus nRetVal = PoseUserSelector::StartTracking(nUserId);
45 if(nRetVal != XN_STATUS_OK)
46 {
47 return nRetVal;
48 }
49
50 // stop tracking for everyone other than the current one.
51 for(UserStateHash::Iterator iter = m_hUsersState.Begin(); iter != m_hUsersState.End(); ++iter)
52 {
53 if(iter->Key() == nUserId)
54 {
55 continue; // this is the new one, not interesting...
56 }
57 if(iter->Value()->m_eState!=XN_SELECTION_FAILED)
58 {
59 UpdateUserSelectionState(iter->Key(),XN_SELECTION_UNSELECTED,0);
60 }
61 m_pTrackingInitializer->AbortTracking(iter->Key()); // stop tracking
62 }
63 return XN_STATUS_OK;
64}

Callers

nothing calls this directly

Calls 5

StartTrackingFunction · 0.85
AbortTrackingMethod · 0.80
BeginMethod · 0.45
EndMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected