void hands_HandUpdate(object sender, HandUpdateEventArgs e)
 {
     setPuntosManoActuales(e.Position);
     distanciaKinectReales();
     if(!isActiveMainCamera()){
         calculaMovimiento();
     }else{
         transform.position=new Vector3(xMedia,yMedia,zMedia);
     }
 }
Example #2
0
        void handsGenerator_HandUpdate(object sender, HandUpdateEventArgs e)
        {
            //Trace.WriteLine("Hand updated at " + e.Position.X + ", " + e.Position.Y + ", " + e.Position.Z);
            //handPosition = new Point3D(e.Position.X + 320, 240 - e.Position.Y, e.Position.Z);

            if (HandUpdate != null)
            {
                HandUpdate(this, e);
            }
        }
Example #3
0
 void hands_HandUpdate(object sender, HandUpdateEventArgs e)
 {
     //Debug.Log("Mano Update");
     setPuntosManoActuales(e.Position);
     distanciaKinectReales();
     calculaMovimiento();
 }
Example #4
0
 void handsGenerator_HandUpdate(object sender, HandUpdateEventArgs e)
 {
     Trace.WriteLine("Hand updated at " + e.Position.X + ", " + e.Position.Y + ", " + e.Position.Z);
     handPosition = new Point3D(e.Position.X + 320, 240 - e.Position.Y, e.Position.Z);
 }
    void hands_HandUpdate(object Sender, HandUpdateEventArgs e)
    {
        lastRawPoint = e.Position;
        if (RotateToUser) {
            handPos = RotateHandPoint(e.Position);
        } else {
            handPos = e.Position;
        }

        // see if we're out of our session bounds
        if (SessionBoundingBox && !currentSessionBounds.Contains(Point3DToVector3(handPos))) {
            OpenNISessionManager.Instance.EndSession();
            Debug.Log("Session Ended by out of Bounds");
            return;
        }

        foreach (GameObject obj in new List<GameObject>(Listeners))
        {
            if (!obj) continue;
            NotifyHandUpdate(obj, handPos);
        }
    }
Example #6
0
        void handsGenerator_HandUpdate(object sender, HandUpdateEventArgs e)
        {
            //
            this.shouldDrawHands = true;
            //MessageBox.Show("Hand being updated");

            List<Point3D> historyList = history[e.UserID];
            historyList.Add(e.Position);

            while (historyList.Count > historySize)
            {
                //String text = historyList.ElementAt(0).ToString();
                //MessageBox.Show(text);
                historyList.RemoveAt(0);
            }
            history.Remove(e.UserID);
            history.Add(e.UserID, historyList);

            this.lastPoint = e.Position;
            this.lastPalmPoint = convertPoint3D(e.Position);
        }
 void hands_HandUpdate(object sender, HandUpdateEventArgs e)
 {
     Debug.Log("Update");
     List<Point3D> lista=tracking[e.UserID];
     lista.Add(e.Position);
     if(lista.Count>trackingSize){
         lista.RemoveAt(0);
     }
 }
        void HandTracker_HandUpdate(object sender, HandUpdateEventArgs e)
        {
            Dispatcher.BeginInvoke((Action)delegate()
            {
                Ellipse ellipse;

                if (!handPoints.ContainsKey(e.UserID))
                {
                    ellipse = new Ellipse()
                    {
                        Width = 50,
                        Height = 50,
                        Fill = new SolidColorBrush(IntColorConverter.ToColor(e.UserID)),
                    };
                    handPoints.Add(e.UserID, ellipse);
                    canvas.Children.Add(ellipse);
                }
                else
                {
                    ellipse = handPoints[e.UserID];
                }

                Point3D pos = sensor.DepthGenerator.ConvertRealWorldToProjective(e.Position);
                Canvas.SetLeft(ellipse, pos.X);
                Canvas.SetTop(ellipse, pos.Y);
            });
        }
Example #9
0
 void HandleHandsGeneratorHandUpdate(object sender, HandUpdateEventArgs e)
 {
     // update the hand position
     handPosition = e.Position;
     DetectHand();
 }
 // 手の位置の更新
 void hands_HandUpdate(object sender, HandUpdateEventArgs e)
 {
     handStates = HandStatus.Update;
       handPoints.Enqueue(e.Position);
 }
Example #11
0
 void hands_HandUpdate(object sender, HandUpdateEventArgs e)
 {
 }