public KinectEmulateViewModel() { //Create a drawinggroup for the 2D image in the viewport var dwGroup = new DrawingGroup(); Display = new DrawingImage(dwGroup); //Create a viewPort for 3D Viewport = new Dx10Viewport(); //Viewport.OnDrop += OnDrop; //init visualizer _frameDrawer = new FrameVisualizer(dwGroup); //Default 3D DrawMode //When Frame index is changed => Draw the new frame _onFrameIndexChange += DrawFrame; IsEmulating = false; #if DEBUG Viewport.OnLoad += () => { DeserializeRecordingFile("Resources/Recording/Wave.kr"); OpenModelFile("Resources/Mesh/Knight.ovm"); }; #endif }
public KinectRecordViewModel() { //Set up the place to draw var dwGroup = new DrawingGroup(); KinectDrawingImage = new DrawingImage(dwGroup); _frameDrawer = new FrameVisualizer(dwGroup); _frameDrawer.DrawMode = DrawMode.Visual2D; FileName = "Recording"; //Create the recorder and hook up the actual Record function to be called whenever new data is available KinectManager.KinectTask += PollSkeleton; //Start, will not do anything when no kinect is detected KinectManager.StartKinect(); }