Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void SetRects(MRect inputRect, MRect outputRect)
 {
     _inputRect  = inputRect;
     _outputRect = outputRect;
     UpdateMapping();
 }
Exemplo n.º 4
0
 public CursorMapper(MRect inputRect, MRect outputRect, ScaleAlignment scaleAlign = ScaleAlignment.None)
 {
     ScaleAlign = scaleAlign;
     SetRects(inputRect, outputRect);
 }