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

Method StartTracking

Samples/NiUserSelection/PoseUserSelector.cpp:107–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107XnStatus PoseUserSelector::StartTracking(XnUserID nUserId)
108{
109 UserSelectionState* pState;
110 XnStatus nRetVal=m_hUsersState.Get(nUserId, pState);
111 if(nRetVal != XN_STATUS_OK)
112 {
113 return nRetVal; // we don't have such user ready
114 }
115 if(pState->m_eState != XN_SELECTION_UNSELECTED)
116 {
117 return XN_STATUS_ERROR; // the user is in the wrong state.
118 }
119 nRetVal=UpdateUserSelectionState(nUserId, XN_SELECTION_SELECTED, 0);
120 if(nRetVal!=XN_STATUS_OK)
121 {
122 return nRetVal; // we can't continue because we can't update the state!
123 }
124 return m_pTrackingInitializer->StartTracking(nUserId,FALSE);
125}
126
127XnStatus PoseUserSelector::AddNewUser(XnUserID nUserId)
128{

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected