/// @brief out of pose detection callback /// @param sender who called the callback /// @param e the arguments of the event. private void OutOfPoseDetectedCallback(object sender, OutOfPoseEventArgs e) { m_contextManager.Log("found out of pose " + e.Pose + " for user=" + e.ID, NIEventLogger.Categories.Callbacks, NIEventLogger.Sources.Skeleton, NIEventLogger.VerboseLevel.Verbose); if (e.Pose.CompareTo(m_PoseToSelect)!=0 && e.Pose.CompareTo(m_PoseToUnselect)!=0) return; // irrelevant NIPlayerPoseCandidateObject poseUser = GetUserFromUserID(e.ID) as NIPlayerPoseCandidateObject; if (poseUser == null) return; // irrelevant user if (e.Pose.CompareTo(m_PoseToSelect)==0) { OutOfPoseSelectionPoseForUser(poseUser); } if (e.Pose.CompareTo(m_PoseToUnselect)==0) // we do NOT put an else because the select and unselect might be the same pose { OutOfPoseUnselectionPoseForUser(poseUser); } }
// ポーズ検出終了 void poseDetect_OutOfPose( object sender, OutOfPoseEventArgs e ) { message = "ポーズ消失:" + e.Pose + " ユーザー:" + e.ID; }