Getting data

Forum for development in the Java programming language.

Getting data

Postby 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);
      }   
}
Last edited by giannismoustakis on 28 Sep 2016, 23:12, edited 2 times in total.
giannismoustakis
 
Posts: 14
Joined: 18 Dec 2013, 12:00

Re: Getting data

Postby HackNFly » 10 Mar 2014, 06:04

Thanks for the code, it was a helpful start!
HackNFly
 
Posts: 5
Joined: 07 Feb 2014, 19:21


Return to Java