public MainViewModel(OpenGL gl, System.Windows.Controls.ScrollViewer scrollViewer, System.Windows.Controls.TextBox outputWindowTextBox, GestureLibrary gestureLibraryControl, EditStaticGesture editStaticGestureControl, EditDynamicGesture editDynamicGestureControl, RecognitionMonitor recognitionMonitorControl, Controller controller) { _gl = gl; _controller = controller; _camera = new Camera(_gl); _scrollViewer = scrollViewer; _outputWindowTextBox = outputWindowTextBox; _gestureLibraryControl = gestureLibraryControl; _gestureLibraryControl.SetMvm(this); _editStaticGestureControl = editStaticGestureControl; _editStaticGestureControl.SetMvm(this); _editDynamicGestureControl = editDynamicGestureControl; _editDynamicGestureControl.SetMvm(this); _sqliteProvider = new SQLiteProvider(Constants.SQLiteFileName); _config = new LGR_Configuration(_sqliteProvider); _glHelper = new SharpGLHelper(_gl, _config.BoneColors); UpdateStaticGestureLibrary(); UpdateDynamicGestureLibrary(); initMenuBar(); // Needs to be initialized after UpdateGestureLibrary() _classifier = new StatisticalClassifier(StaticGestures, DynamicGestures); _recognitionMonitorControl = recognitionMonitorControl; _recognitionMonitorControl.VM = new RecognitionMonitorViewModel(_classifier); FrameReceived += _recognitionMonitorControl.VM.OnFrameReceived; }
public RecognitionMonitorViewModel(StatisticalClassifier classifier) { _classifier = classifier; _dgRecorder = new DGRecorder(inRecordMode: false); CurrentState = _dgRecorder.State; RankedStaticGestures = new ObservableCollection <GestureDistance>(); RankedDynamicGestures = new ObservableCollection <GestureDistance>(); Mode = GestureType.Static; // Probably not necessary to initialize Active = true; }