a00163.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.5"/>
  7. <title>GLM: Vector Relational Functions</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <div id="titlearea">
  16. <table cellspacing="0" cellpadding="0">
  17. <tbody>
  18. <tr style="height: 56px;">
  19. <td style="padding-left: 0.5em;">
  20. <div id="projectname">GLM
  21. &#160;<span id="projectnumber">0.9.5</span>
  22. </div>
  23. </td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. </div>
  28. <!-- end header part -->
  29. <!-- Generated by Doxygen 1.8.5 -->
  30. <div id="navrow1" class="tabs">
  31. <ul class="tablist">
  32. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  33. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  34. <li><a href="modules.html"><span>Modules</span></a></li>
  35. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  36. <li><a href="files.html"><span>Files</span></a></li>
  37. </ul>
  38. </div>
  39. </div><!-- top -->
  40. <div class="header">
  41. <div class="summary">
  42. <a href="#func-members">Functions</a> </div>
  43. <div class="headertitle">
  44. <div class="title">Vector Relational Functions<div class="ingroups"><a class="el" href="a00167.html">GLM Core</a></div></div> </div>
  45. </div><!--header-->
  46. <div class="contents">
  47. <table class="memberdecls">
  48. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  49. Functions</h2></td></tr>
  50. <tr class="memitem:ga14bbc94f2ae2774a1d64d91f8767773e"><td class="memTemplParams" colspan="2">template&lt;precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  51. <tr class="memitem:ga14bbc94f2ae2774a1d64d91f8767773e"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#ga14bbc94f2ae2774a1d64d91f8767773e">all</a> (vecType&lt; bool, P &gt; const &amp;v)</td></tr>
  52. <tr class="separator:ga14bbc94f2ae2774a1d64d91f8767773e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  53. <tr class="memitem:ga632a2644532d9332011c8860400d30b2"><td class="memTemplParams" colspan="2">template&lt;precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  54. <tr class="memitem:ga632a2644532d9332011c8860400d30b2"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#ga632a2644532d9332011c8860400d30b2">any</a> (vecType&lt; bool, P &gt; const &amp;v)</td></tr>
  55. <tr class="separator:ga632a2644532d9332011c8860400d30b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  56. <tr class="memitem:gac9163d451231eb3eaae2c6b3da5add6a"><td class="memTemplParams" colspan="2">template&lt;typename T , precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  57. <tr class="memitem:gac9163d451231eb3eaae2c6b3da5add6a"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vecType&lt; T, P &gt;<br class="typebreak"/>
  58. ::bool_type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#gac9163d451231eb3eaae2c6b3da5add6a">greaterThan</a> (vecType&lt; T, P &gt; const &amp;x, vecType&lt; T, P &gt; const &amp;y)</td></tr>
  59. <tr class="separator:gac9163d451231eb3eaae2c6b3da5add6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. <tr class="memitem:gad1385064aa2fc7aaae37aa95daea9c31"><td class="memTemplParams" colspan="2">template&lt;typename T , precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  61. <tr class="memitem:gad1385064aa2fc7aaae37aa95daea9c31"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vecType&lt; T, P &gt;<br class="typebreak"/>
  62. ::bool_type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#gad1385064aa2fc7aaae37aa95daea9c31">greaterThanEqual</a> (vecType&lt; T, P &gt; const &amp;x, vecType&lt; T, P &gt; const &amp;y)</td></tr>
  63. <tr class="separator:gad1385064aa2fc7aaae37aa95daea9c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
  64. <tr class="memitem:ga2167b22ac086c5791a4740932b62b685"><td class="memTemplParams" colspan="2">template&lt;typename T , precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  65. <tr class="memitem:ga2167b22ac086c5791a4740932b62b685"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vecType&lt; T, P &gt;<br class="typebreak"/>
  66. ::bool_type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#ga2167b22ac086c5791a4740932b62b685">lessThanEqual</a> (vecType&lt; T, P &gt; const &amp;x, vecType&lt; T, P &gt; const &amp;y)</td></tr>
  67. <tr class="separator:ga2167b22ac086c5791a4740932b62b685"><td class="memSeparator" colspan="2">&#160;</td></tr>
  68. <tr class="memitem:ga4329ecbc2ef012c9ec704bd09da1f177"><td class="memTemplParams" colspan="2">template&lt;precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  69. <tr class="memitem:ga4329ecbc2ef012c9ec704bd09da1f177"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vecType&lt; bool, P &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#ga4329ecbc2ef012c9ec704bd09da1f177">not_</a> (vecType&lt; bool, P &gt; const &amp;v)</td></tr>
  70. <tr class="separator:ga4329ecbc2ef012c9ec704bd09da1f177"><td class="memSeparator" colspan="2">&#160;</td></tr>
  71. <tr class="memitem:ga85d7bc5613c4dcc2d5873ec9d6ed4c19"><td class="memTemplParams" colspan="2">template&lt;typename T , precision P, template&lt; typename, precision &gt; class vecType&gt; </td></tr>
  72. <tr class="memitem:ga85d7bc5613c4dcc2d5873ec9d6ed4c19"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vecType&lt; T, P &gt;<br class="typebreak"/>
  73. ::bool_type&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00163.html#ga85d7bc5613c4dcc2d5873ec9d6ed4c19">notEqual</a> (vecType&lt; T, P &gt; const &amp;x, vecType&lt; T, P &gt; const &amp;y)</td></tr>
  74. <tr class="separator:ga85d7bc5613c4dcc2d5873ec9d6ed4c19"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. </table>
  76. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  77. <p>Relational and equality operators (&lt;, &lt;=, &gt;, &gt;=, ==, !=) are defined to operate on scalars and produce scalar Boolean results. </p>
  78. <p>For vector results, use the following built-in functions.</p>
  79. <p>In all cases, the sizes of all the input and return vectors for any particular call must match. </p>
  80. <h2 class="groupheader">Function Documentation</h2>
  81. <a class="anchor" id="ga14bbc94f2ae2774a1d64d91f8767773e"></a>
  82. <div class="memitem">
  83. <div class="memproto">
  84. <table class="memname">
  85. <tr>
  86. <td class="memname">GLM_FUNC_DECL bool glm::all </td>
  87. <td>(</td>
  88. <td class="paramtype">vecType&lt; bool, P &gt; const &amp;&#160;</td>
  89. <td class="paramname"><em>v</em></td><td>)</td>
  90. <td></td>
  91. </tr>
  92. </table>
  93. </div><div class="memdoc">
  94. <p>Returns true if all components of x are true. </p>
  95. <dl class="tparams"><dt>Template Parameters</dt><dd>
  96. <table class="tparams">
  97. <tr><td class="paramname">vecType</td><td>Boolean vector types.</td></tr>
  98. </table>
  99. </dd>
  100. </dl>
  101. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a> </dd>
  102. <dd>
  103. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  104. </div>
  105. </div>
  106. <a class="anchor" id="ga632a2644532d9332011c8860400d30b2"></a>
  107. <div class="memitem">
  108. <div class="memproto">
  109. <table class="memname">
  110. <tr>
  111. <td class="memname">GLM_FUNC_DECL bool glm::any </td>
  112. <td>(</td>
  113. <td class="paramtype">vecType&lt; bool, P &gt; const &amp;&#160;</td>
  114. <td class="paramname"><em>v</em></td><td>)</td>
  115. <td></td>
  116. </tr>
  117. </table>
  118. </div><div class="memdoc">
  119. <p>Returns true if any component of x is true. </p>
  120. <dl class="tparams"><dt>Template Parameters</dt><dd>
  121. <table class="tparams">
  122. <tr><td class="paramname">vecType</td><td>Boolean vector types.</td></tr>
  123. </table>
  124. </dd>
  125. </dl>
  126. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a> </dd>
  127. <dd>
  128. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  129. </div>
  130. </div>
  131. <a class="anchor" id="gac9163d451231eb3eaae2c6b3da5add6a"></a>
  132. <div class="memitem">
  133. <div class="memproto">
  134. <table class="memname">
  135. <tr>
  136. <td class="memname">GLM_FUNC_DECL vecType&lt;T, P&gt;::bool_type glm::greaterThan </td>
  137. <td>(</td>
  138. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  139. <td class="paramname"><em>x</em>, </td>
  140. </tr>
  141. <tr>
  142. <td class="paramkey"></td>
  143. <td></td>
  144. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  145. <td class="paramname"><em>y</em>&#160;</td>
  146. </tr>
  147. <tr>
  148. <td></td>
  149. <td>)</td>
  150. <td></td><td></td>
  151. </tr>
  152. </table>
  153. </div><div class="memdoc">
  154. <p>Returns the component-wise comparison of result x &gt; y. </p>
  155. <dl class="tparams"><dt>Template Parameters</dt><dd>
  156. <table class="tparams">
  157. <tr><td class="paramname">vecType</td><td>Floating-point or integer vector types.</td></tr>
  158. </table>
  159. </dd>
  160. </dl>
  161. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a> </dd>
  162. <dd>
  163. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  164. </div>
  165. </div>
  166. <a class="anchor" id="gad1385064aa2fc7aaae37aa95daea9c31"></a>
  167. <div class="memitem">
  168. <div class="memproto">
  169. <table class="memname">
  170. <tr>
  171. <td class="memname">GLM_FUNC_DECL vecType&lt;T, P&gt;::bool_type glm::greaterThanEqual </td>
  172. <td>(</td>
  173. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  174. <td class="paramname"><em>x</em>, </td>
  175. </tr>
  176. <tr>
  177. <td class="paramkey"></td>
  178. <td></td>
  179. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  180. <td class="paramname"><em>y</em>&#160;</td>
  181. </tr>
  182. <tr>
  183. <td></td>
  184. <td>)</td>
  185. <td></td><td></td>
  186. </tr>
  187. </table>
  188. </div><div class="memdoc">
  189. <p>Returns the component-wise comparison of result x &gt;= y. </p>
  190. <dl class="tparams"><dt>Template Parameters</dt><dd>
  191. <table class="tparams">
  192. <tr><td class="paramname">vecType</td><td>Floating-point or integer vector types.</td></tr>
  193. </table>
  194. </dd>
  195. </dl>
  196. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a> </dd>
  197. <dd>
  198. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  199. </div>
  200. </div>
  201. <a class="anchor" id="ga2167b22ac086c5791a4740932b62b685"></a>
  202. <div class="memitem">
  203. <div class="memproto">
  204. <table class="memname">
  205. <tr>
  206. <td class="memname">GLM_FUNC_DECL vecType&lt;T, P&gt;::bool_type glm::lessThanEqual </td>
  207. <td>(</td>
  208. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  209. <td class="paramname"><em>x</em>, </td>
  210. </tr>
  211. <tr>
  212. <td class="paramkey"></td>
  213. <td></td>
  214. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  215. <td class="paramname"><em>y</em>&#160;</td>
  216. </tr>
  217. <tr>
  218. <td></td>
  219. <td>)</td>
  220. <td></td><td></td>
  221. </tr>
  222. </table>
  223. </div><div class="memdoc">
  224. <p>Returns the component-wise comparison result of x &lt; y. </p>
  225. <dl class="tparams"><dt>Template Parameters</dt><dd>
  226. <table class="tparams">
  227. <tr><td class="paramname">vecType</td><td>Floating-point or integer vector types.</td></tr>
  228. </table>
  229. </dd>
  230. </dl>
  231. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a> </dd>
  232. <dd>
  233. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> Returns the component-wise comparison of result x &lt;= y.</dd></dl>
  234. <dl class="tparams"><dt>Template Parameters</dt><dd>
  235. <table class="tparams">
  236. <tr><td class="paramname">vecType</td><td>Floating-point or integer vector types.</td></tr>
  237. </table>
  238. </dd>
  239. </dl>
  240. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a> </dd>
  241. <dd>
  242. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  243. </div>
  244. </div>
  245. <a class="anchor" id="ga4329ecbc2ef012c9ec704bd09da1f177"></a>
  246. <div class="memitem">
  247. <div class="memproto">
  248. <table class="memname">
  249. <tr>
  250. <td class="memname">GLM_FUNC_DECL vecType&lt;bool, P&gt; glm::not_ </td>
  251. <td>(</td>
  252. <td class="paramtype">vecType&lt; bool, P &gt; const &amp;&#160;</td>
  253. <td class="paramname"><em>v</em></td><td>)</td>
  254. <td></td>
  255. </tr>
  256. </table>
  257. </div><div class="memdoc">
  258. <p>Returns the component-wise logical complement of x. </p>
  259. <p>/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.</p>
  260. <dl class="tparams"><dt>Template Parameters</dt><dd>
  261. <table class="tparams">
  262. <tr><td class="paramname">vecType</td><td>Boolean vector types.</td></tr>
  263. </table>
  264. </dd>
  265. </dl>
  266. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a> </dd>
  267. <dd>
  268. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  269. </div>
  270. </div>
  271. <a class="anchor" id="ga85d7bc5613c4dcc2d5873ec9d6ed4c19"></a>
  272. <div class="memitem">
  273. <div class="memproto">
  274. <table class="memname">
  275. <tr>
  276. <td class="memname">GLM_FUNC_DECL vecType&lt;T, P&gt;::bool_type glm::notEqual </td>
  277. <td>(</td>
  278. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  279. <td class="paramname"><em>x</em>, </td>
  280. </tr>
  281. <tr>
  282. <td class="paramkey"></td>
  283. <td></td>
  284. <td class="paramtype">vecType&lt; T, P &gt; const &amp;&#160;</td>
  285. <td class="paramname"><em>y</em>&#160;</td>
  286. </tr>
  287. <tr>
  288. <td></td>
  289. <td>)</td>
  290. <td></td><td></td>
  291. </tr>
  292. </table>
  293. </div><div class="memdoc">
  294. <p>Returns the component-wise comparison of result x == y. </p>
  295. <dl class="tparams"><dt>Template Parameters</dt><dd>
  296. <table class="tparams">
  297. <tr><td class="paramname">vecType</td><td>Floating-point, integer or boolean vector types.</td></tr>
  298. </table>
  299. </dd>
  300. </dl>
  301. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a> </dd>
  302. <dd>
  303. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> Returns the component-wise comparison of result x != y.</dd></dl>
  304. <dl class="tparams"><dt>Template Parameters</dt><dd>
  305. <table class="tparams">
  306. <tr><td class="paramname">vecType</td><td>Floating-point, integer or boolean vector types.</td></tr>
  307. </table>
  308. </dd>
  309. </dl>
  310. <dl class="section see"><dt>See Also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a> </dd>
  311. <dd>
  312. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> </dd></dl>
  313. </div>
  314. </div>
  315. </div><!-- contents -->
  316. <!-- start footer part -->
  317. <hr class="footer"/><address class="footer"><small>
  318. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  319. <img class="footer" src="doxygen.png" alt="doxygen"/>
  320. </a> 1.8.5
  321. </small></address>
  322. </body>
  323. </html>