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.

423 lines
20 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: Geometric functions</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">Geometric functions<div class="ingroups"><a class="el" href="a00698.html">Core features</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:gaeeec0794212fe84fc9d261de067c9587"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  73. <tr class="memitem:gaeeec0794212fe84fc9d261de067c9587"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 3, T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00697.html#gaeeec0794212fe84fc9d261de067c9587">cross</a> (vec&lt; 3, T, Q &gt; const &amp;x, vec&lt; 3, T, Q &gt; const &amp;y)</td></tr>
  74. <tr class="separator:gaeeec0794212fe84fc9d261de067c9587"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:gaa68de6c53e20dfb2dac2d20197562e3f"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  76. <tr class="memitem:gaa68de6c53e20dfb2dac2d20197562e3f"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00697.html#gaa68de6c53e20dfb2dac2d20197562e3f">distance</a> (vec&lt; L, T, Q &gt; const &amp;p0, vec&lt; L, T, Q &gt; const &amp;p1)</td></tr>
  77. <tr class="separator:gaa68de6c53e20dfb2dac2d20197562e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:gaad6c5d9d39bdc0bf43baf1b22e147a0a"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  79. <tr class="memitem:gaad6c5d9d39bdc0bf43baf1b22e147a0a"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00697.html#gaad6c5d9d39bdc0bf43baf1b22e147a0a">dot</a> (vec&lt; L, T, Q &gt; const &amp;x, vec&lt; L, T, Q &gt; const &amp;y)</td></tr>
  80. <tr class="separator:gaad6c5d9d39bdc0bf43baf1b22e147a0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:ga7aed0a36c738169402404a3a5d54e43b"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  82. <tr class="memitem:ga7aed0a36c738169402404a3a5d54e43b"><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="a00697.html#ga7aed0a36c738169402404a3a5d54e43b">faceforward</a> (vec&lt; L, T, Q &gt; const &amp;N, vec&lt; L, T, Q &gt; const &amp;I, vec&lt; L, T, Q &gt; const &amp;Nref)</td></tr>
  83. <tr class="separator:ga7aed0a36c738169402404a3a5d54e43b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ga0cdabbb000834d994a1d6dc56f8f5263"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  85. <tr class="memitem:ga0cdabbb000834d994a1d6dc56f8f5263"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00697.html#ga0cdabbb000834d994a1d6dc56f8f5263">length</a> (vec&lt; L, T, Q &gt; const &amp;x)</td></tr>
  86. <tr class="separator:ga0cdabbb000834d994a1d6dc56f8f5263"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ga3b8d3dcae77870781392ed2902cce597"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  88. <tr class="memitem:ga3b8d3dcae77870781392ed2902cce597"><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="a00697.html#ga3b8d3dcae77870781392ed2902cce597">normalize</a> (vec&lt; L, T, Q &gt; const &amp;x)</td></tr>
  89. <tr class="separator:ga3b8d3dcae77870781392ed2902cce597"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:ga5631dd1d5618de5450b1ea3cf3e94905"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  91. <tr class="memitem:ga5631dd1d5618de5450b1ea3cf3e94905"><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="a00697.html#ga5631dd1d5618de5450b1ea3cf3e94905">reflect</a> (vec&lt; L, T, Q &gt; const &amp;I, vec&lt; L, T, Q &gt; const &amp;N)</td></tr>
  92. <tr class="separator:ga5631dd1d5618de5450b1ea3cf3e94905"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:ga01da3dff9e2ef6b9d4915c3047e22b74"><td class="memTemplParams" colspan="2">template&lt;length_t L, typename T , qualifier Q&gt; </td></tr>
  94. <tr class="memitem:ga01da3dff9e2ef6b9d4915c3047e22b74"><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="a00697.html#ga01da3dff9e2ef6b9d4915c3047e22b74">refract</a> (vec&lt; L, T, Q &gt; const &amp;I, vec&lt; L, T, Q &gt; const &amp;N, T eta)</td></tr>
  95. <tr class="separator:ga01da3dff9e2ef6b9d4915c3047e22b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. </table>
  97. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  98. <p>These operate on vectors as vectors, not component-wise. </p>
  99. <p>Include &lt;<a class="el" href="a00383.html" title="Core features ">glm/geometric.hpp</a>&gt; to use these core features. </p>
  100. <h2 class="groupheader">Function Documentation</h2>
  101. <a id="gaeeec0794212fe84fc9d261de067c9587"></a>
  102. <h2 class="memtitle"><span class="permalink"><a href="#gaeeec0794212fe84fc9d261de067c9587">&#9670;&nbsp;</a></span>cross()</h2>
  103. <div class="memitem">
  104. <div class="memproto">
  105. <table class="memname">
  106. <tr>
  107. <td class="memname">GLM_FUNC_DECL vec&lt;3, T, Q&gt; glm::cross </td>
  108. <td>(</td>
  109. <td class="paramtype">vec&lt; 3, T, Q &gt; const &amp;&#160;</td>
  110. <td class="paramname"><em>x</em>, </td>
  111. </tr>
  112. <tr>
  113. <td class="paramkey"></td>
  114. <td></td>
  115. <td class="paramtype">vec&lt; 3, T, Q &gt; const &amp;&#160;</td>
  116. <td class="paramname"><em>y</em>&#160;</td>
  117. </tr>
  118. <tr>
  119. <td></td>
  120. <td>)</td>
  121. <td></td><td></td>
  122. </tr>
  123. </table>
  124. </div><div class="memdoc">
  125. <p>Returns the cross product of x and y. </p>
  126. <dl class="tparams"><dt>Template Parameters</dt><dd>
  127. <table class="tparams">
  128. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  129. </table>
  130. </dd>
  131. </dl>
  132. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a> </dd>
  133. <dd>
  134. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  135. </div>
  136. </div>
  137. <a id="gaa68de6c53e20dfb2dac2d20197562e3f"></a>
  138. <h2 class="memtitle"><span class="permalink"><a href="#gaa68de6c53e20dfb2dac2d20197562e3f">&#9670;&nbsp;</a></span>distance()</h2>
  139. <div class="memitem">
  140. <div class="memproto">
  141. <table class="memname">
  142. <tr>
  143. <td class="memname">GLM_FUNC_DECL T glm::distance </td>
  144. <td>(</td>
  145. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  146. <td class="paramname"><em>p0</em>, </td>
  147. </tr>
  148. <tr>
  149. <td class="paramkey"></td>
  150. <td></td>
  151. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  152. <td class="paramname"><em>p1</em>&#160;</td>
  153. </tr>
  154. <tr>
  155. <td></td>
  156. <td>)</td>
  157. <td></td><td></td>
  158. </tr>
  159. </table>
  160. </div><div class="memdoc">
  161. <p>Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). </p>
  162. <dl class="tparams"><dt>Template Parameters</dt><dd>
  163. <table class="tparams">
  164. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  165. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  166. </table>
  167. </dd>
  168. </dl>
  169. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a> </dd>
  170. <dd>
  171. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  172. </div>
  173. </div>
  174. <a id="gaad6c5d9d39bdc0bf43baf1b22e147a0a"></a>
  175. <h2 class="memtitle"><span class="permalink"><a href="#gaad6c5d9d39bdc0bf43baf1b22e147a0a">&#9670;&nbsp;</a></span>dot()</h2>
  176. <div class="memitem">
  177. <div class="memproto">
  178. <table class="memname">
  179. <tr>
  180. <td class="memname">GLM_FUNC_DECL T glm::dot </td>
  181. <td>(</td>
  182. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  183. <td class="paramname"><em>x</em>, </td>
  184. </tr>
  185. <tr>
  186. <td class="paramkey"></td>
  187. <td></td>
  188. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  189. <td class="paramname"><em>y</em>&#160;</td>
  190. </tr>
  191. <tr>
  192. <td></td>
  193. <td>)</td>
  194. <td></td><td></td>
  195. </tr>
  196. </table>
  197. </div><div class="memdoc">
  198. <p>Returns the dot product of x and y, i.e., result = x * y. </p>
  199. <dl class="tparams"><dt>Template Parameters</dt><dd>
  200. <table class="tparams">
  201. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  202. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  203. </table>
  204. </dd>
  205. </dl>
  206. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a> </dd>
  207. <dd>
  208. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  209. </div>
  210. </div>
  211. <a id="ga7aed0a36c738169402404a3a5d54e43b"></a>
  212. <h2 class="memtitle"><span class="permalink"><a href="#ga7aed0a36c738169402404a3a5d54e43b">&#9670;&nbsp;</a></span>faceforward()</h2>
  213. <div class="memitem">
  214. <div class="memproto">
  215. <table class="memname">
  216. <tr>
  217. <td class="memname">GLM_FUNC_DECL vec&lt;L, T, Q&gt; glm::faceforward </td>
  218. <td>(</td>
  219. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  220. <td class="paramname"><em>N</em>, </td>
  221. </tr>
  222. <tr>
  223. <td class="paramkey"></td>
  224. <td></td>
  225. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  226. <td class="paramname"><em>I</em>, </td>
  227. </tr>
  228. <tr>
  229. <td class="paramkey"></td>
  230. <td></td>
  231. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  232. <td class="paramname"><em>Nref</em>&#160;</td>
  233. </tr>
  234. <tr>
  235. <td></td>
  236. <td>)</td>
  237. <td></td><td></td>
  238. </tr>
  239. </table>
  240. </div><div class="memdoc">
  241. <p>If dot(Nref, I) &lt; 0.0, return N, otherwise, return -N. </p>
  242. <dl class="tparams"><dt>Template Parameters</dt><dd>
  243. <table class="tparams">
  244. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  245. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  246. </table>
  247. </dd>
  248. </dl>
  249. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a> </dd>
  250. <dd>
  251. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  252. </div>
  253. </div>
  254. <a id="ga0cdabbb000834d994a1d6dc56f8f5263"></a>
  255. <h2 class="memtitle"><span class="permalink"><a href="#ga0cdabbb000834d994a1d6dc56f8f5263">&#9670;&nbsp;</a></span>length()</h2>
  256. <div class="memitem">
  257. <div class="memproto">
  258. <table class="memname">
  259. <tr>
  260. <td class="memname">GLM_FUNC_DECL T glm::length </td>
  261. <td>(</td>
  262. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  263. <td class="paramname"><em>x</em></td><td>)</td>
  264. <td></td>
  265. </tr>
  266. </table>
  267. </div><div class="memdoc">
  268. <p>Returns the length of x, i.e., sqrt(x * x). </p>
  269. <dl class="tparams"><dt>Template Parameters</dt><dd>
  270. <table class="tparams">
  271. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  272. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  273. </table>
  274. </dd>
  275. </dl>
  276. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a> </dd>
  277. <dd>
  278. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  279. </div>
  280. </div>
  281. <a id="ga3b8d3dcae77870781392ed2902cce597"></a>
  282. <h2 class="memtitle"><span class="permalink"><a href="#ga3b8d3dcae77870781392ed2902cce597">&#9670;&nbsp;</a></span>normalize()</h2>
  283. <div class="memitem">
  284. <div class="memproto">
  285. <table class="memname">
  286. <tr>
  287. <td class="memname">GLM_FUNC_DECL vec&lt;L, T, Q&gt; glm::normalize </td>
  288. <td>(</td>
  289. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  290. <td class="paramname"><em>x</em></td><td>)</td>
  291. <td></td>
  292. </tr>
  293. </table>
  294. </div><div class="memdoc">
  295. <p>Returns a vector in the same direction as x but with length of 1. </p>
  296. <p>According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.</p>
  297. <dl class="tparams"><dt>Template Parameters</dt><dd>
  298. <table class="tparams">
  299. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  300. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  301. </table>
  302. </dd>
  303. </dl>
  304. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a> </dd>
  305. <dd>
  306. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  307. </div>
  308. </div>
  309. <a id="ga5631dd1d5618de5450b1ea3cf3e94905"></a>
  310. <h2 class="memtitle"><span class="permalink"><a href="#ga5631dd1d5618de5450b1ea3cf3e94905">&#9670;&nbsp;</a></span>reflect()</h2>
  311. <div class="memitem">
  312. <div class="memproto">
  313. <table class="memname">
  314. <tr>
  315. <td class="memname">GLM_FUNC_DECL vec&lt;L, T, Q&gt; glm::reflect </td>
  316. <td>(</td>
  317. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  318. <td class="paramname"><em>I</em>, </td>
  319. </tr>
  320. <tr>
  321. <td class="paramkey"></td>
  322. <td></td>
  323. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  324. <td class="paramname"><em>N</em>&#160;</td>
  325. </tr>
  326. <tr>
  327. <td></td>
  328. <td>)</td>
  329. <td></td><td></td>
  330. </tr>
  331. </table>
  332. </div><div class="memdoc">
  333. <p>For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N. </p>
  334. <dl class="tparams"><dt>Template Parameters</dt><dd>
  335. <table class="tparams">
  336. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  337. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  338. </table>
  339. </dd>
  340. </dl>
  341. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a> </dd>
  342. <dd>
  343. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  344. </div>
  345. </div>
  346. <a id="ga01da3dff9e2ef6b9d4915c3047e22b74"></a>
  347. <h2 class="memtitle"><span class="permalink"><a href="#ga01da3dff9e2ef6b9d4915c3047e22b74">&#9670;&nbsp;</a></span>refract()</h2>
  348. <div class="memitem">
  349. <div class="memproto">
  350. <table class="memname">
  351. <tr>
  352. <td class="memname">GLM_FUNC_DECL vec&lt;L, T, Q&gt; glm::refract </td>
  353. <td>(</td>
  354. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  355. <td class="paramname"><em>I</em>, </td>
  356. </tr>
  357. <tr>
  358. <td class="paramkey"></td>
  359. <td></td>
  360. <td class="paramtype">vec&lt; L, T, Q &gt; const &amp;&#160;</td>
  361. <td class="paramname"><em>N</em>, </td>
  362. </tr>
  363. <tr>
  364. <td class="paramkey"></td>
  365. <td></td>
  366. <td class="paramtype">T&#160;</td>
  367. <td class="paramname"><em>eta</em>&#160;</td>
  368. </tr>
  369. <tr>
  370. <td></td>
  371. <td>)</td>
  372. <td></td><td></td>
  373. </tr>
  374. </table>
  375. </div><div class="memdoc">
  376. <p>For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector. </p>
  377. <dl class="tparams"><dt>Template Parameters</dt><dd>
  378. <table class="tparams">
  379. <tr><td class="paramname">L</td><td>An integer between 1 and 4 included that qualify the dimension of the vector. </td></tr>
  380. <tr><td class="paramname">T</td><td>Floating-point scalar types.</td></tr>
  381. </table>
  382. </dd>
  383. </dl>
  384. <dl class="section see"><dt>See also</dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a> </dd>
  385. <dd>
  386. <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> </dd></dl>
  387. </div>
  388. </div>
  389. </div><!-- contents -->
  390. <!-- start footer part -->
  391. <hr class="footer"/><address class="footer"><small>
  392. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  393. <img class="footer" src="doxygen.png" alt="doxygen"/>
  394. </a> 1.8.14
  395. </small></address>
  396. </body>
  397. </html>