private void RaiseOneFingerPostureSucceed(PostureDetectedEventArgs e) { if (OneFingerPostureSucceed != null) OneFingerPostureSucceed(this, e); }
private void OnPostureThreeBegin(object sender, PostureDetectedEventArgs e) { m_FlagPosture[PostureType.Three] = true; m_PostureLostTimer.Start(); m_ThreePostureCounter = 0; RaiseThreeFingersPostureDetectionInProgress(e, 0); }
private void OnThreeFingersPostureDetectionInProgress(object sender, PostureDetectedEventArgs e) { RaiseThreePostureDetectionInProgress(e.Percentage); }
private void OnZeroFingerPostureDetectionInProgress(object sender, PostureDetectedEventArgs e) { RaiseZeroPostureDetectionInProgress(e.Percentage); }
private void OnPaperPostureSucceed(object sender, PostureDetectedEventArgs e) { RaisePaperPostureSucceed(); }
private void OnScissorsPostureDetectionInProgress(object sender, PostureDetectedEventArgs e) { RaiseScissorsPostureDetectionInProgress(e.Percentage); }
private void RaiseScissorsPostureSucceed(PostureDetectedEventArgs e) { if (ScissorsPostureSucceed != null) ScissorsPostureSucceed(this, e); }
private void OnFourFingersPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseFourPostureSucceed(); }
private void RaiseRockPostureSucceed(PostureDetectedEventArgs e) { if (RockPostureSucceed != null) RockPostureSucceed(this, e); }
private void RaiseScissorsPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage) { if (ScissorsPostureDetectionInProgress != null) ScissorsPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Scissors, percentage, e.Timestamp)); }
private void RaiseRockPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage) { if (RockPostureDetectionInProgress != null) RockPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Rock, percentage, e.Timestamp)); }
private void RaisePaperPostureSucceed(PostureDetectedEventArgs e) { if (PaperPostureSucceed != null) PaperPostureSucceed(this, e); }
private void RaisePaperPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage) { if (PaperPostureDetectionInProgress != null) PaperPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Paper, percentage, e.Timestamp)); }
private void OnPostureZeroBegin(object sender, PostureDetectedEventArgs e) { m_FlagPosture[PostureType.Zero] = true; m_PostureLostTimer.Start(); m_ZeroPostureCounter = 0; RaiseZeroFingerPostureDetectionInProgress(e, 0); }
private void RaiseThreeFingersPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage) { if (ThreeFingersPostureDetectionInProgress != null) ThreeFingersPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Three, percentage, e.Timestamp)); }
private void OnPostureZeroHeld(object sender, PostureDetectedEventArgs e) { m_ZeroPostureCounter++; if (m_ZeroPostureCounter < ParametersScheduler.Instance.NbEventsForZeroPostureToBeDetected) { RestartTimer_Scheduler(m_PostureLostTimer); RaiseZeroFingerPostureDetectionInProgress(e, (m_ZeroPostureCounter * 100) / ParametersScheduler.Instance.NbEventsForZeroPostureToBeDetected); } else if (m_ZeroPostureCounter == ParametersScheduler.Instance.NbEventsForZeroPostureToBeDetected) { m_PostureLostTimer.Stop(); m_FlagPosture[PostureType.Zero] = false; RaiseZeroFingerPostureDetectionInProgress(e, 100); RaiseZeroFingerPostureSucceed(e); } }
private void RaiseTwoFingersPostureSucceed(PostureDetectedEventArgs e) { if (TwoFingersPostureSucceed != null) TwoFingersPostureSucceed(this, e); }
private void OnOneFingerPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseOnePostureSucceed(); }
private void RaiseZeroFingerPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage) { if (ZeroFingerPostureDetectionInProgress != null) ZeroFingerPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Zero, percentage, e.Timestamp)); }
/*********************************************************************************/ /********** Callbacks for postures recognition ***********************************/ private void OnRockPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseRockPostureSucceed(); }
private void RaiseZeroFingerPostureSucceed(PostureDetectedEventArgs e) { if (ZeroFingerPostureSucceed != null) ZeroFingerPostureSucceed(this, e); }
private void OnScissorsPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseScissorsPostureSucceed(); }
/****************** Callbacks for postures begin***************************************************/ // Those callbacks first set the flag of the corresponding posture detection to true. // Then, they start de postureLostTimer which will consider the posture detection as lost if it elapses. // To finish they propagate the event "postureInProgress" with a percentage of 0. private void OnPostureRockBegin(object sender, PostureDetectedEventArgs e) { m_FlagPosture[PostureType.Rock] = true; m_PostureLostTimer.Start(); m_RockPostureCounter = 0; RaiseRockPostureDetectionInProgress(e, 0); }
private void OnTwoFingersPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseTwoPostureSucceed(); }
private void OnPostureScissorsBegin(object sender, PostureDetectedEventArgs e) { m_FlagPosture[PostureType.Scissors] = true; m_PostureLostTimer.Start(); m_ScissorsPostureCounter = 0; RaiseScissorsPostureDetectionInProgress(e, 0); }
private void OnZeroFingerPostureSucceed(object sender, PostureDetectedEventArgs e) { RaiseZeroPostureSucceed(); }
private void RaiseFourFingersPostureSucceed(PostureDetectedEventArgs e) { if (FourFingersPostureSucceed != null) FourFingersPostureSucceed(this, e); }