{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Point Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::Point" -->
<p><a href="classpp_1_1_point-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a0175483c538fdf65c7bd056f0dc25b90">Point</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a18c7d4691920879ed45bde20b79c8d76">Point</a> (int32_t in_x, int32_t in_y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a3d572a358d2f3ce860bc7d0406e1c1da">Point</a> (const PP_Point &point)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#abd093db1c01b63642cf8a8b73620626e">~Point</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a2d5803331cba5ef9f6fea1dca3fb0773">operator PP_Point</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const PP_Point & </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a1e25e160421a213924a4956a1d8da8b8">pp_point</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Point & </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#afff81b0164d11767c03a49e8e6ee3509">pp_point</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a802963acd6223e5520c4e93a0ae7c1ab">x</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a1282f3331d3565beafd7e939d6ffcac7">set_x</a> (int32_t in_x)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a870a9bfcf7a54c18f4e5f382f69fc60d">y</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#af3e1a26a8dd635d8c77c5f86d81deb3c">set_y</a> (int32_t in_y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a7f2e778a029a9c6303f9606c165bcd73">operator+</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &other) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a098ba0a739056bec9da6706e7be28f2b">operator-</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &other) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a560a8ea46bd77f995f201437e78c26a9">operator+=</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_point.html">Point</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a94cb2c93b7ab92c441bb4fc49a4223a3">operator-=</a> (const <a class="el" href="classpp_1_1_point.html">Point</a> &other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_point.html#a197414e35cbd23b762fb04cb39bb2296">swap</a> (<a class="el" href="classpp_1_1_point.html">Point</a> &other)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A 2 dimensional point with 0,0 being the upper-left starting coordinate. </p>
</div><hr /><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a0175483c538fdf65c7bd056f0dc25b90"></a><!-- doxytag: member="pp::Point::Point" ref="a0175483c538fdf65c7bd056f0dc25b90" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html#a0175483c538fdf65c7bd056f0dc25b90">pp::Point::Point</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The default constructor for a point at 0,0. </p>
</div>
</div>
<a class="anchor" id="a18c7d4691920879ed45bde20b79c8d76"></a><!-- doxytag: member="pp::Point::Point" ref="a18c7d4691920879ed45bde20b79c8d76" args="(int32_t in_x, int32_t in_y)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html#a0175483c538fdf65c7bd056f0dc25b90">pp::Point::Point</a> </td>
<td>(</td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>in_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>in_y</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting two int32_t values for x and y and converting them to a <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">in_x</td><td>An int32_t value representing a horizontal coordinate of a point, starting with 0 as the left-most coordinate. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">in_y</td><td>An int32_t value representing a vertical coordinate of a point, starting with 0 as the top-most coordinate. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3d572a358d2f3ce860bc7d0406e1c1da"></a><!-- doxytag: member="pp::Point::Point" ref="a3d572a358d2f3ce860bc7d0406e1c1da" args="(const PP_Point &point)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html#a0175483c538fdf65c7bd056f0dc25b90">pp::Point::Point</a> </td>
<td>(</td>
<td class="paramtype">const PP_Point & </td>
<td class="paramname"><em>point</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor accepting a pointer to a PP_Point and converting the PP_Point to a <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </p>
<p>This is an implicit conversion constructor.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">point</td><td>A pointer to a PP_Point. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="abd093db1c01b63642cf8a8b73620626e"></a><!-- doxytag: member="pp::Point::~Point" ref="abd093db1c01b63642cf8a8b73620626e" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html#abd093db1c01b63642cf8a8b73620626e">pp::Point::~Point</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="a2d5803331cba5ef9f6fea1dca3fb0773"></a><!-- doxytag: member="pp::Point::operator PP_Point" ref="a2d5803331cba5ef9f6fea1dca3fb0773" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pp::Point::operator PP_Point </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A function allowing implicit conversion of a <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> to a PP_Point. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a7f2e778a029a9c6303f9606c165bcd73"></a><!-- doxytag: member="pp::Point::operator+" ref="a7f2e778a029a9c6303f9606c165bcd73" args="(const Point &other) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> pp::Point::operator+ </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Adds two Points (this and other) together by adding their x values and y values. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> containing the result. </dd></dl>
</div>
</div>
<a class="anchor" id="a560a8ea46bd77f995f201437e78c26a9"></a><!-- doxytag: member="pp::Point::operator+=" ref="a560a8ea46bd77f995f201437e78c26a9" args="(const Point &other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a>& pp::Point::operator+= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Adds two Points (this and other) together by adding their x and y values. </p>
<p>Returns this point as the result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>This <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> containing the result. </dd></dl>
</div>
</div>
<a class="anchor" id="a098ba0a739056bec9da6706e7be28f2b"></a><!-- doxytag: member="pp::Point::operator-" ref="a098ba0a739056bec9da6706e7be28f2b" args="(const Point &other) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a> pp::Point::operator- </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Subtracts one <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> from another <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> by subtracting their x values and y values. </p>
<p>Returns a new point with the result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> containing the result. </dd></dl>
</div>
</div>
<a class="anchor" id="a94cb2c93b7ab92c441bb4fc49a4223a3"></a><!-- doxytag: member="pp::Point::operator-=" ref="a94cb2c93b7ab92c441bb4fc49a4223a3" args="(const Point &other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_point.html">Point</a>& pp::Point::operator-= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_point.html">Point</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Subtracts one <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> from another <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> by subtracting their x values and y values. </p>
<p>Returns this point as the result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>This <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a> containing the result. </dd></dl>
</div>
</div>
<a class="anchor" id="a1e25e160421a213924a4956a1d8da8b8"></a><!-- doxytag: member="pp::Point::pp_point" ref="a1e25e160421a213924a4956a1d8da8b8" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const PP_Point& <a class="el" href="classpp_1_1_point.html#a1e25e160421a213924a4956a1d8da8b8">pp::Point::pp_point</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the internal PP_Point struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A const reference to the internal PP_Point struct. </dd></dl>
</div>
</div>
<a class="anchor" id="afff81b0164d11767c03a49e8e6ee3509"></a><!-- doxytag: member="pp::Point::pp_point" ref="afff81b0164d11767c03a49e8e6ee3509" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Point& <a class="el" href="classpp_1_1_point.html#a1e25e160421a213924a4956a1d8da8b8">pp::Point::pp_point</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the internal PP_Point struct. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A mutable reference to the PP_Point struct. </dd></dl>
</div>
</div>
<a class="anchor" id="a1282f3331d3565beafd7e939d6ffcac7"></a><!-- doxytag: member="pp::Point::set_x" ref="a1282f3331d3565beafd7e939d6ffcac7" args="(int32_t in_x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_point.html#a1282f3331d3565beafd7e939d6ffcac7">pp::Point::set_x</a> </td>
<td>(</td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>in_x</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of x. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">in_x</td><td>A new x value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af3e1a26a8dd635d8c77c5f86d81deb3c"></a><!-- doxytag: member="pp::Point::set_y" ref="af3e1a26a8dd635d8c77c5f86d81deb3c" args="(int32_t in_y)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_point.html#af3e1a26a8dd635d8c77c5f86d81deb3c">pp::Point::set_y</a> </td>
<td>(</td>
<td class="paramtype">int32_t </td>
<td class="paramname"><em>in_y</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Setter function for setting the value of y. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">in_y</td><td>A new y value. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a197414e35cbd23b762fb04cb39bb2296"></a><!-- doxytag: member="pp::Point::swap" ref="a197414e35cbd23b762fb04cb39bb2296" args="(Point &other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_point.html#a197414e35cbd23b762fb04cb39bb2296">pp::Point::swap</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classpp_1_1_point.html">Point</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Swaps the coordinates of two Points. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a802963acd6223e5520c4e93a0ae7c1ab"></a><!-- doxytag: member="pp::Point::x" ref="a802963acd6223e5520c4e93a0ae7c1ab" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_point.html#a802963acd6223e5520c4e93a0ae7c1ab">pp::Point::x</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of x. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of x for this <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a870a9bfcf7a54c18f4e5f382f69fc60d"></a><!-- doxytag: member="pp::Point::y" ref="a870a9bfcf7a54c18f4e5f382f69fc60d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_point.html#a870a9bfcf7a54c18f4e5f382f69fc60d">pp::Point::y</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getter function for returning the value of y. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value of y for this <a class="el" href="classpp_1_1_point.html" title="A 2 dimensional point with 0,0 being the upper-left starting coordinate.">Point</a>. </dd></dl>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="point_8h.html">point.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}