示例#1
0
 private void RaiseOneFingerPostureSucceed(PostureDetectedEventArgs e)
 {
     if (OneFingerPostureSucceed != null)
         OneFingerPostureSucceed(this, e);
 }
示例#2
0
 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);
 }
示例#7
0
 private void RaiseScissorsPostureSucceed(PostureDetectedEventArgs e)
 {
     if (ScissorsPostureSucceed != null)
         ScissorsPostureSucceed(this, e);
 }
 private void OnFourFingersPostureSucceed(object sender, PostureDetectedEventArgs e)
 {
     RaiseFourPostureSucceed();
 }
示例#9
0
 private void RaiseRockPostureSucceed(PostureDetectedEventArgs e)
 {
     if (RockPostureSucceed != null)
         RockPostureSucceed(this, e);
 }
示例#10
0
 private void RaiseScissorsPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage)
 {
     if (ScissorsPostureDetectionInProgress != null)
         ScissorsPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Scissors, percentage, e.Timestamp));
 }
示例#11
0
 private void RaiseRockPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage)
 {
     if (RockPostureDetectionInProgress != null)
         RockPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Rock, percentage, e.Timestamp));
 }
示例#12
0
 private void RaisePaperPostureSucceed(PostureDetectedEventArgs e)
 {
     if (PaperPostureSucceed != null)
         PaperPostureSucceed(this, e);
 }
示例#13
0
 private void RaisePaperPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage)
 {
     if (PaperPostureDetectionInProgress != null)
         PaperPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Paper, percentage, e.Timestamp));
 }
示例#14
0
 private void OnPostureZeroBegin(object sender, PostureDetectedEventArgs e)
 {
     m_FlagPosture[PostureType.Zero] = true;
     m_PostureLostTimer.Start();
     m_ZeroPostureCounter = 0;
     RaiseZeroFingerPostureDetectionInProgress(e, 0);
 }
示例#15
0
 private void RaiseThreeFingersPostureDetectionInProgress(PostureDetectedEventArgs e, int percentage)
 {
     if (ThreeFingersPostureDetectionInProgress != null)
         ThreeFingersPostureDetectionInProgress(this, new PostureDetectedEventArgs(PostureType.Three, percentage, e.Timestamp));
 }
示例#16
0
 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);
     }
 }
示例#17
0
 private void RaiseTwoFingersPostureSucceed(PostureDetectedEventArgs e)
 {
     if (TwoFingersPostureSucceed != null)
         TwoFingersPostureSucceed(this, e);
 }
 private void OnOneFingerPostureSucceed(object sender, PostureDetectedEventArgs e)
 {
     RaiseOnePostureSucceed();
 }
示例#19
0
 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();
 }
示例#21
0
 private void RaiseZeroFingerPostureSucceed(PostureDetectedEventArgs e)
 {
     if (ZeroFingerPostureSucceed != null)
         ZeroFingerPostureSucceed(this, e);
 }
 private void OnScissorsPostureSucceed(object sender, PostureDetectedEventArgs e)
 {
     RaiseScissorsPostureSucceed();
 }
示例#23
0
 /****************** 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();
 }
示例#25
0
 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();
 }
示例#27
0
 private void RaiseFourFingersPostureSucceed(PostureDetectedEventArgs e)
 {
     if (FourFingersPostureSucceed != null)
         FourFingersPostureSucceed(this, e);
 }