void hands_HandDestroy(object sender, HandDestroyEventArgs e)
        {
            _print     = true;
            debug_text = "hand destroyed";
            this.router.ActiveListener = null;
            this.state = SessionState.QUICK_REFOCUS;

            this.gesture_display.Text  = "Must be in Session";
            this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/exclamation.ico");
        }
    void hands_HandDestroy(object Sender, HandDestroyEventArgs e)
    {
        handId = -1;

        // TODO: foreach on a copy of the list
        foreach (GameObject obj in Listeners)
        {
            NotifyHandDestroy(obj);
        }
        OnSessionEnded();
        this.gestures.StartGenerating();
    }
Exemple #3
0
        void FHands_HandDestroy(object sender, HandDestroyEventArgs e)
        {
            if (FTrackedHands.ContainsKey(e.UserID))
            {
                FTrackedHands.Remove(e.UserID);
            }

            if (FTrackedStartPositions.ContainsKey(e.UserID))
            {
                FTrackedStartPositions.Remove(e.UserID);
            }
        }
        void handsGenerator_HandDestroy(object sender, HandDestroyEventArgs e)
        {
            NiteKinectHandGestureEventData eventdata = new NiteKinectHandGestureEventData(new NiteKinectHandGestureData(e.UserID, NiteKinectHandState.Destroyed, new Point3D()));

            if (DataReceived != null)
            {
                DataReceived(this, new DataReceivedEventHandler()
                {
                    PluginData = eventdata
                });
            }
        }
Exemple #5
0
        // 手の検出終了
        void hands_HandDestroy(object sender, HandDestroyEventArgs e)
        {
            // 1.1.0.41 ではHandGenerator.StopTrackingでHandDestroyイベントが
            // 呼び出されるようで再帰になってしまう。
            // そのためトラッキング停止状態でない場合のみ、トラッキング停止をする
            if (handStates != HandStatus.NoTracking)
            {
                handStates = HandStatus.NoTracking;
                handPoints.Clear();

                // トラッキングの停止
                hands.StopTracking(e.UserID);
            }
        }
    void hands_HandDestroy(object Sender, HandDestroyEventArgs e)
    {
        handId = -1;

        foreach (GameObject obj in new List <GameObject>(Listeners))
        {
            if (!obj)
            {
                continue;
            }
            NotifyHandDestroy(obj);
        }
        OnSessionEnded();
        this.gestures.StartGenerating();
    }
Exemple #7
0
 void hands_HandDestroy(object sender, HandDestroyEventArgs e)
 {
     Debug.Log("Destroy");
     tracking.Remove(e.UserID);
 }