Esempio n. 1
0
 /*****************************************************
 * DETECTED FIST GESTURE
 *
 * INFO:    Valide la détection du geste qui consiste
 *          à fermer la main (poing). La fonction
 *          communique directement avec le médiateur
 *          du contrôleur de gestes.
 *
 *****************************************************/
 public override bool IsDetectedGesture()
 {
     isFisting = false;
     if (DetectionController.GetInstance().IsHandDetected(hand))
     {
         DetectionController.HandController handController = DetectionController.GetInstance().GetHand(hand);
         isFisting = handController.IsFist(tolerance) && handController.IsAllFingersClosed() && !BothFistGesture.GetInstance().IsBothFisting();
     }
     DisplayDectedGesture(isFisting);
     return(isFisting);
 }
    /*****************************************************
    * DETECTED FIST GESTURE
    *
    * INFO:    Valide la détection du geste qui consiste
    *          à fermer les deux mains (poing). La fonction
    *          communique directement avec le médiateur
    *          du contrôleur de gestes.
    *
    *****************************************************/
    public override bool IsDetectedGesture()
    {
        isBothFist = false;
        if (DetectionController.GetInstance().IsHandDetected(HandsE.gauche) &&
            DetectionController.GetInstance().IsHandDetected(HandsE.droite))
        {
            DetectionController.HandController leftHand  = DetectionController.GetInstance().GetHand(HandsE.gauche);
            DetectionController.HandController rightHand = DetectionController.GetInstance().GetHand(HandsE.droite);

            isBothFist = leftHand.IsFist(tolerance) && leftHand.IsAllFingersClosed() &&
                         rightHand.IsFist(tolerance) && rightHand.IsAllFingersClosed();
        }
        DisplayDectedGesture(isBothFist);
        return(isBothFist);
    }