Пример #1
0
        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);
        }
Пример #2
0
        public KinectCursor(string USER, int TASK_NUM)
        {
            task_num = TASK_NUM;

            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);

            DataCollector = DataCollectorFactory.Start(USER, TASK_NUM);
        }