public void Update(KinectModel kinect) { foreach (IGestureRecognizer gr in this.recognizers) { gr.Update(kinect); } }
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; }
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); } } }
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); }
public AppState(string applicationMode, KinectModel kinect) { this.applicationMode = applicationMode; this.kinect = kinect; }
public DemoAppState(string applicationMode, KinectModel kinect) { this.ApplicationMode = applicationMode; this.Kinect = kinect; }
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"); }
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); }