879 lines
44 KiB
HTML
879 lines
44 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>SFML - Simple and Fast Multimedia Library</title>
|
|
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
<meta charset="utf-8"/>
|
|
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">SFML 2.5.1</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1Vector2.html">Vector2</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-attribs">Public Attributes</a> |
|
|
<a href="#related">Related Functions</a> |
|
|
<a href="classsf_1_1Vector2-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">sf::Vector2< T > Class Template Reference<div class="ingroups"><a class="el" href="group__system.html">System module</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Utility template class for manipulating 2-dimensional vectors.
|
|
<a href="classsf_1_1Vector2.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="Vector2_8hpp_source.html">Vector2.hpp</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a58c32383b5291380db4b43a289f75988"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a58c32383b5291380db4b43a289f75988">Vector2</a> ()</td></tr>
|
|
<tr class="memdesc:a58c32383b5291380db4b43a289f75988"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a58c32383b5291380db4b43a289f75988">More...</a><br /></td></tr>
|
|
<tr class="separator:a58c32383b5291380db4b43a289f75988"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aed26a72164e59e8a4a0aeee2049568f1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#aed26a72164e59e8a4a0aeee2049568f1">Vector2</a> (T X, T Y)</td></tr>
|
|
<tr class="memdesc:aed26a72164e59e8a4a0aeee2049568f1"><td class="mdescLeft"> </td><td class="mdescRight">Construct the vector from its coordinates. <a href="#aed26a72164e59e8a4a0aeee2049568f1">More...</a><br /></td></tr>
|
|
<tr class="separator:aed26a72164e59e8a4a0aeee2049568f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3da455e0ae3f8ff6d2fe36d10b332d10"><td class="memTemplParams" colspan="2">template<typename U > </td></tr>
|
|
<tr class="memitem:a3da455e0ae3f8ff6d2fe36d10b332d10"><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a3da455e0ae3f8ff6d2fe36d10b332d10">Vector2</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< U > &vector)</td></tr>
|
|
<tr class="memdesc:a3da455e0ae3f8ff6d2fe36d10b332d10"><td class="mdescLeft"> </td><td class="mdescRight">Construct the vector from another type of vector. <a href="#a3da455e0ae3f8ff6d2fe36d10b332d10">More...</a><br /></td></tr>
|
|
<tr class="separator:a3da455e0ae3f8ff6d2fe36d10b332d10"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
|
Public Attributes</h2></td></tr>
|
|
<tr class="memitem:a1e6ad77fa155f3753bfb92699bd28141"><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a1e6ad77fa155f3753bfb92699bd28141">x</a></td></tr>
|
|
<tr class="memdesc:a1e6ad77fa155f3753bfb92699bd28141"><td class="mdescLeft"> </td><td class="mdescRight">X coordinate of the vector. <a href="#a1e6ad77fa155f3753bfb92699bd28141">More...</a><br /></td></tr>
|
|
<tr class="separator:a1e6ad77fa155f3753bfb92699bd28141"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a420f2481b015f4eb929c75f2af564299"><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a420f2481b015f4eb929c75f2af564299">y</a></td></tr>
|
|
<tr class="memdesc:a420f2481b015f4eb929c75f2af564299"><td class="mdescLeft"> </td><td class="mdescRight">Y coordinate of the vector. <a href="#a420f2481b015f4eb929c75f2af564299">More...</a><br /></td></tr>
|
|
<tr class="separator:a420f2481b015f4eb929c75f2af564299"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
|
|
Related Functions</h2></td></tr>
|
|
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
|
|
</td></tr>
|
|
<tr class="memitem:a3885c2e66dc427cec7eaa178d59d8e8b"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a3885c2e66dc427cec7eaa178d59d8e8b"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a3885c2e66dc427cec7eaa178d59d8e8b">operator-</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:a3885c2e66dc427cec7eaa178d59d8e8b"><td class="mdescLeft"> </td><td class="mdescRight">Overload of unary operator -. <a href="#a3885c2e66dc427cec7eaa178d59d8e8b">More...</a><br /></td></tr>
|
|
<tr class="separator:a3885c2e66dc427cec7eaa178d59d8e8b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad4b7a9d355d57790bfc7df0ade8bb628"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ad4b7a9d355d57790bfc7df0ade8bb628"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#ad4b7a9d355d57790bfc7df0ade8bb628">operator+=</a> (<a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:ad4b7a9d355d57790bfc7df0ade8bb628"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator +=. <a href="#ad4b7a9d355d57790bfc7df0ade8bb628">More...</a><br /></td></tr>
|
|
<tr class="separator:ad4b7a9d355d57790bfc7df0ade8bb628"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a30a5a12ad03c9a3a982a0a313bf84e6f"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a30a5a12ad03c9a3a982a0a313bf84e6f"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a30a5a12ad03c9a3a982a0a313bf84e6f">operator-=</a> (<a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:a30a5a12ad03c9a3a982a0a313bf84e6f"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator -=. <a href="#a30a5a12ad03c9a3a982a0a313bf84e6f">More...</a><br /></td></tr>
|
|
<tr class="separator:a30a5a12ad03c9a3a982a0a313bf84e6f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a72421239823c38a6b780c86a710ead07"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a72421239823c38a6b780c86a710ead07"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a72421239823c38a6b780c86a710ead07">operator+</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:a72421239823c38a6b780c86a710ead07"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator +. <a href="#a72421239823c38a6b780c86a710ead07">More...</a><br /></td></tr>
|
|
<tr class="separator:a72421239823c38a6b780c86a710ead07"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad027adae53ec547a86c20deeb05c9e85"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ad027adae53ec547a86c20deeb05c9e85"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#ad027adae53ec547a86c20deeb05c9e85">operator-</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:ad027adae53ec547a86c20deeb05c9e85"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator -. <a href="#ad027adae53ec547a86c20deeb05c9e85">More...</a><br /></td></tr>
|
|
<tr class="separator:ad027adae53ec547a86c20deeb05c9e85"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5f48ca928995b41c89f155afe8d16b02"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a5f48ca928995b41c89f155afe8d16b02"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a5f48ca928995b41c89f155afe8d16b02">operator*</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, T right)</td></tr>
|
|
<tr class="memdesc:a5f48ca928995b41c89f155afe8d16b02"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator *. <a href="#a5f48ca928995b41c89f155afe8d16b02">More...</a><br /></td></tr>
|
|
<tr class="separator:a5f48ca928995b41c89f155afe8d16b02"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad8b3e1cf7b156a984bc1427539ca8605"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ad8b3e1cf7b156a984bc1427539ca8605"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#ad8b3e1cf7b156a984bc1427539ca8605">operator*</a> (T left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:ad8b3e1cf7b156a984bc1427539ca8605"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator *. <a href="#ad8b3e1cf7b156a984bc1427539ca8605">More...</a><br /></td></tr>
|
|
<tr class="separator:ad8b3e1cf7b156a984bc1427539ca8605"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abea24cb28c0d6e2957e259ba4e65d70e"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:abea24cb28c0d6e2957e259ba4e65d70e"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#abea24cb28c0d6e2957e259ba4e65d70e">operator*=</a> (<a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, T right)</td></tr>
|
|
<tr class="memdesc:abea24cb28c0d6e2957e259ba4e65d70e"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator *=. <a href="#abea24cb28c0d6e2957e259ba4e65d70e">More...</a><br /></td></tr>
|
|
<tr class="separator:abea24cb28c0d6e2957e259ba4e65d70e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7409dd89cb3aad6c3bc6622311107311"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a7409dd89cb3aad6c3bc6622311107311"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a7409dd89cb3aad6c3bc6622311107311">operator/</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, T right)</td></tr>
|
|
<tr class="memdesc:a7409dd89cb3aad6c3bc6622311107311"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator /. <a href="#a7409dd89cb3aad6c3bc6622311107311">More...</a><br /></td></tr>
|
|
<tr class="separator:a7409dd89cb3aad6c3bc6622311107311"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac4d293c9dc7954ccfd5e373972f38b03"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:ac4d293c9dc7954ccfd5e373972f38b03"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#ac4d293c9dc7954ccfd5e373972f38b03">operator/=</a> (<a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, T right)</td></tr>
|
|
<tr class="memdesc:ac4d293c9dc7954ccfd5e373972f38b03"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator /=. <a href="#ac4d293c9dc7954ccfd5e373972f38b03">More...</a><br /></td></tr>
|
|
<tr class="separator:ac4d293c9dc7954ccfd5e373972f38b03"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9a7b2d36c3850828fdb651facfd25136"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a9a7b2d36c3850828fdb651facfd25136"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a9a7b2d36c3850828fdb651facfd25136">operator==</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:a9a7b2d36c3850828fdb651facfd25136"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator ==. <a href="#a9a7b2d36c3850828fdb651facfd25136">More...</a><br /></td></tr>
|
|
<tr class="separator:a9a7b2d36c3850828fdb651facfd25136"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a01673da35ef9c52d0e54b8263549a956"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
|
<tr class="memitem:a01673da35ef9c52d0e54b8263549a956"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsf_1_1Vector2.html#a01673da35ef9c52d0e54b8263549a956">operator!=</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &left, const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > &right)</td></tr>
|
|
<tr class="memdesc:a01673da35ef9c52d0e54b8263549a956"><td class="mdescLeft"> </td><td class="mdescRight">Overload of binary operator !=. <a href="#a01673da35ef9c52d0e54b8263549a956">More...</a><br /></td></tr>
|
|
<tr class="separator:a01673da35ef9c52d0e54b8263549a956"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><h3>template<typename T><br />
|
|
class sf::Vector2< T ></h3>
|
|
|
|
<p>Utility template class for manipulating 2-dimensional vectors. </p>
|
|
<p><a class="el" href="classsf_1_1Vector2.html" title="Utility template class for manipulating 2-dimensional vectors. ">sf::Vector2</a> is a simple class that defines a mathematical vector with two coordinates (x and y).</p>
|
|
<p>It can be used to represent anything that has two dimensions: a size, a point, a velocity, etc.</p>
|
|
<p>The template parameter T is the type of the coordinates. It can be any type that supports arithmetic operations (+, -, /, *) and comparisons (==, !=), for example int or float.</p>
|
|
<p>You generally don't have to care about the templated form (sf::Vector2<T>), the most common specializations have special typedefs: </p><ul>
|
|
<li>sf::Vector2<float> is sf::Vector2f </li>
|
|
<li>sf::Vector2<int> is sf::Vector2i </li>
|
|
<li>sf::Vector2<unsigned int> is sf::Vector2u</li>
|
|
</ul>
|
|
<p>The <a class="el" href="classsf_1_1Vector2.html" title="Utility template class for manipulating 2-dimensional vectors. ">sf::Vector2</a> class has a small and simple interface, its x and y members can be accessed directly (there are no accessors like setX(), getX()) and it contains no mathematical function like dot product, cross product, length, etc.</p>
|
|
<p>Usage example: </p><div class="fragment"><div class="line"><a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a> v1(16.5f, 24.f);</div><div class="line">v1.x = 18.2f;</div><div class="line"><span class="keywordtype">float</span> <a class="code" href="classsf_1_1Vector2.html#a420f2481b015f4eb929c75f2af564299">y</a> = v1.y;</div><div class="line"></div><div class="line"><a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a> v2 = v1 * 5.f;</div><div class="line"><a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a> v3;</div><div class="line">v3 = v1 + v2;</div><div class="line"></div><div class="line"><span class="keywordtype">bool</span> different = (v2 != v3);</div></div><!-- fragment --><p>Note: for 3-dimensional vectors, see <a class="el" href="classsf_1_1Vector3.html" title="Utility template class for manipulating 3-dimensional vectors. ">sf::Vector3</a>. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="Vector2_8hpp_source.html#l00037">37</a> of file <a class="el" href="Vector2_8hpp_source.html">Vector2.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a58c32383b5291380db4b43a289f75988"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a58c32383b5291380db4b43a289f75988">◆ </a></span>Vector2() <span class="overload">[1/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">sf::Vector2</a>< T >::<a class="el" href="classsf_1_1Vector2.html">Vector2</a> </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<p>Creates a Vector2(0, 0). </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aed26a72164e59e8a4a0aeee2049568f1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aed26a72164e59e8a4a0aeee2049568f1">◆ </a></span>Vector2() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">sf::Vector2</a>< T >::<a class="el" href="classsf_1_1Vector2.html">Vector2</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>X</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>Y</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct the vector from its coordinates. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">X</td><td>X coordinate </td></tr>
|
|
<tr><td class="paramname">Y</td><td>Y coordinate </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3da455e0ae3f8ff6d2fe36d10b332d10"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3da455e0ae3f8ff6d2fe36d10b332d10">◆ </a></span>Vector2() <span class="overload">[3/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T> </div>
|
|
<div class="memtemplate">
|
|
template<typename U > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">sf::Vector2</a>< T >::<a class="el" href="classsf_1_1Vector2.html">Vector2</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< U > & </td>
|
|
<td class="paramname"><em>vector</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct the vector from another type of vector. </p>
|
|
<p>This constructor doesn't replace the copy constructor, it's called only when U != T. A call to this constructor will fail to compile if U is not convertible to T.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">vector</td><td>Vector to convert </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Friends And Related Function Documentation</h2>
|
|
<a id="a01673da35ef9c52d0e54b8263549a956"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a01673da35ef9c52d0e54b8263549a956">◆ </a></span>operator!=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool operator!= </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator !=. </p>
|
|
<p>This operator compares strict difference between two vectors.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if <em>left</em> is not equal to <em>right</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5f48ca928995b41c89f155afe8d16b02"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5f48ca928995b41c89f155afe8d16b02">◆ </a></span>operator*() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator* </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator *. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a scalar value)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise multiplication by <em>right</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad8b3e1cf7b156a984bc1427539ca8605"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad8b3e1cf7b156a984bc1427539ca8605">◆ </a></span>operator*() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator* </td>
|
|
<td>(</td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator *. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a scalar value) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise multiplication by <em>left</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abea24cb28c0d6e2957e259ba4e65d70e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abea24cb28c0d6e2957e259ba4e65d70e">◆ </a></span>operator*=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & operator*= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator *=. </p>
|
|
<p>This operator performs a memberwise multiplication by <em>right</em>, and assigns the result to <em>left</em>.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a scalar value)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to <em>left</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a72421239823c38a6b780c86a710ead07"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a72421239823c38a6b780c86a710ead07">◆ </a></span>operator+()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator+ </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator +. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise addition of both vectors </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad4b7a9d355d57790bfc7df0ade8bb628"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad4b7a9d355d57790bfc7df0ade8bb628">◆ </a></span>operator+=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & operator+= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator +=. </p>
|
|
<p>This operator performs a memberwise addition of both vectors, and assigns the result to <em>left</em>.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to <em>left</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3885c2e66dc427cec7eaa178d59d8e8b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3885c2e66dc427cec7eaa178d59d8e8b">◆ </a></span>operator-() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator- </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of unary operator -. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">right</td><td>Vector to negate</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise opposite of the vector </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad027adae53ec547a86c20deeb05c9e85"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad027adae53ec547a86c20deeb05c9e85">◆ </a></span>operator-() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator- </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator -. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise subtraction of both vectors </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a30a5a12ad03c9a3a982a0a313bf84e6f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a30a5a12ad03c9a3a982a0a313bf84e6f">◆ </a></span>operator-=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & operator-= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator -=. </p>
|
|
<p>This operator performs a memberwise subtraction of both vectors, and assigns the result to <em>left</em>.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to <em>left</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7409dd89cb3aad6c3bc6622311107311"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7409dd89cb3aad6c3bc6622311107311">◆ </a></span>operator/()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > operator/ </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator /. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a scalar value)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Memberwise division by <em>right</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac4d293c9dc7954ccfd5e373972f38b03"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac4d293c9dc7954ccfd5e373972f38b03">◆ </a></span>operator/=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & operator/= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">T </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator /=. </p>
|
|
<p>This operator performs a memberwise division by <em>right</em>, and assigns the result to <em>left</em>.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a scalar value)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to <em>left</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9a7b2d36c3850828fdb651facfd25136"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9a7b2d36c3850828fdb651facfd25136">◆ </a></span>operator==()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool operator== </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>left</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2</a>< T > & </td>
|
|
<td class="paramname"><em>right</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">related</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of binary operator ==. </p>
|
|
<p>This operator compares strict equality between two vectors.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">left</td><td>Left operand (a vector) </td></tr>
|
|
<tr><td class="paramname">right</td><td>Right operand (a vector)</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if <em>left</em> is equal to <em>right</em> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="a1e6ad77fa155f3753bfb92699bd28141"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1e6ad77fa155f3753bfb92699bd28141">◆ </a></span>x</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">T <a class="el" href="classsf_1_1Vector2.html">sf::Vector2</a>< T >::x</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>X coordinate of the vector. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="Vector2_8hpp_source.html#l00075">75</a> of file <a class="el" href="Vector2_8hpp_source.html">Vector2.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a420f2481b015f4eb929c75f2af564299"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a420f2481b015f4eb929c75f2af564299">◆ </a></span>y</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<typename T> </div>
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">T <a class="el" href="classsf_1_1Vector2.html">sf::Vector2</a>< T >::y</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Y coordinate of the vector. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="Vector2_8hpp_source.html#l00076">76</a> of file <a class="el" href="Vector2_8hpp_source.html">Vector2.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Vector2_8hpp_source.html">Vector2.hpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
|
|
Copyright © Laurent Gomila ::
|
|
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|