Exemple #1
0
        public void dataArrived(object data)
        {
            Skeleton skeleton = SkeletonUtils.defaultSkeleton(data);

            if (skeleton == null)
            {
                return;
            }

            stream.add(skeleton);
            if (stream.size() == movement.size())
            {
                float diff = SkeletonUtils.difference(stream, movement);
                container.setMovementValue(movementType, diff * 250.0 / threshold);
                if (lastUse.AddSeconds(5) < DateTime.Now)
                {
                    if (diff < threshold)
                    {
                        Debug.WriteLine("Gesture Detected");
                        action.perform();
                        lastUse = DateTime.Now;
                    }
                }
            }
        }
Exemple #2
0
 public void dataArrived(object data)
 {
     if (!recording)
     {
         return;
     }
     recorder.add(SkeletonUtils.defaultSkeleton(data));
 }