by giannismoustakis » 19 Feb 2014, 10:54
This is a conversion code from C# to Java.
- Code: Select all
import com.theeyetribe.client.GazeManager;
import com.theeyetribe.client.IGazeListener;
import com.theeyetribe.client.data.GazeData;
public class GetData implements IGazeListener
{
public static void main (String[] args)
{
new GetData();
}
GetData()
{
GazeManager.getInstance().activate(GazeManager.ApiVersion.VERSION_1_0, GazeManager.ClientMode.PUSH);
GazeManager.getInstance().addGazeListener(this);
}
public void onGazeUpdate(GazeData gazeData)
{
double gX = gazeData.rawCoordinates.x;
double gY = gazeData.rawCoordinates.y;
//double gX = gazeData.smoothedCoordinates.x;
//double gY = gazeData.smoothedCoordinates.y;
System.out.println( gX + "\t" + gY);
}
}