a00084_source.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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. <title>simd_vec4.hpp Source File</title>
  7. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11. <div id="top"><!-- do not remove this div! -->
  12. <div id="titlearea">
  13. <table cellspacing="0" cellpadding="0">
  14. <tbody>
  15. <tr style="height: 56px;">
  16. <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
  17. </tr>
  18. </tbody>
  19. </table>
  20. </div>
  21. <!-- Generated by Doxygen 1.7.6.1 -->
  22. <div id="navrow1" class="tabs">
  23. <ul class="tablist">
  24. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  25. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  26. <li><a href="modules.html"><span>Modules</span></a></li>
  27. <li><a href="annotated.html"><span>Classes</span></a></li>
  28. <li class="current"><a href="files.html"><span>Files</span></a></li>
  29. </ul>
  30. </div>
  31. <div id="navrow2" class="tabs2">
  32. <ul class="tablist">
  33. <li><a href="files.html"><span>File&#160;List</span></a></li>
  34. </ul>
  35. </div>
  36. </div>
  37. <div class="header">
  38. <div class="headertitle">
  39. <div class="title">simd_vec4.hpp</div> </div>
  40. </div><!--header-->
  41. <div class="contents">
  42. <a href="a00084.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
  43. <a name="l00002"></a>00002
  44. <a name="l00003"></a>00003
  45. <a name="l00004"></a>00004
  46. <a name="l00005"></a>00005
  47. <a name="l00006"></a>00006
  48. <a name="l00007"></a>00007
  49. <a name="l00008"></a>00008
  50. <a name="l00009"></a>00009
  51. <a name="l00010"></a>00010
  52. <a name="l00011"></a>00011
  53. <a name="l00012"></a>00012
  54. <a name="l00013"></a>00013
  55. <a name="l00014"></a>00014
  56. <a name="l00015"></a>00015
  57. <a name="l00016"></a>00016
  58. <a name="l00017"></a>00017
  59. <a name="l00018"></a>00018
  60. <a name="l00019"></a>00019
  61. <a name="l00020"></a>00020
  62. <a name="l00021"></a>00021
  63. <a name="l00022"></a>00022
  64. <a name="l00023"></a>00023
  65. <a name="l00024"></a>00024
  66. <a name="l00025"></a>00025
  67. <a name="l00026"></a>00026
  68. <a name="l00027"></a>00027
  69. <a name="l00028"></a>00028
  70. <a name="l00029"></a>00029
  71. <a name="l00030"></a>00030
  72. <a name="l00031"></a>00031
  73. <a name="l00032"></a>00032
  74. <a name="l00033"></a>00033
  75. <a name="l00034"></a>00034
  76. <a name="l00035"></a>00035
  77. <a name="l00036"></a>00036
  78. <a name="l00037"></a>00037
  79. <a name="l00038"></a>00038 <span class="preprocessor">#ifndef GLM_GTX_simd_vec4</span>
  80. <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define GLM_GTX_simd_vec4 GLM_VERSION</span>
  81. <a name="l00040"></a>00040 <span class="preprocessor"></span>
  82. <a name="l00041"></a>00041 <span class="comment">// Dependency:</span>
  83. <a name="l00042"></a>00042 <span class="preprocessor">#include &quot;../glm.hpp&quot;</span>
  84. <a name="l00043"></a>00043
  85. <a name="l00044"></a>00044 <span class="preprocessor">#if(GLM_ARCH != GLM_ARCH_PURE)</span>
  86. <a name="l00045"></a>00045 <span class="preprocessor"></span>
  87. <a name="l00046"></a>00046 <span class="preprocessor">#if(GLM_ARCH &amp; GLM_ARCH_SSE2)</span>
  88. <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor"># include &quot;../core/intrinsic_common.hpp&quot;</span>
  89. <a name="l00048"></a>00048 <span class="preprocessor"># include &quot;../core/intrinsic_geometric.hpp&quot;</span>
  90. <a name="l00049"></a>00049 <span class="preprocessor">#else</span>
  91. <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor"># error &quot;GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics&quot;</span>
  92. <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  93. <a name="l00052"></a>00052 <span class="preprocessor"></span>
  94. <a name="l00053"></a>00053 <span class="preprocessor">#if(defined(GLM_MESSAGES) &amp;&amp; !defined(glm_ext))</span>
  95. <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor"># pragma message(&quot;GLM: GLM_GTX_simd_vec4 extension included&quot;)</span>
  96. <a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  97. <a name="l00056"></a>00056 <span class="preprocessor"></span>
  98. <a name="l00057"></a>00057 <span class="keyword">namespace </span>glm{
  99. <a name="l00058"></a>00058 <span class="keyword">namespace </span>detail
  100. <a name="l00059"></a>00059 {
  101. <a name="l00062"></a>00062 GLM_ALIGNED_STRUCT(16) fvec4SIMD
  102. <a name="l00063"></a>00063 {
  103. <a name="l00064"></a>00064 <span class="keyword">enum</span> ctor{null};
  104. <a name="l00065"></a>00065 <span class="keyword">typedef</span> __m128 value_type;
  105. <a name="l00066"></a>00066 <span class="keyword">typedef</span> std::size_t size_type;
  106. <a name="l00067"></a>00067 <span class="keyword">static</span> size_type value_size();
  107. <a name="l00068"></a>00068
  108. <a name="l00069"></a>00069 <span class="keyword">typedef</span> fvec4SIMD type;
  109. <a name="l00070"></a>00070 <span class="keyword">typedef</span> tvec4&lt;bool&gt; bool_type;
  110. <a name="l00071"></a>00071
  111. <a name="l00072"></a>00072 __m128 Data;
  112. <a name="l00073"></a>00073
  113. <a name="l00075"></a>00075 <span class="comment">// Implicit basic constructors</span>
  114. <a name="l00076"></a>00076
  115. <a name="l00077"></a>00077 fvec4SIMD();
  116. <a name="l00078"></a>00078 fvec4SIMD(__m128 <span class="keyword">const</span> &amp; Data);
  117. <a name="l00079"></a>00079 fvec4SIMD(fvec4SIMD <span class="keyword">const</span> &amp; v);
  118. <a name="l00080"></a>00080
  119. <a name="l00082"></a>00082 <span class="comment">// Explicit basic constructors</span>
  120. <a name="l00083"></a>00083
  121. <a name="l00084"></a>00084 <span class="keyword">explicit</span> fvec4SIMD(
  122. <a name="l00085"></a>00085 ctor);
  123. <a name="l00086"></a>00086 <span class="keyword">explicit</span> fvec4SIMD(
  124. <a name="l00087"></a>00087 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  125. <a name="l00088"></a>00088 <span class="keyword">explicit</span> fvec4SIMD(
  126. <a name="l00089"></a>00089 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; x,
  127. <a name="l00090"></a>00090 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; y,
  128. <a name="l00091"></a>00091 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; z,
  129. <a name="l00092"></a>00092 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; w);
  130. <a name="l00093"></a>00093 <span class="keyword">explicit</span> fvec4SIMD(
  131. <a name="l00094"></a>00094 tvec4&lt;float&gt; <span class="keyword">const</span> &amp; v);
  132. <a name="l00095"></a>00095
  133. <a name="l00098"></a>00098
  134. <a name="l00099"></a>00099 fvec4SIMD(<a class="code" href="a00138.html#ga80139c81aa2687717598312039cea8d1" title="2 components vector of floating-point numbers.">vec2</a> <span class="keyword">const</span> &amp; v, <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s1, <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s2);
  135. <a name="l00100"></a>00100 fvec4SIMD(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s1, <a class="code" href="a00138.html#ga80139c81aa2687717598312039cea8d1" title="2 components vector of floating-point numbers.">vec2</a> <span class="keyword">const</span> &amp; v, <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s2);
  136. <a name="l00101"></a>00101 fvec4SIMD(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s1, <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s2, <a class="code" href="a00138.html#ga80139c81aa2687717598312039cea8d1" title="2 components vector of floating-point numbers.">vec2</a> <span class="keyword">const</span> &amp; v);
  137. <a name="l00102"></a>00102 fvec4SIMD(<a class="code" href="a00138.html#ga8a44105c47072f9ea1413f15faa31f64" title="3 components vector of floating-point numbers.">vec3</a> <span class="keyword">const</span> &amp; v, <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  138. <a name="l00103"></a>00103 fvec4SIMD(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s, <a class="code" href="a00138.html#ga8a44105c47072f9ea1413f15faa31f64" title="3 components vector of floating-point numbers.">vec3</a> <span class="keyword">const</span> &amp; v);
  139. <a name="l00104"></a>00104 fvec4SIMD(<a class="code" href="a00138.html#ga80139c81aa2687717598312039cea8d1" title="2 components vector of floating-point numbers.">vec2</a> <span class="keyword">const</span> &amp; v1, <a class="code" href="a00138.html#ga80139c81aa2687717598312039cea8d1" title="2 components vector of floating-point numbers.">vec2</a> <span class="keyword">const</span> &amp; v2);
  140. <a name="l00105"></a>00105 <span class="comment">//fvec4SIMD(ivec4SIMD const &amp; v);</span>
  141. <a name="l00106"></a>00106
  142. <a name="l00108"></a>00108 <span class="comment">// Unary arithmetic operators</span>
  143. <a name="l00109"></a>00109
  144. <a name="l00110"></a>00110 fvec4SIMD&amp; operator= (fvec4SIMD <span class="keyword">const</span> &amp; v);
  145. <a name="l00111"></a>00111 fvec4SIMD&amp; operator+=(fvec4SIMD <span class="keyword">const</span> &amp; v);
  146. <a name="l00112"></a>00112 fvec4SIMD&amp; operator-=(fvec4SIMD <span class="keyword">const</span> &amp; v);
  147. <a name="l00113"></a>00113 fvec4SIMD&amp; operator*=(fvec4SIMD <span class="keyword">const</span> &amp; v);
  148. <a name="l00114"></a>00114 fvec4SIMD&amp; operator/=(fvec4SIMD <span class="keyword">const</span> &amp; v);
  149. <a name="l00115"></a>00115
  150. <a name="l00116"></a>00116 fvec4SIMD&amp; operator+=(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  151. <a name="l00117"></a>00117 fvec4SIMD&amp; operator-=(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  152. <a name="l00118"></a>00118 fvec4SIMD&amp; operator*=(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  153. <a name="l00119"></a>00119 fvec4SIMD&amp; operator/=(<span class="keywordtype">float</span> <span class="keyword">const</span> &amp; s);
  154. <a name="l00120"></a>00120
  155. <a name="l00121"></a>00121 fvec4SIMD&amp; operator++();
  156. <a name="l00122"></a>00122 fvec4SIMD&amp; operator--();
  157. <a name="l00123"></a>00123
  158. <a name="l00125"></a>00125 <span class="comment">// Swizzle operators</span>
  159. <a name="l00126"></a>00126
  160. <a name="l00127"></a>00127 <span class="keyword">template</span> &lt;comp X, comp Y, comp Z, comp W&gt;
  161. <a name="l00128"></a>00128 fvec4SIMD&amp; swizzle();
  162. <a name="l00129"></a>00129 <span class="keyword">template</span> &lt;comp X, comp Y, comp Z, comp W&gt;
  163. <a name="l00130"></a>00130 fvec4SIMD swizzle() <span class="keyword">const</span>;
  164. <a name="l00131"></a>00131 <span class="keyword">template</span> &lt;comp X, comp Y, comp Z&gt;
  165. <a name="l00132"></a>00132 fvec4SIMD swizzle() <span class="keyword">const</span>;
  166. <a name="l00133"></a>00133 <span class="keyword">template</span> &lt;comp X, comp Y&gt;
  167. <a name="l00134"></a>00134 fvec4SIMD swizzle() <span class="keyword">const</span>;
  168. <a name="l00135"></a>00135 <span class="keyword">template</span> &lt;comp X&gt;
  169. <a name="l00136"></a>00136 fvec4SIMD swizzle() <span class="keyword">const</span>;
  170. <a name="l00137"></a>00137 };
  171. <a name="l00138"></a>00138 }<span class="comment">//namespace detail</span>
  172. <a name="l00139"></a>00139
  173. <a name="l00140"></a>00140 <span class="keyword">typedef</span> glm::detail::fvec4SIMD simdVec4;
  174. <a name="l00141"></a>00141
  175. <a name="l00144"></a>00144
  176. <a name="l00147"></a>00147 detail::tvec4&lt;float&gt; vec4_cast(
  177. <a name="l00148"></a>00148 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  178. <a name="l00149"></a>00149
  179. <a name="l00152"></a>00152 detail::fvec4SIMD <a class="code" href="a00125.html#gaeca8e195d482248f677e3905d00f11ae" title="Returns x if x &gt;= 0; otherwise, it returns -x.">abs</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  180. <a name="l00153"></a>00153
  181. <a name="l00156"></a>00156 detail::fvec4SIMD <a class="code" href="a00125.html#ga79f412e6d33cb4be13497056c2298d14" title="Returns 1.0 if x &gt; 0, 0.0 if x == 0, or -1.0 if x &lt; 0.">sign</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  182. <a name="l00157"></a>00157
  183. <a name="l00160"></a>00160 detail::fvec4SIMD <a class="code" href="a00125.html#gac3458e950a8a716468866f841a833c77" title="Returns a value equal to the nearest integer that is less then or equal to x.">floor</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  184. <a name="l00161"></a>00161
  185. <a name="l00165"></a>00165 detail::fvec4SIMD <a class="code" href="a00125.html#gae1268fe85d913d9e4054de0e046abaef" title="Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolut...">trunc</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  186. <a name="l00166"></a>00166
  187. <a name="l00173"></a>00173 detail::fvec4SIMD <a class="code" href="a00125.html#ga32125c5451799e80b886ef665b947d0c" title="Returns a value equal to the nearest integer to x.">round</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  188. <a name="l00174"></a>00174
  189. <a name="l00179"></a>00179 <span class="comment">//detail::fvec4SIMD roundEven(detail::fvec4SIMD const &amp; x);</span>
  190. <a name="l00180"></a>00180
  191. <a name="l00184"></a>00184 detail::fvec4SIMD <a class="code" href="a00125.html#ga1ce130f2934cf1d7aca83a7027422f3c" title="Returns a value equal to the nearest integer that is greater than or equal to x.">ceil</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  192. <a name="l00185"></a>00185
  193. <a name="l00188"></a>00188 detail::fvec4SIMD <a class="code" href="a00125.html#gad5e3814491ff6baa4f0d16aebcabff9b" title="Return x - floor(x).">fract</a>(detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  194. <a name="l00189"></a>00189
  195. <a name="l00193"></a>00193 detail::fvec4SIMD <a class="code" href="a00125.html#ga3bdf136bc96f670965cd2f48d14356b4" title="Modulus.">mod</a>(
  196. <a name="l00194"></a>00194 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  197. <a name="l00195"></a>00195 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  198. <a name="l00196"></a>00196
  199. <a name="l00200"></a>00200 detail::fvec4SIMD <a class="code" href="a00125.html#ga3bdf136bc96f670965cd2f48d14356b4" title="Modulus.">mod</a>(
  200. <a name="l00201"></a>00201 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  201. <a name="l00202"></a>00202 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; y);
  202. <a name="l00203"></a>00203
  203. <a name="l00209"></a>00209 <span class="comment">//detail::fvec4SIMD modf(</span>
  204. <a name="l00210"></a>00210 <span class="comment">// detail::fvec4SIMD const &amp; x, </span>
  205. <a name="l00211"></a>00211 <span class="comment">// detail::fvec4SIMD &amp; i);</span>
  206. <a name="l00212"></a>00212
  207. <a name="l00215"></a>00215 detail::fvec4SIMD <a class="code" href="a00125.html#ga0d2bb6c2caad4acf992e6dcd41a626fe" title="Returns y if y &lt; x; otherwise, it returns x.">min</a>(
  208. <a name="l00216"></a>00216 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  209. <a name="l00217"></a>00217 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  210. <a name="l00218"></a>00218
  211. <a name="l00219"></a>00219 detail::fvec4SIMD <a class="code" href="a00125.html#ga0d2bb6c2caad4acf992e6dcd41a626fe" title="Returns y if y &lt; x; otherwise, it returns x.">min</a>(
  212. <a name="l00220"></a>00220 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  213. <a name="l00221"></a>00221 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; y);
  214. <a name="l00222"></a>00222
  215. <a name="l00225"></a>00225 detail::fvec4SIMD <a class="code" href="a00125.html#ga3f6af26fbb056e0fc8a04ddc8871add2" title="Returns y if x &lt; y; otherwise, it returns x.">max</a>(
  216. <a name="l00226"></a>00226 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  217. <a name="l00227"></a>00227 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  218. <a name="l00228"></a>00228
  219. <a name="l00229"></a>00229 detail::fvec4SIMD <a class="code" href="a00125.html#ga3f6af26fbb056e0fc8a04ddc8871add2" title="Returns y if x &lt; y; otherwise, it returns x.">max</a>(
  220. <a name="l00230"></a>00230 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  221. <a name="l00231"></a>00231 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; y);
  222. <a name="l00232"></a>00232
  223. <a name="l00236"></a>00236 detail::fvec4SIMD <a class="code" href="a00125.html#ga99b1ce602a02833646e5077345858da4" title="Returns min(max(x, minVal), maxVal) for each component in x.">clamp</a>(
  224. <a name="l00237"></a>00237 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  225. <a name="l00238"></a>00238 detail::fvec4SIMD <span class="keyword">const</span> &amp; minVal,
  226. <a name="l00239"></a>00239 detail::fvec4SIMD <span class="keyword">const</span> &amp; maxVal);
  227. <a name="l00240"></a>00240
  228. <a name="l00241"></a>00241 detail::fvec4SIMD <a class="code" href="a00125.html#ga99b1ce602a02833646e5077345858da4" title="Returns min(max(x, minVal), maxVal) for each component in x.">clamp</a>(
  229. <a name="l00242"></a>00242 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  230. <a name="l00243"></a>00243 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; minVal,
  231. <a name="l00244"></a>00244 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; maxVal);
  232. <a name="l00245"></a>00245
  233. <a name="l00269"></a>00269 <span class="comment">// \todo Test when &#39;a&#39; is a boolean.</span>
  234. <a name="l00271"></a>00271 <span class="comment"></span> detail::fvec4SIMD <a class="code" href="a00125.html#ga3f64b3986efe205cf30300700667e761">mix</a>(
  235. <a name="l00272"></a>00272 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  236. <a name="l00273"></a>00273 detail::fvec4SIMD <span class="keyword">const</span> &amp; y,
  237. <a name="l00274"></a>00274 detail::fvec4SIMD <span class="keyword">const</span> &amp; a);
  238. <a name="l00275"></a>00275
  239. <a name="l00278"></a>00278 detail::fvec4SIMD <a class="code" href="a00125.html#ga3d3199dcbbb0ac8e0d9664d538702a40" title="Returns 0.0 if x &lt; edge, otherwise it returns 1.0.">step</a>(
  240. <a name="l00279"></a>00279 detail::fvec4SIMD <span class="keyword">const</span> &amp; edge,
  241. <a name="l00280"></a>00280 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  242. <a name="l00281"></a>00281
  243. <a name="l00282"></a>00282 detail::fvec4SIMD <a class="code" href="a00125.html#ga3d3199dcbbb0ac8e0d9664d538702a40" title="Returns 0.0 if x &lt; edge, otherwise it returns 1.0.">step</a>(
  244. <a name="l00283"></a>00283 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; edge,
  245. <a name="l00284"></a>00284 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  246. <a name="l00285"></a>00285
  247. <a name="l00296"></a>00296 detail::fvec4SIMD <a class="code" href="a00125.html#gabdfe71a62ef69b5ec834601e87588667" title="Returns 0.0 if x &lt;= edge0 and 1.0 if x &gt;= edge1 and performs smooth Hermite interpolation between 0 a...">smoothstep</a>(
  248. <a name="l00297"></a>00297 detail::fvec4SIMD <span class="keyword">const</span> &amp; edge0,
  249. <a name="l00298"></a>00298 detail::fvec4SIMD <span class="keyword">const</span> &amp; edge1,
  250. <a name="l00299"></a>00299 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  251. <a name="l00300"></a>00300
  252. <a name="l00301"></a>00301 detail::fvec4SIMD <a class="code" href="a00125.html#gabdfe71a62ef69b5ec834601e87588667" title="Returns 0.0 if x &lt;= edge0 and 1.0 if x &gt;= edge1 and performs smooth Hermite interpolation between 0 a...">smoothstep</a>(
  253. <a name="l00302"></a>00302 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; edge0,
  254. <a name="l00303"></a>00303 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; edge1,
  255. <a name="l00304"></a>00304 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  256. <a name="l00305"></a>00305
  257. <a name="l00312"></a>00312 <span class="comment">//bvec4 isnan(detail::fvec4SIMD const &amp; x);</span>
  258. <a name="l00313"></a>00313
  259. <a name="l00320"></a>00320 <span class="comment">//bvec4 isinf(detail::fvec4SIMD const &amp; x);</span>
  260. <a name="l00321"></a>00321
  261. <a name="l00326"></a>00326 <span class="comment">//detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const &amp; value);</span>
  262. <a name="l00327"></a>00327
  263. <a name="l00334"></a>00334 <span class="comment">//detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const &amp; value);</span>
  264. <a name="l00335"></a>00335
  265. <a name="l00338"></a>00338 detail::fvec4SIMD <a class="code" href="a00125.html#gae88b926eebc4d610ecdd148bf8c7bdac" title="Computes and returns a * b + c.">fma</a>(
  266. <a name="l00339"></a>00339 detail::fvec4SIMD <span class="keyword">const</span> &amp; a,
  267. <a name="l00340"></a>00340 detail::fvec4SIMD <span class="keyword">const</span> &amp; b,
  268. <a name="l00341"></a>00341 detail::fvec4SIMD <span class="keyword">const</span> &amp; c);
  269. <a name="l00342"></a>00342
  270. <a name="l00352"></a>00352 <span class="comment">//detail::fvec4SIMD frexp(detail::fvec4SIMD const &amp; x, detail::ivec4SIMD &amp; exp);</span>
  271. <a name="l00353"></a>00353
  272. <a name="l00360"></a>00360 <span class="comment">//detail::fvec4SIMD ldexp(detail::fvec4SIMD const &amp; x, detail::ivec4SIMD const &amp; exp);</span>
  273. <a name="l00361"></a>00361
  274. <a name="l00364"></a>00364 <span class="keywordtype">float</span> <a class="code" href="a00127.html#ga282360c8bb80b80d3c7f5bc00766d873" title="Returns the length of x, i.e., sqrt(x * x).">length</a>(
  275. <a name="l00365"></a>00365 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  276. <a name="l00366"></a>00366
  277. <a name="l00370"></a>00370 <span class="keywordtype">float</span> fastLength(
  278. <a name="l00371"></a>00371 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  279. <a name="l00372"></a>00372
  280. <a name="l00376"></a>00376 <span class="keywordtype">float</span> niceLength(
  281. <a name="l00377"></a>00377 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  282. <a name="l00378"></a>00378
  283. <a name="l00381"></a>00381 detail::fvec4SIMD length4(
  284. <a name="l00382"></a>00382 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  285. <a name="l00383"></a>00383
  286. <a name="l00387"></a>00387 detail::fvec4SIMD fastLength4(
  287. <a name="l00388"></a>00388 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  288. <a name="l00389"></a>00389
  289. <a name="l00393"></a>00393 detail::fvec4SIMD niceLength4(
  290. <a name="l00394"></a>00394 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  291. <a name="l00395"></a>00395
  292. <a name="l00398"></a>00398 <span class="keywordtype">float</span> <a class="code" href="a00127.html#ga3fac0e61144f60184d961dd156709dd3" title="Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).">distance</a>(
  293. <a name="l00399"></a>00399 detail::fvec4SIMD <span class="keyword">const</span> &amp; p0,
  294. <a name="l00400"></a>00400 detail::fvec4SIMD <span class="keyword">const</span> &amp; p1);
  295. <a name="l00401"></a>00401
  296. <a name="l00404"></a>00404 detail::fvec4SIMD distance4(
  297. <a name="l00405"></a>00405 detail::fvec4SIMD <span class="keyword">const</span> &amp; p0,
  298. <a name="l00406"></a>00406 detail::fvec4SIMD <span class="keyword">const</span> &amp; p1);
  299. <a name="l00407"></a>00407
  300. <a name="l00410"></a>00410 <span class="keywordtype">float</span> simdDot(
  301. <a name="l00411"></a>00411 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  302. <a name="l00412"></a>00412 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  303. <a name="l00413"></a>00413
  304. <a name="l00416"></a>00416 detail::fvec4SIMD dot4(
  305. <a name="l00417"></a>00417 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  306. <a name="l00418"></a>00418 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  307. <a name="l00419"></a>00419
  308. <a name="l00422"></a>00422 detail::fvec4SIMD <a class="code" href="a00127.html#gaa127ddc9d38f715125f91742d399eb6f" title="Returns the cross product of x and y.">cross</a>(
  309. <a name="l00423"></a>00423 detail::fvec4SIMD <span class="keyword">const</span> &amp; x,
  310. <a name="l00424"></a>00424 detail::fvec4SIMD <span class="keyword">const</span> &amp; y);
  311. <a name="l00425"></a>00425
  312. <a name="l00428"></a>00428 detail::fvec4SIMD <a class="code" href="a00127.html#ga68b931c228750eeba844c273c54ca43d" title="Returns a vector in the same direction as x but with length of 1.">normalize</a>(
  313. <a name="l00429"></a>00429 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  314. <a name="l00430"></a>00430
  315. <a name="l00434"></a>00434 detail::fvec4SIMD fastNormalize(
  316. <a name="l00435"></a>00435 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  317. <a name="l00436"></a>00436
  318. <a name="l00439"></a>00439 detail::fvec4SIMD simdFaceforward(
  319. <a name="l00440"></a>00440 detail::fvec4SIMD <span class="keyword">const</span> &amp; N,
  320. <a name="l00441"></a>00441 detail::fvec4SIMD <span class="keyword">const</span> &amp; I,
  321. <a name="l00442"></a>00442 detail::fvec4SIMD <span class="keyword">const</span> &amp; Nref);
  322. <a name="l00443"></a>00443
  323. <a name="l00447"></a>00447 detail::fvec4SIMD <a class="code" href="a00127.html#gabe1fa0bef5f854242eb70ce56e5a7d03" title="For the incident vector I and surface orientation N, returns the reflection direction : result = I - ...">reflect</a>(
  324. <a name="l00448"></a>00448 detail::fvec4SIMD <span class="keyword">const</span> &amp; I,
  325. <a name="l00449"></a>00449 detail::fvec4SIMD <span class="keyword">const</span> &amp; N);
  326. <a name="l00450"></a>00450
  327. <a name="l00455"></a>00455 detail::fvec4SIMD <a class="code" href="a00127.html#gabbb4909d3e99a7a2411cc63252afbbd8" title="For the incident vector I and surface normal N, and the ratio of indices of refraction eta...">refract</a>(
  328. <a name="l00456"></a>00456 detail::fvec4SIMD <span class="keyword">const</span> &amp; I,
  329. <a name="l00457"></a>00457 detail::fvec4SIMD <span class="keyword">const</span> &amp; N,
  330. <a name="l00458"></a>00458 <span class="keywordtype">float</span> <span class="keyword">const</span> &amp; eta);
  331. <a name="l00459"></a>00459
  332. <a name="l00462"></a>00462 detail::fvec4SIMD <a class="code" href="a00126.html#ga9b2fd4f39c29e3d55c4b4087ab873f9f" title="Returns the positive square root of x.">sqrt</a>(
  333. <a name="l00463"></a>00463 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  334. <a name="l00464"></a>00464
  335. <a name="l00468"></a>00468 detail::fvec4SIMD niceSqrt(
  336. <a name="l00469"></a>00469 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  337. <a name="l00470"></a>00470
  338. <a name="l00474"></a>00474 detail::fvec4SIMD fastSqrt(
  339. <a name="l00475"></a>00475 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  340. <a name="l00476"></a>00476
  341. <a name="l00479"></a>00479 detail::fvec4SIMD <a class="code" href="a00126.html#ga3fd19e045e3943b96e0cdad22fbda111" title="Returns the reciprocal of the positive square root of x.">inversesqrt</a>(
  342. <a name="l00480"></a>00480 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  343. <a name="l00481"></a>00481
  344. <a name="l00485"></a>00485 detail::fvec4SIMD fastInversesqrt(
  345. <a name="l00486"></a>00486 detail::fvec4SIMD <span class="keyword">const</span> &amp; x);
  346. <a name="l00487"></a>00487
  347. <a name="l00489"></a>00489 }<span class="comment">//namespace glm</span>
  348. <a name="l00490"></a>00490
  349. <a name="l00491"></a>00491 <span class="preprocessor">#include &quot;simd_vec4.inl&quot;</span>
  350. <a name="l00492"></a>00492
  351. <a name="l00493"></a>00493 <span class="preprocessor">#endif//(GLM_ARCH != GLM_ARCH_PURE)</span>
  352. <a name="l00494"></a>00494 <span class="preprocessor"></span>
  353. <a name="l00495"></a>00495 <span class="preprocessor">#endif//GLM_GTX_simd_vec4</span>
  354. </pre></div></div><!-- contents -->
  355. <hr class="footer"/><address class="footer"><small>
  356. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  357. <img class="footer" src="doxygen.png" alt="doxygen"/>
  358. </a> 1.7.6.1
  359. </small></address>
  360. </body>
  361. </html>