<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://theeyetribe.com/forum/feed.php?f=25&amp;t=105" />

<title>The Eye Tribe</title>
<subtitle>Developer Forum</subtitle>
<link href="http://theeyetribe.com/forum/index.php" />
<updated>2014-02-26T18:17:13+02:00</updated>

<author><name><![CDATA[The Eye Tribe]]></name></author>
<id>http://theeyetribe.com/forum/feed.php?f=25&amp;t=105</id>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T18:17:13+02:00</updated>
<published>2014-02-26T18:17:13+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=425#p425</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=425#p425"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=425#p425"><![CDATA[
Also, at least you should be tell users:<br /><br />1. the gaze data how to capture, e.g. through create a Thread? Call back function how to used it?<br /><br />2. detail process of operation, e.g. the code, firstly, you need to initialization device, the listen function is necessary? <br /><br />Whatever, you must save time for users.<br /><br />Thank you.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 18:17</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T18:10:05+02:00</updated>
<published>2014-02-26T18:10:05+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=424#p424</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=424#p424"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=424#p424"><![CDATA[
I found this SDK no detail about all the operation e.g. class, struct, how to build and use in C++. Why?<br /><br />I have spent a day for research this code run in VC++ environment. Whatever, at least, tell users how to use you provided class and how to capture gaze data. Because you can not promise all of users are good at computer program like C++. I do hope you can help me, how to use it, could you please give me a simple example.<br /><br />I am not a coder, I just want to know how to handle it, how to capture data. other thing I do not care.<br /><br />I hope you can help me.<br /><br />Thank you so much!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 18:10</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T06:12:38+02:00</updated>
<published>2014-02-26T06:12:38+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=422#p422</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=422#p422"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=422#p422"><![CDATA[
I hope Martin can help me understand my questions above. Thank you so much!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 06:12</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T06:11:15+02:00</updated>
<published>2014-02-26T06:11:15+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=421#p421</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=421#p421"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=421#p421"><![CDATA[
Thanks for Rafeal.<br /><br />But I hope someone can answer my questions above. Thank you!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 06:11</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Rafael]]></name></author>
<updated>2014-02-26T05:49:36+02:00</updated>
<published>2014-02-26T05:49:36+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=420#p420</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=420#p420"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=420#p420"><![CDATA[
Hi mingxinbit,<br /><br />You should create your own class and, as Martin said, implement the IGazeListener interface. The method m_api.add_listener expects (as a parameter) a class instance which implements this interface. As you'll probably call it from that instance, you pass the *this parameter, where &quot;this&quot; is a pointer to the instance. The <a href="http://dev.theeyetribe.com/cpp/#cpp_frame" class="postlink">official example</a> suggests how you could create such class.<br /><br />Actually, you could also access the eyetracker without using the API. Just create a socket to connect to the eyetracker and use JSON messages to communicate. See <a href="http://dev.theeyetribe.com/api/" class="postlink">here</a> for more details.<br /><br />Rafael<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2475">skataRafael</a> — 26 Feb 2014, 05:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T01:58:39+02:00</updated>
<published>2014-02-26T01:58:39+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=418#p418</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=418#p418"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=418#p418"><![CDATA[
I have another question.<br /><br />If I want to use the <dl class="codebox"><dt>Code: </dt><dd><code>gtl::GazeData const &amp; gaze_data;</code></dd></dl>, the error is displayed:<br /><br />&quot;must initialize the reference&quot;, what's meaning?<br /><br />Thank you!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 01:58</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-26T01:26:12+02:00</updated>
<published>2014-02-26T01:26:12+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=417#p417</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=417#p417"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=417#p417"><![CDATA[
Also, I found this call back is private function. I do not know how to call this function in the main function?<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 26 Feb 2014, 01:26</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-25T22:49:01+02:00</updated>
<published>2014-02-25T22:49:01+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=414#p414</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=414#p414"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=414#p414"><![CDATA[
By the way, the callback function <dl class="codebox"><dt>Code: </dt><dd><code>void MyGaze::on_gaze_data( gtl::GazeData const &amp; gaze_data )</code></dd></dl> how to use?<br /><br />The process of eye gaze tracker operation is:<br /><br />1. <dl class="codebox"><dt>Code: </dt><dd><code>m_api.connect( true )</code></dd></dl><br /><br />2. <dl class="codebox"><dt>Code: </dt><dd><code>m_api.add_listener( *this );</code></dd></dl><br /><br />3. Callback function<br /><br />The step 2 is necessary step? What's role of this function?<br /><br />Thank you!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 25 Feb 2014, 22:49</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-25T22:26:03+02:00</updated>
<published>2014-02-25T22:26:03+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=413#p413</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=413#p413"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=413#p413"><![CDATA[
Thank you for you reply.<br /><br />I have to describe my problem I faced since I got my eye tracker last night.<br /><br />This eye tracker looks so cool and run well.<br /><br />No, I want to use eye tracker into my project. The code I made using C plus plus.<br /><br />However, I am not sure how to use the API to extract the data. In addition, no C++ samples are provided from website, it is a little pity, although the C# has.<br /><br />The code I have read in the C++ Tutorials web-page. It looks easily, but I do not know well how it work. Maybe MY c++ is not well, I think.<br /><br />Currently, I created a console application using C++.<br /><br />the goal I want to reach is to capture the eye gaze data.<br /><br />1. I click and run the EyeTribe UI software, then I calibrated my eye tracker. I found the EyeTribe Server also has been run with EyeTribe UI.<br /><br />2. I shut down the EyeTribe UI software, the EyeTribe Server software still run.<br /><br />3. I run my code, the easy code like this:<br /><dl class="codebox"><dt>Code: </dt><dd><code>gtl::GazeApi m_api; <br />if (m_api.connect(true))<br />{<br />    printf(&quot;Connected Successful&quot;);<br />}</code></dd></dl> return this connection is successful. It is cool, I found the near IR lights has been on. Then I have no idea to how to handle it next step.<br /><br />The above steps I operate is right or wrong?<br /><br />I want to understand some questions:<br /><br />1. After calibration I made using your provided software and keep the Server run, I can run my software to capture calibrated eye gaze data, is that right?<br /><br />2. The MyGaze class provided in this website. Can you tell me how to work in my code using console application program in the VS2010 environment?<br /><br />3. If I do not want to use the MyGaze class, how to capture calibrated or right eye gaze data? In other words, like below code:<br /><dl class="codebox"><dt>Code: </dt><dd><code>#include &quot;gazeapi.h&quot;<br />#include &quot;gazeapi_interfaces.h&quot;<br />#include &quot;gazeapi_types.h&quot;<br /><br />int main(int argc, char **argv)<br />{   <br />   gtl::GazeApi m_api;<br /><br />   gtl::GazeData m_point;<br />   gtl::Point2D m_point2d;<br /><br />   if (m_api.connect(true))<br />   {<br />                m_api.add_listener(* this);<br />      printf(&quot;Connected Successful&quot;);<br />   }<br /><br />   while (1)<br />   {<br />      int x=m_point.lefteye.raw.x;<br />      printf(&quot;%d\n&quot;,x);<br />   }<br /><br />   return 0;<br />}<br /></code></dd></dl><br />However, after running this code, two errors were provided to me. one is m_api.add_listener(* this) (this is not used in this function?), another is int x=m_point.lefteye.raw.x,(need initialization for m_point?);<br /><br />Whatever, I hope and better to give me a easily sample me how to use for capture gaze data. I am very looking forward to receive your message.<br /><br />Thank you so much!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 25 Feb 2014, 22:26</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Martin]]></name></author>
<updated>2014-02-25T19:08:35+02:00</updated>
<published>2014-02-25T19:08:35+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=409#p409</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=409#p409"/>
<title type="html"><![CDATA[Re: m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=409#p409"><![CDATA[
Passing the pointer to &quot;this&quot; means that you are registering your class with the eye tracker client library. This enables the SDK to make callbacks when new eye data has been calculated. The callback function is:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>void MyClass::on_gaze_data( gtl::GazeData const &amp; gaze_data )<br />{<br />    if( gaze_data.state &amp; gtl::GazeData::GD_STATE_TRACKING_GAZE )<br />    {<br />        gtl::Point2D const &amp; smoothedCoordinates = gaze_data.avg;<br />        // Move GUI point, do hit-testing, log coordinates, etc.<br />    }<br />}<br /></code></dd></dl><br /><br />This will only work if you implement the IGazeListner interface, your class needs to have a signature like this:<br /><dl class="codebox"><dt>Code: </dt><dd><code>class MyClass : public gtl::IGazeListener </code></dd></dl><br /><br />To connect with the server you should have the following code in your constructor (or place of choice)<br /><dl class="codebox"><dt>Code: </dt><dd><code>MyClass::MyClass()<br />{<br />    // Connect to the server in push mode on the default TCP port (6555)<br />    if( m_api.connect( true ) )<br />    {<br />        // Enable GazeData notifications<br />        m_api.add_listener( *this );<br />    }<br />}</code></dd></dl><br /><br />And to disconnect:<br /><dl class="codebox"><dt>Code: </dt><dd><code>MyClass::~MyClass()<br />{<br />    m_api.remove_listener( *this );<br />    m_api.disconnect();<br />}</code></dd></dl><br /><br />Does that help?<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=117">skataMartin</a> — 25 Feb 2014, 19:08</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-02-25T08:43:09+02:00</updated>
<published>2014-02-25T08:43:09+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=398#p398</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=398#p398"/>
<title type="html"><![CDATA[m_api.add_listener( *this ) Problem]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=105&amp;p=398#p398"><![CDATA[
Hi,<br /><br />m_api.add_listener( *this ), I want to know input parameter &quot;*this&quot;, what is meaning? In addition,  whether or not I can input other type parameter? What is that?<br /><br />By the way, please tell me detail about this function m_api.add_listener( *this )'s meaning.<br /><br />Thank you<br /><br />Mingxin<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 25 Feb 2014, 08:43</p><hr />
]]></content>
</entry>
</feed>