PVRTQuaternion_8h-source.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>PowerVR SDK</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. <table width="100%">
  7. <tr>
  8. <td width="33%">
  9. <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
  10. </td>
  11. <td width="33%">
  12. <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
  13. </td>
  14. <td width="34%">
  15. <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
  16. </td>
  17. </tr>
  18. </table>
  19. <hr>
  20. </head><body>
  21. <!-- Generated by Doxygen 1.3.6 -->
  22. <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
  23. <h1>PVRTQuaternion.h</h1><a href="PVRTQuaternion_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
  24. 00002 <span class="comment"></span>
  25. 00003 <span class="comment"> @File PVRTQuaternion.h</span>
  26. 00004 <span class="comment"></span>
  27. 00005 <span class="comment"> @Title PVRTQuaternion</span>
  28. 00006 <span class="comment"></span>
  29. 00007 <span class="comment"> @Version </span>
  30. 00008 <span class="comment"></span>
  31. 00009 <span class="comment"> @Copyright Copyright (C) Imagination Technologies Limited.</span>
  32. 00010 <span class="comment"></span>
  33. 00011 <span class="comment"> @Platform ANSI compatible</span>
  34. 00012 <span class="comment"></span>
  35. 00013 <span class="comment"> @Description Quaternion functions for floating and fixed point math.</span>
  36. 00014 <span class="comment"></span>
  37. 00015 <span class="comment">******************************************************************************/</span>
  38. 00016 <span class="preprocessor">#ifndef _PVRTQUATERNION_H_</span>
  39. 00017 <span class="preprocessor"></span><span class="preprocessor">#define _PVRTQUATERNION_H_</span>
  40. 00018 <span class="preprocessor"></span>
  41. 00019 <span class="preprocessor">#include "<a class="code" href="PVRTGlobal_8h.html">PVRTGlobal.h</a>"</span>
  42. 00020 <span class="preprocessor">#include "<a class="code" href="PVRTMatrix_8h.html">PVRTMatrix.h</a>"</span>
  43. 00021
  44. 00022 <span class="comment">/****************************************************************************</span>
  45. 00023 <span class="comment">** Typedefs</span>
  46. 00024 <span class="comment">****************************************************************************/</span>
  47. 00025 <span class="comment">/*!***************************************************************************</span>
  48. 00026 <span class="comment"> Floating point Quaternion</span>
  49. 00027 <span class="comment">*****************************************************************************/</span>
  50. <a name="l00028"></a><a class="code" href="structPVRTQUATERNIONf.html">00028</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
  51. 00029 <span class="keyword"></span>{
  52. <a name="l00030"></a><a class="code" href="structPVRTQUATERNIONf.html#o0">00030</a> <span class="keywordtype">float</span> x;
  53. <a name="l00031"></a><a class="code" href="structPVRTQUATERNIONf.html#o1">00031</a> <span class="keywordtype">float</span> y;
  54. <a name="l00032"></a><a class="code" href="structPVRTQUATERNIONf.html#o2">00032</a> <span class="keywordtype">float</span> z;
  55. <a name="l00033"></a><a class="code" href="structPVRTQUATERNIONf.html#o3">00033</a> <span class="keywordtype">float</span> w;
  56. 00034 } <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a>;
  57. 00035 <span class="comment">/*!***************************************************************************</span>
  58. 00036 <span class="comment"> Fixed point Quaternion</span>
  59. 00037 <span class="comment">*****************************************************************************/</span>
  60. <a name="l00038"></a><a class="code" href="structPVRTQUATERNIONx.html">00038</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
  61. 00039 <span class="keyword"></span>{
  62. <a name="l00040"></a><a class="code" href="structPVRTQUATERNIONx.html#o0">00040</a> <span class="keywordtype">int</span> x;
  63. <a name="l00041"></a><a class="code" href="structPVRTQUATERNIONx.html#o1">00041</a> <span class="keywordtype">int</span> y;
  64. <a name="l00042"></a><a class="code" href="structPVRTQUATERNIONx.html#o2">00042</a> <span class="keywordtype">int</span> z;
  65. <a name="l00043"></a><a class="code" href="structPVRTQUATERNIONx.html#o3">00043</a> <span class="keywordtype">int</span> w;
  66. 00044 } <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a>;
  67. 00045
  68. 00046 <span class="comment">/****************************************************************************</span>
  69. 00047 <span class="comment">** Float or fixed</span>
  70. 00048 <span class="comment">****************************************************************************/</span>
  71. 00049 <span class="preprocessor">#ifdef PVRT_FIXED_POINT_ENABLE</span>
  72. 00050 <span class="preprocessor"></span><span class="keyword">typedef</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNION</a>;
  73. 00051 <span class="preprocessor">#define PVRTMatrixQuaternionIdentity PVRTMatrixQuaternionIdentityX</span>
  74. 00052 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionRotationAxis PVRTMatrixQuaternionRotationAxisX</span>
  75. 00053 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionToAxisAngle PVRTMatrixQuaternionToAxisAngleX</span>
  76. 00054 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionSlerp PVRTMatrixQuaternionSlerpX</span>
  77. 00055 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionNormalize PVRTMatrixQuaternionNormalizeX</span>
  78. 00056 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixRotationQuaternion PVRTMatrixRotationQuaternionX</span>
  79. 00057 <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionMultiply PVRTMatrixQuaternionMultiplyX</span>
  80. 00058 <span class="preprocessor"></span><span class="preprocessor">#else</span>
  81. <a name="l00059"></a><a class="code" href="PVRTQuaternion_8h.html#a7">00059</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> <a class="code" href="PVRTQuaternion_8h.html#a7">PVRTQUATERNION</a>;
  82. <a name="l00060"></a><a class="code" href="PVRTQuaternion_8h.html#a0">00060</a> <span class="preprocessor">#define PVRTMatrixQuaternionIdentity PVRTMatrixQuaternionIdentityF</span>
  83. <a name="l00061"></a><a class="code" href="PVRTQuaternion_8h.html#a1">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionRotationAxis PVRTMatrixQuaternionRotationAxisF</span>
  84. <a name="l00062"></a><a class="code" href="PVRTQuaternion_8h.html#a2">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionToAxisAngle PVRTMatrixQuaternionToAxisAngleF</span>
  85. <a name="l00063"></a><a class="code" href="PVRTQuaternion_8h.html#a3">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionSlerp PVRTMatrixQuaternionSlerpF</span>
  86. <a name="l00064"></a><a class="code" href="PVRTQuaternion_8h.html#a4">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionNormalize PVRTMatrixQuaternionNormalizeF</span>
  87. <a name="l00065"></a><a class="code" href="PVRTQuaternion_8h.html#a5">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixRotationQuaternion PVRTMatrixRotationQuaternionF</span>
  88. <a name="l00066"></a><a class="code" href="PVRTQuaternion_8h.html#a6">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define PVRTMatrixQuaternionMultiply PVRTMatrixQuaternionMultiplyF</span>
  89. 00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  90. 00068 <span class="preprocessor"></span>
  91. 00069 <span class="comment">/****************************************************************************</span>
  92. 00070 <span class="comment">** Functions</span>
  93. 00071 <span class="comment">****************************************************************************/</span>
  94. 00072
  95. 00073 <span class="comment">/*!***************************************************************************</span>
  96. 00074 <span class="comment"> @Function PVRTMatrixQuaternionIdentityF</span>
  97. 00075 <span class="comment"> @Output qOut Identity quaternion</span>
  98. 00076 <span class="comment"> @Description Sets the quaternion to (0, 0, 0, 1), the identity quaternion.</span>
  99. 00077 <span class="comment">*****************************************************************************/</span>
  100. 00078 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a8">PVRTMatrixQuaternionIdentityF</a>(
  101. 00079 <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qOut);
  102. 00080
  103. 00081 <span class="comment">/*!***************************************************************************</span>
  104. 00082 <span class="comment"> @Function PVRTMatrixQuaternionIdentityX</span>
  105. 00083 <span class="comment"> @Output qOut Identity quaternion</span>
  106. 00084 <span class="comment"> @Description Sets the quaternion to (0, 0, 0, 1), the identity quaternion.</span>
  107. 00085 <span class="comment">*****************************************************************************/</span>
  108. 00086 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a9">PVRTMatrixQuaternionIdentityX</a>(
  109. 00087 <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qOut);
  110. 00088
  111. 00089 <span class="comment">/*!***************************************************************************</span>
  112. 00090 <span class="comment"> @Function PVRTMatrixQuaternionRotationAxisF</span>
  113. 00091 <span class="comment"> @Output qOut Rotation quaternion</span>
  114. 00092 <span class="comment"> @Input vAxis Axis to rotate around</span>
  115. 00093 <span class="comment"> @Input fAngle Angle to rotate</span>
  116. 00094 <span class="comment"> @Description Create quaternion corresponding to a rotation of fAngle</span>
  117. 00095 <span class="comment"> radians around submitted vector.</span>
  118. 00096 <span class="comment">*****************************************************************************/</span>
  119. 00097 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a10">PVRTMatrixQuaternionRotationAxisF</a>(
  120. 00098 <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qOut,
  121. 00099 <span class="keyword">const</span> <a class="code" href="structPVRTVECTOR3f.html">PVRTVECTOR3f</a> &amp;vAxis,
  122. 00100 <span class="keyword">const</span> <span class="keywordtype">float</span> fAngle);
  123. 00101
  124. 00102 <span class="comment">/*!***************************************************************************</span>
  125. 00103 <span class="comment"> @Function PVRTMatrixQuaternionRotationAxisX</span>
  126. 00104 <span class="comment"> @Output qOut Rotation quaternion</span>
  127. 00105 <span class="comment"> @Input vAxis Axis to rotate around</span>
  128. 00106 <span class="comment"> @Input fAngle Angle to rotate</span>
  129. 00107 <span class="comment"> @Description Create quaternion corresponding to a rotation of fAngle</span>
  130. 00108 <span class="comment"> radians around submitted vector.</span>
  131. 00109 <span class="comment">*****************************************************************************/</span>
  132. 00110 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a11">PVRTMatrixQuaternionRotationAxisX</a>(
  133. 00111 <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qOut,
  134. 00112 <span class="keyword">const</span> <a class="code" href="structPVRTVECTOR3x.html">PVRTVECTOR3x</a> &amp;vAxis,
  135. 00113 <span class="keyword">const</span> <span class="keywordtype">int</span> fAngle);
  136. 00114
  137. 00115
  138. 00116 <span class="comment">/*!***************************************************************************</span>
  139. 00117 <span class="comment"> @Function PVRTMatrixQuaternionToAxisAngleF</span>
  140. 00118 <span class="comment"> @Input qIn Quaternion to transform</span>
  141. 00119 <span class="comment"> @Output vAxis Axis of rotation</span>
  142. 00120 <span class="comment"> @Output fAngle Angle of rotation</span>
  143. 00121 <span class="comment"> @Description Convert a quaternion to an axis and angle. Expects a unit</span>
  144. 00122 <span class="comment"> quaternion.</span>
  145. 00123 <span class="comment">*****************************************************************************/</span>
  146. 00124 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a12">PVRTMatrixQuaternionToAxisAngleF</a>(
  147. 00125 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qIn,
  148. 00126 <a class="code" href="structPVRTVECTOR3f.html">PVRTVECTOR3f</a> &amp;vAxis,
  149. 00127 <span class="keywordtype">float</span> &amp;fAngle);
  150. 00128
  151. 00129 <span class="comment">/*!***************************************************************************</span>
  152. 00130 <span class="comment"> @Function PVRTMatrixQuaternionToAxisAngleX</span>
  153. 00131 <span class="comment"> @Input qIn Quaternion to transform</span>
  154. 00132 <span class="comment"> @Output vAxis Axis of rotation</span>
  155. 00133 <span class="comment"> @Output fAngle Angle of rotation</span>
  156. 00134 <span class="comment"> @Description Convert a quaternion to an axis and angle. Expects a unit</span>
  157. 00135 <span class="comment"> quaternion.</span>
  158. 00136 <span class="comment">*****************************************************************************/</span>
  159. 00137 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a13">PVRTMatrixQuaternionToAxisAngleX</a>(
  160. 00138 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qIn,
  161. 00139 <a class="code" href="structPVRTVECTOR3x.html">PVRTVECTOR3x</a> &amp;vAxis,
  162. 00140 <span class="keywordtype">int</span> &amp;fAngle);
  163. 00141
  164. 00142 <span class="comment">/*!***************************************************************************</span>
  165. 00143 <span class="comment"> @Function PVRTMatrixQuaternionSlerpF</span>
  166. 00144 <span class="comment"> @Output qOut Result of the interpolation</span>
  167. 00145 <span class="comment"> @Input qA First quaternion to interpolate from</span>
  168. 00146 <span class="comment"> @Input qB Second quaternion to interpolate from</span>
  169. 00147 <span class="comment"> @Input t Coefficient of interpolation</span>
  170. 00148 <span class="comment"> @Description Perform a Spherical Linear intERPolation between quaternion A</span>
  171. 00149 <span class="comment"> and quaternion B at time t. t must be between 0.0f and 1.0f</span>
  172. 00150 <span class="comment">*****************************************************************************/</span>
  173. 00151 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a14">PVRTMatrixQuaternionSlerpF</a>(
  174. 00152 <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qOut,
  175. 00153 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qA,
  176. 00154 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qB,
  177. 00155 <span class="keyword">const</span> <span class="keywordtype">float</span> t);
  178. 00156
  179. 00157 <span class="comment">/*!***************************************************************************</span>
  180. 00158 <span class="comment"> @Function PVRTMatrixQuaternionSlerpX</span>
  181. 00159 <span class="comment"> @Output qOut Result of the interpolation</span>
  182. 00160 <span class="comment"> @Input qA First quaternion to interpolate from</span>
  183. 00161 <span class="comment"> @Input qB Second quaternion to interpolate from</span>
  184. 00162 <span class="comment"> @Input t Coefficient of interpolation</span>
  185. 00163 <span class="comment"> @Description Perform a Spherical Linear intERPolation between quaternion A</span>
  186. 00164 <span class="comment"> and quaternion B at time t. t must be between 0.0f and 1.0f</span>
  187. 00165 <span class="comment"> Requires input quaternions to be normalized</span>
  188. 00166 <span class="comment">*****************************************************************************/</span>
  189. 00167 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a15">PVRTMatrixQuaternionSlerpX</a>(
  190. 00168 <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qOut,
  191. 00169 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qA,
  192. 00170 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qB,
  193. 00171 <span class="keyword">const</span> <span class="keywordtype">int</span> t);
  194. 00172
  195. 00173 <span class="comment">/*!***************************************************************************</span>
  196. 00174 <span class="comment"> @Function PVRTMatrixQuaternionNormalizeF</span>
  197. 00175 <span class="comment"> @Modified quat Vector to normalize</span>
  198. 00176 <span class="comment"> @Description Normalize quaternion.</span>
  199. 00177 <span class="comment">*****************************************************************************/</span>
  200. 00178 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a16">PVRTMatrixQuaternionNormalizeF</a>(<a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;quat);
  201. 00179
  202. 00180 <span class="comment">/*!***************************************************************************</span>
  203. 00181 <span class="comment"> @Function PVRTMatrixQuaternionNormalizeX</span>
  204. 00182 <span class="comment"> @Modified quat Vector to normalize</span>
  205. 00183 <span class="comment"> @Description Normalize quaternion.</span>
  206. 00184 <span class="comment"> Original quaternion is scaled down prior to be normalized in</span>
  207. 00185 <span class="comment"> order to avoid overflow issues.</span>
  208. 00186 <span class="comment">*****************************************************************************/</span>
  209. 00187 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a17">PVRTMatrixQuaternionNormalizeX</a>(<a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;quat);
  210. 00188
  211. 00189 <span class="comment">/*!***************************************************************************</span>
  212. 00190 <span class="comment"> @Function PVRTMatrixRotationQuaternionF</span>
  213. 00191 <span class="comment"> @Output mOut Resulting rotation matrix</span>
  214. 00192 <span class="comment"> @Input quat Quaternion to transform</span>
  215. 00193 <span class="comment"> @Description Create rotation matrix from submitted quaternion.</span>
  216. 00194 <span class="comment"> Assuming the quaternion is of the form [X Y Z W]:</span>
  217. 00195 <span class="comment"></span>
  218. 00196 <span class="comment"> | 2 2 |</span>
  219. 00197 <span class="comment"> | 1 - 2Y - 2Z 2XY - 2ZW 2XZ + 2YW 0 |</span>
  220. 00198 <span class="comment"> | |</span>
  221. 00199 <span class="comment"> | 2 2 |</span>
  222. 00200 <span class="comment"> M = | 2XY + 2ZW 1 - 2X - 2Z 2YZ - 2XW 0 |</span>
  223. 00201 <span class="comment"> | |</span>
  224. 00202 <span class="comment"> | 2 2 |</span>
  225. 00203 <span class="comment"> | 2XZ - 2YW 2YZ + 2XW 1 - 2X - 2Y 0 |</span>
  226. 00204 <span class="comment"> | |</span>
  227. 00205 <span class="comment"> | 0 0 0 1 |</span>
  228. 00206 <span class="comment">*****************************************************************************/</span>
  229. 00207 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a18">PVRTMatrixRotationQuaternionF</a>(
  230. 00208 <a class="code" href="classPVRTMATRIXf.html">PVRTMATRIXf</a> &amp;mOut,
  231. 00209 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;quat);
  232. 00210
  233. 00211 <span class="comment">/*!***************************************************************************</span>
  234. 00212 <span class="comment"> @Function PVRTMatrixRotationQuaternionX</span>
  235. 00213 <span class="comment"> @Output mOut Resulting rotation matrix</span>
  236. 00214 <span class="comment"> @Input quat Quaternion to transform</span>
  237. 00215 <span class="comment"> @Description Create rotation matrix from submitted quaternion.</span>
  238. 00216 <span class="comment"> Assuming the quaternion is of the form [X Y Z W]:</span>
  239. 00217 <span class="comment"></span>
  240. 00218 <span class="comment"> | 2 2 |</span>
  241. 00219 <span class="comment"> | 1 - 2Y - 2Z 2XY - 2ZW 2XZ + 2YW 0 |</span>
  242. 00220 <span class="comment"> | |</span>
  243. 00221 <span class="comment"> | 2 2 |</span>
  244. 00222 <span class="comment"> M = | 2XY + 2ZW 1 - 2X - 2Z 2YZ - 2XW 0 |</span>
  245. 00223 <span class="comment"> | |</span>
  246. 00224 <span class="comment"> | 2 2 |</span>
  247. 00225 <span class="comment"> | 2XZ - 2YW 2YZ + 2XW 1 - 2X - 2Y 0 |</span>
  248. 00226 <span class="comment"> | |</span>
  249. 00227 <span class="comment"> | 0 0 0 1 |</span>
  250. 00228 <span class="comment">*****************************************************************************/</span>
  251. 00229 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a19">PVRTMatrixRotationQuaternionX</a>(
  252. 00230 <a class="code" href="classPVRTMATRIXx.html">PVRTMATRIXx</a> &amp;mOut,
  253. 00231 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;quat);
  254. 00232
  255. 00233 <span class="comment">/*!***************************************************************************</span>
  256. 00234 <span class="comment"> @Function PVRTMatrixQuaternionMultiplyF</span>
  257. 00235 <span class="comment"> @Output qOut Resulting quaternion</span>
  258. 00236 <span class="comment"> @Input qA First quaternion to multiply</span>
  259. 00237 <span class="comment"> @Input qB Second quaternion to multiply</span>
  260. 00238 <span class="comment"> @Description Multiply quaternion A with quaternion B and return the</span>
  261. 00239 <span class="comment"> result in qOut.</span>
  262. 00240 <span class="comment">*****************************************************************************/</span>
  263. 00241 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a20">PVRTMatrixQuaternionMultiplyF</a>(
  264. 00242 <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qOut,
  265. 00243 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qA,
  266. 00244 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONf.html">PVRTQUATERNIONf</a> &amp;qB);
  267. 00245
  268. 00246 <span class="comment">/*!***************************************************************************</span>
  269. 00247 <span class="comment"> @Function PVRTMatrixQuaternionMultiplyX</span>
  270. 00248 <span class="comment"> @Output qOut Resulting quaternion</span>
  271. 00249 <span class="comment"> @Input qA First quaternion to multiply</span>
  272. 00250 <span class="comment"> @Input qB Second quaternion to multiply</span>
  273. 00251 <span class="comment"> @Description Multiply quaternion A with quaternion B and return the</span>
  274. 00252 <span class="comment"> result in qOut.</span>
  275. 00253 <span class="comment"> Input quaternions must be normalized.</span>
  276. 00254 <span class="comment">*****************************************************************************/</span>
  277. 00255 <span class="keywordtype">void</span> <a class="code" href="PVRTQuaternion_8h.html#a21">PVRTMatrixQuaternionMultiplyX</a>(
  278. 00256 <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qOut,
  279. 00257 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qA,
  280. 00258 <span class="keyword">const</span> <a class="code" href="structPVRTQUATERNIONx.html">PVRTQUATERNIONx</a> &amp;qB);
  281. 00259
  282. 00260 <span class="preprocessor">#endif</span>
  283. 00261 <span class="preprocessor"></span>
  284. 00262 <span class="comment">/*****************************************************************************</span>
  285. 00263 <span class="comment"> End of file (PVRTQuaternion.h)</span>
  286. 00264 <span class="comment">*****************************************************************************/</span>
  287. 00265
  288. </pre></div><br>
  289. <br>
  290. <P align=left><FONT size=2><STRONG><A
  291. href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> ©
  292. 1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
  293. <hr>
  294. <address style="align: left;"><small><FONT color=f0f>
  295. Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
  296. </body>
  297. </html>