Exemplo n.º 1
0
 //public TrackerWrapper tracker { get; private set; }
 public TestRenderer(AvengersUtd.Odyssey.IDeviceContext deviceContext)
     : base(deviceContext)
 {
     tracker = new TrackerWrapper();
 }
Exemplo n.º 2
0
 void SplineTask_Loaded(object sender, RoutedEventArgs e)
 {
     WpfTextTraceListener.SetTextOutput(Status);
     WindowState = WindowState.Maximized;
     tracker = new TrackerWrapper();
     tracker.SetWindow(this);
     tracker.StartBrowsing();
     tracker.GazeDataReceived += tracker_GazeDataReceived;
 }
Exemplo n.º 3
0
 public void SetTracker(TrackerWrapper newTracker)
 {
     #if TRACKER
     tracker = newTracker;
     tracker.GazeDataReceived += new EventHandler<GazeEventArgs>(tracker_GazeDataReceived);
     #endif
 }
Exemplo n.º 4
0
        void Init()
        {
            gazeRadius = (int)CrossHair.Width / 2;
            tracker = new TrackerWrapper();

            knotPoints = new Dictionary<TouchDevice, Dot>();
            dots = new List<Dot>();
            InitializeComponent();
            startPoint = UserCurve.Points[0];
            Canvas.Children.Add(BuildEndPoint(UserCurve.Points[0]));
            for (int i = 1; i < UserCurve.Points.Count - 1; i++)
            {
                Point p = UserCurve.Points[i];
                Dot knotPoint = new Dot() { Center = p };
                knotPoint.Tag = i;
                Canvas.Children.Add(knotPoint);
                dots.Add(knotPoint);
            }
            Canvas.Children.Add(BuildEndPoint(UserCurve.Points[4]));
            endPoint = UserCurve.Points[4];
            Loaded += new RoutedEventHandler(SplineTask_Loaded);
            TouchDown += new EventHandler<TouchEventArgs>(ellipse_TouchDown);
            TouchMove += new EventHandler<TouchEventArgs>(ellipse_TouchMove);
            LostTouchCapture += new EventHandler<TouchEventArgs>(ellipse_LostTouchCapture);

            bConnect.TouchUp += (sender, e) => {tracker.Connect();};
            bStart.TouchUp += (sender, e) => { tracker.StartTracking(); };
            tracker.GazeDataReceived += new EventHandler<GazeEventArgs>(tracker_GazeDataReceived);

            Ellipse ellipseRadius = new System.Windows.Shapes.Ellipse()
            {
                Width = 2 * radiusSize,
                Height = 2 * radiusSize,
                Stroke = Brushes.Black,
                RenderTransform = new TranslateTransform(8, 1070)
            };
            Canvas.Children.Add(ellipseRadius);
        }
Exemplo n.º 5
0
 void GameTask_Loaded(object sender, RoutedEventArgs e)
 {
     //WpfTextTraceListener.SetTextOutput(Status);
     WindowState = WindowState.Maximized;
     tracker = new TrackerWrapper();
     tracker.SetWindow(this);
     tracker.StartBrowsing();
     tracker.GazeDataReceived += new EventHandler<GazeEventArgs>(tracker_GazeDataReceived);
 }
Exemplo n.º 6
0
 static BoxRenderer()
 {
     TrackerEvent.BoxSessionStart.Log("Participant", "Rep", "Axis", "Arrow1", "Arrow2", "Arrow3", "Time");
     #if TRACKER
     tracker = new TrackerWrapper();
     tracker.StartBrowsing();
     tracker.SetWindow(Global.Window);
     #endif
 }