Page 1 of 1

Getting Data

PostPosted: 17 Mar 2015, 11:27
by LGLLiang22.13
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.
}
}

Re: Getting Data

PostPosted: 17 Mar 2015, 14:17
by Anders
If the system is not calibrated, you will not receive any gaze coordinates.