private void Kinect_OnLostTracking(object sender, EventArgs e) { ToggleHoverTimer(false); ReleaseGrip(0); ReleaseGrip(1); usedHandIndex = NONE_USED; kinectJointFilter.Reset(fJitterRadius: 0.03f, fMaxDeviationRadius: 0.05f); }
public KinectCursor() { MRect screenRect = new MRect(0, 0, SystemParameters.PrimaryScreenWidth, SystemParameters.PrimaryScreenHeight); cursorMapper = new CursorMapper(gestureRect, screenRect, CursorMapper.ScaleAlignment.LongerRange); sensorReader = new KinectReader(false); sensorReader.OnTrackedBody += Kinect_OnTrackedBody; sensorReader.OnLostTracking += Kinect_OnLostTracking; hoverTimer.Interval = TimeSpan.FromSeconds(HoverDuration); hoverTimer.Tick += new EventHandler(HoverTimer_Tick); kinectJointFilter = new KinectJointFilter(); kinectJointFilter.Reset(fJitterRadius: 0.03f, fMaxDeviationRadius: 0.05f); }