Getting Data

Forum for C#/Windows development

Getting Data

Postby LGLLiang22.13 » 17 Mar 2015, 11:27

Hi,
I tried to implement the following coding to my program in C#. The way my program works is that when I press the button, labels will display the coordinates for parameters of the gaze data. But every time I run the program it keep displaying zero value. Is there anything I missed out??

public class GazePoint : IGazeListener
{
public GazePoint()
{
// Connect client
GazeManager.Instance.Activate(GazeManager.ApiVersion.VERSION_1_0, GazeManager.ClientMode.Push);

// Register this class for events
GazeManager.Instance.AddGazeListener(this);

Thread.Sleep(5000); // simulate app lifespan (e.g. OnClose/Exit event)

// Disconnect client
GazeManager.Instance.Deactivate();
}

public void OnGazeUpdate(GazeData gazeData)
{
double gX = gazeData.SmoothedCoordinates.X;
double gY = gazeData.SmoothedCoordinates.Y;

// Move point, do hit-testing, log coordinates etc.
}
}
LGLLiang22.13
 
Posts: 4
Joined: 11 Mar 2015, 05:13

Re: Getting Data

Postby Anders » 17 Mar 2015, 14:17

If the system is not calibrated, you will not receive any gaze coordinates.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23


Return to C#