Platformer in OpenGL
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

393 行
18 KiB

5 年前
  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_EXT_quaternion_common</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_EXT_quaternion_common<div class="ingroups"><a class="el" href="a00703.html">Stable 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:ga10d7bda73201788ac2ab28cd8d0d409b"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  73. <tr class="memitem:ga10d7bda73201788ac2ab28cd8d0d409b"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL qua&lt; T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#ga10d7bda73201788ac2ab28cd8d0d409b">conjugate</a> (qua&lt; T, Q &gt; const &amp;q)</td></tr>
  74. <tr class="separator:ga10d7bda73201788ac2ab28cd8d0d409b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:gab41da854ae678e23e114b598cbca4065"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  76. <tr class="memitem:gab41da854ae678e23e114b598cbca4065"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL qua&lt; T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#gab41da854ae678e23e114b598cbca4065">inverse</a> (qua&lt; T, Q &gt; const &amp;q)</td></tr>
  77. <tr class="separator:gab41da854ae678e23e114b598cbca4065"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:ga45722741ea266b4e861938b365c5f362"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  79. <tr class="memitem:ga45722741ea266b4e861938b365c5f362"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 4, bool, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#ga45722741ea266b4e861938b365c5f362">isinf</a> (qua&lt; T, Q &gt; const &amp;x)</td></tr>
  80. <tr class="separator:ga45722741ea266b4e861938b365c5f362"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:ga1bb55f8963616502e96dc564384d8a03"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  82. <tr class="memitem:ga1bb55f8963616502e96dc564384d8a03"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL vec&lt; 4, bool, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#ga1bb55f8963616502e96dc564384d8a03">isnan</a> (qua&lt; T, Q &gt; const &amp;x)</td></tr>
  83. <tr class="separator:ga1bb55f8963616502e96dc564384d8a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:ga6033dc0741051fa463a0a147ba29f293"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  85. <tr class="memitem:ga6033dc0741051fa463a0a147ba29f293"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL qua&lt; T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#ga6033dc0741051fa463a0a147ba29f293">lerp</a> (qua&lt; T, Q &gt; const &amp;x, qua&lt; T, Q &gt; const &amp;y, T a)</td></tr>
  86. <tr class="separator:ga6033dc0741051fa463a0a147ba29f293"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:gafbfe587b8da11fb89a30c3d67dd5ccc2"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  88. <tr class="memitem:gafbfe587b8da11fb89a30c3d67dd5ccc2"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL qua&lt; T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#gafbfe587b8da11fb89a30c3d67dd5ccc2">mix</a> (qua&lt; T, Q &gt; const &amp;x, qua&lt; T, Q &gt; const &amp;y, T a)</td></tr>
  89. <tr class="separator:gafbfe587b8da11fb89a30c3d67dd5ccc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:gae7fc3c945be366b9942b842f55da428a"><td class="memTemplParams" colspan="2">template&lt;typename T , qualifier Q&gt; </td></tr>
  91. <tr class="memitem:gae7fc3c945be366b9942b842f55da428a"><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_DECL qua&lt; T, Q &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00669.html#gae7fc3c945be366b9942b842f55da428a">slerp</a> (qua&lt; T, Q &gt; const &amp;x, qua&lt; T, Q &gt; const &amp;y, T a)</td></tr>
  92. <tr class="separator:gae7fc3c945be366b9942b842f55da428a"><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>Provides common functions for quaternion types. </p>
  96. <p>Include &lt;<a class="el" href="a00203.html" title="GLM_EXT_quaternion_common ">glm/ext/quaternion_common.hpp</a>&gt; to use the features of this extension.</p>
  97. <dl class="section see"><dt>See also</dt><dd><a class="el" href="a00679.html" title="Exposes min and max functions for 3 to 4 scalar parameters. ">GLM_EXT_scalar_common</a> </dd>
  98. <dd>
  99. <a class="el" href="a00687.html" title="Exposes min and max functions for 3 to 4 vector parameters. ">GLM_EXT_vector_common</a> </dd>
  100. <dd>
  101. <a class="el" href="a00673.html" title="Exposes single-precision floating point quaternion type. ">GLM_EXT_quaternion_float</a> </dd>
  102. <dd>
  103. <a class="el" href="a00670.html" title="Exposes double-precision floating point quaternion type. ">GLM_EXT_quaternion_double</a> </dd>
  104. <dd>
  105. <a class="el" href="a00672.html" title="Provides exponential functions for quaternion types. ">GLM_EXT_quaternion_exponential</a> </dd>
  106. <dd>
  107. <a class="el" href="a00675.html" title="Provides geometric functions for quaternion types. ">GLM_EXT_quaternion_geometric</a> </dd>
  108. <dd>
  109. <a class="el" href="a00676.html" title="Exposes comparison functions for quaternion types that take a user defined epsilon values...">GLM_EXT_quaternion_relational</a> </dd>
  110. <dd>
  111. <a class="el" href="a00678.html" title="Provides trigonometric functions for quaternion types. ">GLM_EXT_quaternion_trigonometric</a> </dd>
  112. <dd>
  113. <a class="el" href="a00677.html" title="Provides transformation functions for quaternion types. ">GLM_EXT_quaternion_transform</a> </dd></dl>
  114. <h2 class="groupheader">Function Documentation</h2>
  115. <a id="ga10d7bda73201788ac2ab28cd8d0d409b"></a>
  116. <h2 class="memtitle"><span class="permalink"><a href="#ga10d7bda73201788ac2ab28cd8d0d409b">&#9670;&nbsp;</a></span>conjugate()</h2>
  117. <div class="memitem">
  118. <div class="memproto">
  119. <table class="memname">
  120. <tr>
  121. <td class="memname">GLM_FUNC_DECL qua&lt;T, Q&gt; glm::conjugate </td>
  122. <td>(</td>
  123. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  124. <td class="paramname"><em>q</em></td><td>)</td>
  125. <td></td>
  126. </tr>
  127. </table>
  128. </div><div class="memdoc">
  129. <p>Returns the q conjugate. </p>
  130. <dl class="tparams"><dt>Template Parameters</dt><dd>
  131. <table class="tparams">
  132. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  133. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  134. </table>
  135. </dd>
  136. </dl>
  137. </div>
  138. </div>
  139. <a id="gab41da854ae678e23e114b598cbca4065"></a>
  140. <h2 class="memtitle"><span class="permalink"><a href="#gab41da854ae678e23e114b598cbca4065">&#9670;&nbsp;</a></span>inverse()</h2>
  141. <div class="memitem">
  142. <div class="memproto">
  143. <table class="memname">
  144. <tr>
  145. <td class="memname">GLM_FUNC_DECL qua&lt;T, Q&gt; glm::inverse </td>
  146. <td>(</td>
  147. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  148. <td class="paramname"><em>q</em></td><td>)</td>
  149. <td></td>
  150. </tr>
  151. </table>
  152. </div><div class="memdoc">
  153. <p>Returns the q inverse. </p>
  154. <dl class="tparams"><dt>Template Parameters</dt><dd>
  155. <table class="tparams">
  156. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  157. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  158. </table>
  159. </dd>
  160. </dl>
  161. </div>
  162. </div>
  163. <a id="ga45722741ea266b4e861938b365c5f362"></a>
  164. <h2 class="memtitle"><span class="permalink"><a href="#ga45722741ea266b4e861938b365c5f362">&#9670;&nbsp;</a></span>isinf()</h2>
  165. <div class="memitem">
  166. <div class="memproto">
  167. <table class="memname">
  168. <tr>
  169. <td class="memname">GLM_FUNC_DECL vec&lt;4, bool, Q&gt; glm::isinf </td>
  170. <td>(</td>
  171. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  172. <td class="paramname"><em>x</em></td><td>)</td>
  173. <td></td>
  174. </tr>
  175. </table>
  176. </div><div class="memdoc">
  177. <p>Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations. </p>
  178. <p>Returns false otherwise, including for implementations with no infinity representations.</p>
  179. <dl class="tparams"><dt>Template Parameters</dt><dd>
  180. <table class="tparams">
  181. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  182. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  183. </table>
  184. </dd>
  185. </dl>
  186. </div>
  187. </div>
  188. <a id="ga1bb55f8963616502e96dc564384d8a03"></a>
  189. <h2 class="memtitle"><span class="permalink"><a href="#ga1bb55f8963616502e96dc564384d8a03">&#9670;&nbsp;</a></span>isnan()</h2>
  190. <div class="memitem">
  191. <div class="memproto">
  192. <table class="memname">
  193. <tr>
  194. <td class="memname">GLM_FUNC_DECL vec&lt;4, bool, Q&gt; glm::isnan </td>
  195. <td>(</td>
  196. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  197. <td class="paramname"><em>x</em></td><td>)</td>
  198. <td></td>
  199. </tr>
  200. </table>
  201. </div><div class="memdoc">
  202. <p>Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations. </p>
  203. <p>Returns false otherwise, including for implementations with no NaN representations.</p>
  204. <p>/!\ When using compiler fast math, this function may fail.</p>
  205. <dl class="tparams"><dt>Template Parameters</dt><dd>
  206. <table class="tparams">
  207. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  208. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  209. </table>
  210. </dd>
  211. </dl>
  212. </div>
  213. </div>
  214. <a id="ga6033dc0741051fa463a0a147ba29f293"></a>
  215. <h2 class="memtitle"><span class="permalink"><a href="#ga6033dc0741051fa463a0a147ba29f293">&#9670;&nbsp;</a></span>lerp()</h2>
  216. <div class="memitem">
  217. <div class="memproto">
  218. <table class="memname">
  219. <tr>
  220. <td class="memname">GLM_FUNC_DECL qua&lt;T, Q&gt; glm::lerp </td>
  221. <td>(</td>
  222. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  223. <td class="paramname"><em>x</em>, </td>
  224. </tr>
  225. <tr>
  226. <td class="paramkey"></td>
  227. <td></td>
  228. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  229. <td class="paramname"><em>y</em>, </td>
  230. </tr>
  231. <tr>
  232. <td class="paramkey"></td>
  233. <td></td>
  234. <td class="paramtype">T&#160;</td>
  235. <td class="paramname"><em>a</em>&#160;</td>
  236. </tr>
  237. <tr>
  238. <td></td>
  239. <td>)</td>
  240. <td></td><td></td>
  241. </tr>
  242. </table>
  243. </div><div class="memdoc">
  244. <p>Linear interpolation of two quaternions. </p>
  245. <p>The interpolation is oriented.</p>
  246. <dl class="params"><dt>Parameters</dt><dd>
  247. <table class="params">
  248. <tr><td class="paramname">x</td><td>A quaternion </td></tr>
  249. <tr><td class="paramname">y</td><td>A quaternion </td></tr>
  250. <tr><td class="paramname">a</td><td>Interpolation factor. The interpolation is defined in the range [0, 1].</td></tr>
  251. </table>
  252. </dd>
  253. </dl>
  254. <dl class="tparams"><dt>Template Parameters</dt><dd>
  255. <table class="tparams">
  256. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  257. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  258. </table>
  259. </dd>
  260. </dl>
  261. </div>
  262. </div>
  263. <a id="gafbfe587b8da11fb89a30c3d67dd5ccc2"></a>
  264. <h2 class="memtitle"><span class="permalink"><a href="#gafbfe587b8da11fb89a30c3d67dd5ccc2">&#9670;&nbsp;</a></span>mix()</h2>
  265. <div class="memitem">
  266. <div class="memproto">
  267. <table class="memname">
  268. <tr>
  269. <td class="memname">GLM_FUNC_DECL qua&lt;T, Q&gt; glm::mix </td>
  270. <td>(</td>
  271. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  272. <td class="paramname"><em>x</em>, </td>
  273. </tr>
  274. <tr>
  275. <td class="paramkey"></td>
  276. <td></td>
  277. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  278. <td class="paramname"><em>y</em>, </td>
  279. </tr>
  280. <tr>
  281. <td class="paramkey"></td>
  282. <td></td>
  283. <td class="paramtype">T&#160;</td>
  284. <td class="paramname"><em>a</em>&#160;</td>
  285. </tr>
  286. <tr>
  287. <td></td>
  288. <td>)</td>
  289. <td></td><td></td>
  290. </tr>
  291. </table>
  292. </div><div class="memdoc">
  293. <p>Spherical linear interpolation of two quaternions. </p>
  294. <p>The interpolation is oriented and the rotation is performed at constant speed. For short path spherical linear interpolation, use the slerp function.</p>
  295. <dl class="params"><dt>Parameters</dt><dd>
  296. <table class="params">
  297. <tr><td class="paramname">x</td><td>A quaternion </td></tr>
  298. <tr><td class="paramname">y</td><td>A quaternion </td></tr>
  299. <tr><td class="paramname">a</td><td>Interpolation factor. The interpolation is defined beyond the range [0, 1].</td></tr>
  300. </table>
  301. </dd>
  302. </dl>
  303. <dl class="tparams"><dt>Template Parameters</dt><dd>
  304. <table class="tparams">
  305. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  306. <tr><td class="paramname">Q</td><td>A value from qualifier enum</td></tr>
  307. </table>
  308. </dd>
  309. </dl>
  310. <dl class="section see"><dt>See also</dt><dd>- slerp(qua&lt;T, Q&gt; const&amp; x, qua&lt;T, Q&gt; const&amp; y, T const&amp; a) </dd></dl>
  311. </div>
  312. </div>
  313. <a id="gae7fc3c945be366b9942b842f55da428a"></a>
  314. <h2 class="memtitle"><span class="permalink"><a href="#gae7fc3c945be366b9942b842f55da428a">&#9670;&nbsp;</a></span>slerp()</h2>
  315. <div class="memitem">
  316. <div class="memproto">
  317. <table class="memname">
  318. <tr>
  319. <td class="memname">GLM_FUNC_DECL qua&lt;T, Q&gt; glm::slerp </td>
  320. <td>(</td>
  321. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  322. <td class="paramname"><em>x</em>, </td>
  323. </tr>
  324. <tr>
  325. <td class="paramkey"></td>
  326. <td></td>
  327. <td class="paramtype">qua&lt; T, Q &gt; const &amp;&#160;</td>
  328. <td class="paramname"><em>y</em>, </td>
  329. </tr>
  330. <tr>
  331. <td class="paramkey"></td>
  332. <td></td>
  333. <td class="paramtype">T&#160;</td>
  334. <td class="paramname"><em>a</em>&#160;</td>
  335. </tr>
  336. <tr>
  337. <td></td>
  338. <td>)</td>
  339. <td></td><td></td>
  340. </tr>
  341. </table>
  342. </div><div class="memdoc">
  343. <p>Spherical linear interpolation of two quaternions. </p>
  344. <p>The interpolation always take the short path and the rotation is performed at constant speed.</p>
  345. <dl class="params"><dt>Parameters</dt><dd>
  346. <table class="params">
  347. <tr><td class="paramname">x</td><td>A quaternion </td></tr>
  348. <tr><td class="paramname">y</td><td>A quaternion </td></tr>
  349. <tr><td class="paramname">a</td><td>Interpolation factor. The interpolation is defined beyond the range [0, 1].</td></tr>
  350. </table>
  351. </dd>
  352. </dl>
  353. <dl class="tparams"><dt>Template Parameters</dt><dd>
  354. <table class="tparams">
  355. <tr><td class="paramname">T</td><td>A floating-point scalar type </td></tr>
  356. <tr><td class="paramname">Q</td><td>A value from qualifier enum </td></tr>
  357. </table>
  358. </dd>
  359. </dl>
  360. </div>
  361. </div>
  362. </div><!-- contents -->
  363. <!-- start footer part -->
  364. <hr class="footer"/><address class="footer"><small>
  365. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  366. <img class="footer" src="doxygen.png" alt="doxygen"/>
  367. </a> 1.8.14
  368. </small></address>
  369. </body>
  370. </html>