| 105 | } |
| 106 | |
| 107 | XnStatus 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 | |
| 127 | XnStatus PoseUserSelector::AddNewUser(XnUserID nUserId) |
| 128 | { |
no test coverage detected