示例#1
0
 protected override void onUpdate(GameTime gameTime)
 {
     this.skeleton = this.kinect.skeleton;
     if (this.skeleton != null)
     {
         if (this.posture != null)
         {
             this.posture.joints = Posture.castSkeletonToJoints(this.skeleton);
         }
         else
         {
             this.posture = new Posture(this.skeleton);
         }
     }
     // IMPORTANT:
     // FIX: ARREGLAR ESTO PARA QUE CALCULE LOS ERRORES Y LA DIFICULTAD LA DE DESDE UNA CAPA MAS ARRIBA...
     if (postureToCompare != null && this.posture != null)
     {
         this.posture.compareTo(this.postureToCompare, ref accuracy, 0.07f, 0.058f);
     }
     else
     if (this.kinect.skeleton != null)
     {
         accuracy = new double[20] {
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         }
     }
     ;
 }
 protected override void onUpdate(GameTime gameTime)
 {
     if (this.skeleton != null)
     {
         if (this.posture != null)
         {
             this.posture.joints = Posture.castSkeletonToJoints(this.skeleton);
         }
         else
         {
             this.posture = new Posture(this.skeleton);
         }
     }
 }