<?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=484" />

<title>The Eye Tribe</title>
<subtitle>Developer Forum</subtitle>
<link href="http://theeyetribe.com/forum/index.php" />
<updated>2015-05-06T09:27:50+02:00</updated>

<author><name><![CDATA[The Eye Tribe]]></name></author>
<id>http://theeyetribe.com/forum/feed.php?f=25&amp;t=484</id>
<entry>
<author><name><![CDATA[tictoc3493@naver.com]]></name></author>
<updated>2015-05-06T09:27:50+02:00</updated>
<published>2015-05-06T09:27:50+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=484&amp;p=2012#p2012</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=484&amp;p=2012#p2012"/>
<title type="html"><![CDATA[I want to get coordinate data separately. How can I do?]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=484&amp;p=2012#p2012"><![CDATA[
I just simply coded like below for printing out coordinate data.<br /><br />Actually, it was thanks to someone who commented in this forum.<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>#include &quot;gazeapi.h&quot;<br />#include &lt;iostream&gt;<br /><br />float LeftEyeX, LeftEyeY, RightEyeX, RightEyeY;<br /><br /><br />using namespace std;<br /><br />// --- MyGaze definition<br />class MyGaze : public gtl::IGazeListener<br />{<br />public:<br />MyGaze();<br />~MyGaze();<br />private:<br />// IGazeListener<br />void on_gaze_data( gtl::GazeData const &amp; gaze_data );<br />private:<br />gtl::GazeApi m_api;<br />};<br /><br />// --- MyGaze implementation<br />MyGaze::MyGaze()<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 />}<br /><br />MyGaze::~MyGaze()<br />{<br />m_api.remove_listener( *this );<br />m_api.disconnect();<br />}<br /><br /><br />void MyGaze::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; smoothedCoordinatesLeftEye = gaze_data.lefteye.avg; // smoothed data from left eye<br />gtl::Point2D const &amp; smoothedCoordinatesRightEye=gaze_data.righteye.avg; // smoothed data from right eye<br /><br />LeftEyeX=smoothedCoordinatesLeftEye.x;<br />LeftEyeY=smoothedCoordinatesLeftEye.y;<br />      <br />RightEyeX=smoothedCoordinatesRightEye.x;<br />RightEyeY=smoothedCoordinatesRightEye.y;<br /><br />// Move GUI point, do hit-testing, log coordinates, etc.<br />cout &lt;&lt; &quot;x = &quot; &lt;&lt; (LeftEyeX+ RightEyeX)/2&lt;&lt; &quot; y = &quot; &lt;&lt; (LeftEyeY+RightEyeY)/2 &lt;&lt; endl; //center values for left and right eyes, respectively.<br />}<br />}<br /><br />int main()<br />{<br /><br />MyGaze test;<br /><br />while (1)<br />{<br /><br />}<br /><br />return 0;<br />}<br /></code></dd></dl><br /><br />but I want to get coordinate separately.<br />After getting 5 or some coordinate while I staring at a point, I want to average those data and go to next point.<br />like this<br /><br />(5 coordinate data)-&gt;(avg1)-&gt;(5 coordinate data)-&gt;(avg2)-&gt;(using avg1 and avg2, make a vector)-&gt;(5 coordinate data)-&gt;(avg3)-&gt;.., so on<br />so, I want to make 4 vectors.<br />making vector data is simple procedure but getting coordinate separately is not easy for me.<br /><br />please help <img src="http://theeyetribe.com/forum/images/smilies/icon_e_sad.gif" alt=":(" title="Sad" /><p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=8012">skatatictoc3493@naver.com</a> — 06 May 2015, 09:27</p><hr />
]]></content>
</entry>
</feed>