Example #1
0
 public void Update(KinectModel kinect)
 {
     foreach (IGestureRecognizer gr in this.recognizers)
     {
         gr.Update(kinect);
     }
 }
Example #2
0
 public void Update(KinectModel kinect)
 {
     foreach (IGestureRecognizer gr in this.recognizers)
     {
         gr.Update(kinect);
     }
 }
Example #3
0
 public AppState(KinectModel kinect, SpeechRecognizer speechRecognizer, int micIndex, int micLevel = 0, int bpm = 0)
 {
     this.SpeechRecognizer = speechRecognizer;
     this.Kinect           = kinect;
     this.MicIndex         = micIndex;
     this.MicLevel         = micLevel;
     this.Bpm = bpm;
 }
Example #4
0
 public void Update(KinectModel kinect)
 {
     if (!Disabled && kinect.IsStable)
     {
         if (isHorizontal)
         {
             AddHorizontal(kinect.HandRight, kinect.ShoulderCenter, kinect.ShoulderRight);
         }
         else
         {
             AddVertical(kinect.HandRight, kinect.ShoulderCenter, kinect.ShoulderRight);
         }
     }
 }
Example #5
0
 public void Update(KinectModel kinect)
 {
     IsOnStage = !(kinect.Head.X < stageLeft || kinect.Head.X > stageRight);
     HandsOverHead = (kinect.HandLeft.Y < kinect.Head.Y && kinect.HandRight.Y < kinect.Head.Y);
 }
Example #6
0
 public AppState(string applicationMode, KinectModel kinect)
 {
     this.applicationMode = applicationMode;
     this.kinect = kinect;
 }
Example #7
0
 public DemoAppState(string applicationMode, KinectModel kinect)
 {
     this.ApplicationMode = applicationMode;
     this.Kinect          = kinect;
 }
Example #8
0
 public void Activated(object state)
 {
     Stream fileStream;
     ApplicationMode = (string)state;
     switch (ApplicationMode)
     {
         case ("Replay"):
             OpenFileDialog openFileDialog = new OpenFileDialog { };
             openFileDialog.ShowDialog();
             try
             {
                 fileStream = File.OpenRead(openFileDialog.FileName);
                 kinectModel = new ReplayKinectModel(fileStream);
             }
             catch
             {
                 Messenger.Default.Send<NavigateMessage>(new NavigateMessage(WelcomeViewModel.ViewName, null));
             }
             break;
         case ("Record"):
             SaveFileDialog saveFileDialog = new SaveFileDialog { };
             saveFileDialog.ShowDialog();
             try
             {
                 fileStream = File.OpenWrite(saveFileDialog.FileName);
                 kinectModel = new FreePlayKinectModel(fileStream);
             }
             catch
             {
                 Messenger.Default.Send<NavigateMessage>(new NavigateMessage(WelcomeViewModel.ViewName, null));
             }
             break;
         case ("Free Use"):
             kinectModel = new FreePlayKinectModel(null);
             break;
     }
     RaisePropertyChanged("Kinect");
 }
Example #9
0
 public void Update(KinectModel kinect)
 {
     if (!Disabled && kinect.IsStable)
     {
         if (isHorizontal)
         {
             AddHorizontal(kinect.HandRight, kinect.ShoulderCenter, kinect.ShoulderRight);
         }
         else
         {
             AddVertical(kinect.HandRight, kinect.ShoulderCenter, kinect.ShoulderRight);
         }
     }
 }
Example #10
0
 public void Update(KinectModel kinect)
 {
     IsOnStage     = !(kinect.Head.X <stageLeft || kinect.Head.X> stageRight);
     HandsOverHead = (kinect.HandLeft.Y < kinect.Head.Y && kinect.HandRight.Y < kinect.Head.Y);
 }