Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

311 lines
15 KiB

5 years ago
  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.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>0.9.9 API documenation: GLM_GTC_random</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
  24. <td id="projectalign" style="padding-left: 0.5em;">
  25. <div id="projectname">0.9.9 API documenation
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.14 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. </div><!-- top -->
  50. <!-- window showing the filter options -->
  51. <div id="MSearchSelectWindow"
  52. onmouseover="return searchBox.OnSearchSelectShow()"
  53. onmouseout="return searchBox.OnSearchSelectHide()"
  54. onkeydown="return searchBox.OnSearchSelectKey(event)">
  55. </div>
  56. <!-- iframe showing the search results (closed by default) -->
  57. <div id="MSearchResultsWindow">
  58. <iframe src="javascript:void(0)" frameborder="0"
  59. name="MSearchResults" id="MSearchResults">
  60. </iframe>
  61. </div>
  62. <div class="header">
  63. <div class="summary">
  64. <a href="#func-members">Functions</a> </div>
  65. <div class="headertitle">
  66. <div class="title">GLM_GTC_random<div class="ingroups"><a class="el" href="a00704.html">Recommended extensions</a></div></div> </div>
  67. </div><!--header-->
  68. <div class="contents">
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  71. Functions</h2></td></tr>
  72. <tr class="memitem:ga7c53b7797f3147af68a11c767679fa3f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  73. <tr class="memitem:ga7c53b7797f3147af68a11c767679fa3f"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 3, T, defaultp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga7c53b7797f3147af68a11c767679fa3f">ballRand</a> (T Radius)</td></tr>
  74. <tr class="separator:ga7c53b7797f3147af68a11c767679fa3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:ga9dd05c36025088fae25b97c869e88517"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  76. <tr class="memitem:ga9dd05c36025088fae25b97c869e88517"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 2, T, defaultp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga9dd05c36025088fae25b97c869e88517">circularRand</a> (T Radius)</td></tr>
  77. <tr class="separator:ga9dd05c36025088fae25b97c869e88517"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:gaa0b18071f3f97dbf8bcf6f53c6fe5f73"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  79. <tr class="memitem:gaa0b18071f3f97dbf8bcf6f53c6fe5f73"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 2, T, defaultp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#gaa0b18071f3f97dbf8bcf6f53c6fe5f73">diskRand</a> (T Radius)</td></tr>
  80. <tr class="separator:gaa0b18071f3f97dbf8bcf6f53c6fe5f73"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:ga5193a83e49e4fdc5652c084711083574"><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
  82. <tr class="memitem:ga5193a83e49e4fdc5652c084711083574"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL genType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga5193a83e49e4fdc5652c084711083574">gaussRand</a> (genType Mean, genType Deviation)</td></tr>
  83. <tr class="separator:ga5193a83e49e4fdc5652c084711083574"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ga04e241ab88374a477a2c2ceadd2fa03d"><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
  85. <tr class="memitem:ga04e241ab88374a477a2c2ceadd2fa03d"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL genType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga04e241ab88374a477a2c2ceadd2fa03d">linearRand</a> (genType Min, genType Max)</td></tr>
  86. <tr class="separator:ga04e241ab88374a477a2c2ceadd2fa03d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ga94731130c298a9ff5e5025fdee6d97a0"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  88. <tr class="memitem:ga94731130c298a9ff5e5025fdee6d97a0"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; L, T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga94731130c298a9ff5e5025fdee6d97a0">linearRand</a> (vec&lt; L, T, Q &gt; const &amp;Min, vec&lt; L, T, Q &gt; const &amp;Max)</td></tr>
  89. <tr class="separator:ga94731130c298a9ff5e5025fdee6d97a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:ga22f90fcaccdf001c516ca90f6428e138"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  91. <tr class="memitem:ga22f90fcaccdf001c516ca90f6428e138"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 3, T, defaultp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00717.html#ga22f90fcaccdf001c516ca90f6428e138">sphericalRand</a> (T Radius)</td></tr>
  92. <tr class="separator:ga22f90fcaccdf001c516ca90f6428e138"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table>
  94. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  95. <p>Include &lt;<a class="el" href="a00422.html" title="GLM_GTC_random ">glm/gtc/random.hpp</a>&gt; to use the features of this extension. </p>
  96. <p>Generate random number from various distribution methods. </p>
  97. <h2 class="groupheader">Function Documentation</h2>
  98. <a id="ga7c53b7797f3147af68a11c767679fa3f"></a>
  99. <h2 class="memtitle"><span class="permalink"><a href="#ga7c53b7797f3147af68a11c767679fa3f">&#9670;&nbsp;</a></span>ballRand()</h2>
  100. <div class="memitem">
  101. <div class="memproto">
  102. <table class="memname">
  103. <tr>
  104. <td class="memname">GLM_FUNC_DECL vec&lt;3, T, defaultp&gt; glm::ballRand </td>
  105. <td>(</td>
  106. <td class="paramtype">T&#160;</td>
  107. <td class="paramname"><em>Radius</em></td><td>)</td>
  108. <td></td>
  109. </tr>
  110. </table>
  111. </div><div class="memdoc">
  112. <p>Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius. </p>
  113. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  114. </div>
  115. </div>
  116. <a id="ga9dd05c36025088fae25b97c869e88517"></a>
  117. <h2 class="memtitle"><span class="permalink"><a href="#ga9dd05c36025088fae25b97c869e88517">&#9670;&nbsp;</a></span>circularRand()</h2>
  118. <div class="memitem">
  119. <div class="memproto">
  120. <table class="memname">
  121. <tr>
  122. <td class="memname">GLM_FUNC_DECL vec&lt;2, T, defaultp&gt; glm::circularRand </td>
  123. <td>(</td>
  124. <td class="paramtype">T&#160;</td>
  125. <td class="paramname"><em>Radius</em></td><td>)</td>
  126. <td></td>
  127. </tr>
  128. </table>
  129. </div><div class="memdoc">
  130. <p>Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius. </p>
  131. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  132. </div>
  133. </div>
  134. <a id="gaa0b18071f3f97dbf8bcf6f53c6fe5f73"></a>
  135. <h2 class="memtitle"><span class="permalink"><a href="#gaa0b18071f3f97dbf8bcf6f53c6fe5f73">&#9670;&nbsp;</a></span>diskRand()</h2>
  136. <div class="memitem">
  137. <div class="memproto">
  138. <table class="memname">
  139. <tr>
  140. <td class="memname">GLM_FUNC_DECL vec&lt;2, T, defaultp&gt; glm::diskRand </td>
  141. <td>(</td>
  142. <td class="paramtype">T&#160;</td>
  143. <td class="paramname"><em>Radius</em></td><td>)</td>
  144. <td></td>
  145. </tr>
  146. </table>
  147. </div><div class="memdoc">
  148. <p>Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius. </p>
  149. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  150. </div>
  151. </div>
  152. <a id="ga5193a83e49e4fdc5652c084711083574"></a>
  153. <h2 class="memtitle"><span class="permalink"><a href="#ga5193a83e49e4fdc5652c084711083574">&#9670;&nbsp;</a></span>gaussRand()</h2>
  154. <div class="memitem">
  155. <div class="memproto">
  156. <table class="memname">
  157. <tr>
  158. <td class="memname">GLM_FUNC_DECL genType glm::gaussRand </td>
  159. <td>(</td>
  160. <td class="paramtype">genType&#160;</td>
  161. <td class="paramname"><em>Mean</em>, </td>
  162. </tr>
  163. <tr>
  164. <td class="paramkey"></td>
  165. <td></td>
  166. <td class="paramtype">genType&#160;</td>
  167. <td class="paramname"><em>Deviation</em>&#160;</td>
  168. </tr>
  169. <tr>
  170. <td></td>
  171. <td>)</td>
  172. <td></td><td></td>
  173. </tr>
  174. </table>
  175. </div><div class="memdoc">
  176. <p>Generate random numbers in the interval [Min, Max], according a gaussian distribution. </p>
  177. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  178. </div>
  179. </div>
  180. <a id="ga04e241ab88374a477a2c2ceadd2fa03d"></a>
  181. <h2 class="memtitle"><span class="permalink"><a href="#ga04e241ab88374a477a2c2ceadd2fa03d">&#9670;&nbsp;</a></span>linearRand() <span class="overload">[1/2]</span></h2>
  182. <div class="memitem">
  183. <div class="memproto">
  184. <table class="memname">
  185. <tr>
  186. <td class="memname">GLM_FUNC_DECL genType glm::linearRand </td>
  187. <td>(</td>
  188. <td class="paramtype">genType&#160;</td>
  189. <td class="paramname"><em>Min</em>, </td>
  190. </tr>
  191. <tr>
  192. <td class="paramkey"></td>
  193. <td></td>
  194. <td class="paramtype">genType&#160;</td>
  195. <td class="paramname"><em>Max</em>&#160;</td>
  196. </tr>
  197. <tr>
  198. <td></td>
  199. <td>)</td>
  200. <td></td><td></td>
  201. </tr>
  202. </table>
  203. </div><div class="memdoc">
  204. <p>Generate random numbers in the interval [Min, Max], according a linear distribution. </p>
  205. <dl class="params"><dt>Parameters</dt><dd>
  206. <table class="params">
  207. <tr><td class="paramname">Min</td><td>Minimum value included in the sampling </td></tr>
  208. <tr><td class="paramname">Max</td><td>Maximum value included in the sampling </td></tr>
  209. </table>
  210. </dd>
  211. </dl>
  212. <dl class="tparams"><dt>Template Parameters</dt><dd>
  213. <table class="tparams">
  214. <tr><td class="paramname">genType</td><td>Value type. Currently supported: float or double scalars. </td></tr>
  215. </table>
  216. </dd>
  217. </dl>
  218. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  219. </div>
  220. </div>
  221. <a id="ga94731130c298a9ff5e5025fdee6d97a0"></a>
  222. <h2 class="memtitle"><span class="permalink"><a href="#ga94731130c298a9ff5e5025fdee6d97a0">&#9670;&nbsp;</a></span>linearRand() <span class="overload">[2/2]</span></h2>
  223. <div class="memitem">
  224. <div class="memproto">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">GLM_FUNC_DECL vec&lt;L, T, Q&gt; glm::linearRand </td>
  228. <td>(</td>
  229. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  230. <td class="paramname"><em>Min</em>, </td>
  231. </tr>
  232. <tr>
  233. <td class="paramkey"></td>
  234. <td></td>
  235. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  236. <td class="paramname"><em>Max</em>&#160;</td>
  237. </tr>
  238. <tr>
  239. <td></td>
  240. <td>)</td>
  241. <td></td><td></td>
  242. </tr>
  243. </table>
  244. </div><div class="memdoc">
  245. <p>Generate random numbers in the interval [Min, Max], according a linear distribution. </p>
  246. <dl class="params"><dt>Parameters</dt><dd>
  247. <table class="params">
  248. <tr><td class="paramname">Min</td><td>Minimum value included in the sampling </td></tr>
  249. <tr><td class="paramname">Max</td><td>Maximum value included in the sampling </td></tr>
  250. </table>
  251. </dd>
  252. </dl>
  253. <dl class="tparams"><dt>Template Parameters</dt><dd>
  254. <table class="tparams">
  255. <tr><td class="paramname">T</td><td>Value type. Currently supported: float or double.</td></tr>
  256. </table>
  257. </dd>
  258. </dl>
  259. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  260. </div>
  261. </div>
  262. <a id="ga22f90fcaccdf001c516ca90f6428e138"></a>
  263. <h2 class="memtitle"><span class="permalink"><a href="#ga22f90fcaccdf001c516ca90f6428e138">&#9670;&nbsp;</a></span>sphericalRand()</h2>
  264. <div class="memitem">
  265. <div class="memproto">
  266. <table class="memname">
  267. <tr>
  268. <td class="memname">GLM_FUNC_DECL vec&lt;3, T, defaultp&gt; glm::sphericalRand </td>
  269. <td>(</td>
  270. <td class="paramtype">T&#160;</td>
  271. <td class="paramname"><em>Radius</em></td><td>)</td>
  272. <td></td>
  273. </tr>
  274. </table>
  275. </div><div class="memdoc">
  276. <p>Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius. </p>
  277. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00717.html" title="Include &lt;glm/gtc/random.hpp&gt; to use the features of this extension. ">GLM_GTC_random</a> </dd></dl>
  278. </div>
  279. </div>
  280. </div><!-- contents -->
  281. <!-- start footer part -->
  282. <hr class="footer"/><address class="footer"><small>
  283. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  284. <img class="footer" src="doxygen.png" alt="doxygen"/>
  285. </a> 1.8.14
  286. </small></address>
  287. </body>
  288. </html>