glm/doc/api-0.9.3/a00041_source.html

218 lines
15 KiB
HTML
Raw Normal View History

2011-11-12 23:26:02 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>func_common.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"></td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>func_common.hpp</h1> </div>
</div>
<div class="contents">
<a href="a00041.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00002"></a>00002
<a name="l00003"></a>00003
<a name="l00004"></a>00004
<a name="l00005"></a>00005
<a name="l00006"></a>00006
<a name="l00007"></a>00007
<a name="l00008"></a>00008
<a name="l00009"></a>00009
<a name="l00010"></a>00010
<a name="l00011"></a>00011
<a name="l00012"></a>00012
<a name="l00013"></a>00013
<a name="l00014"></a>00014
<a name="l00015"></a>00015
<a name="l00016"></a>00016
<a name="l00017"></a>00017
<a name="l00018"></a>00018
<a name="l00019"></a>00019
<a name="l00020"></a>00020
<a name="l00021"></a>00021
<a name="l00022"></a>00022
<a name="l00023"></a>00023
<a name="l00024"></a>00024
<a name="l00025"></a>00025
<a name="l00026"></a>00026
<a name="l00027"></a>00027
<a name="l00028"></a>00028
<a name="l00029"></a>00029
<a name="l00030"></a>00030
<a name="l00031"></a>00031
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00034"></a>00034
<a name="l00035"></a>00035
<a name="l00036"></a>00036 <span class="preprocessor">#ifndef GLM_CORE_func_common</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define GLM_CORE_func_common GLM_VERSION</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &quot;<a class="code" href="a00020.html" title="OpenGL Mathematics (glm.g-truc.net)">_fixes.hpp</a>&quot;</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="keyword">namespace </span>glm
<a name="l00042"></a>00042 {
<a name="l00045"></a>00045
<a name="l00052"></a>00052 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00053"></a>00053 genType abs(genType <span class="keyword">const</span> &amp; x);
<a name="l00054"></a>00054
<a name="l00061"></a>00061 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00062"></a>00062 genType sign(genType <span class="keyword">const</span> &amp; x);
<a name="l00063"></a>00063
<a name="l00070"></a>00070 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00071"></a>00071 genType floor(genType <span class="keyword">const</span> &amp; x);
<a name="l00072"></a>00072
<a name="l00080"></a>00080 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00081"></a>00081 genType trunc(genType <span class="keyword">const</span> &amp; x);
<a name="l00082"></a>00082
<a name="l00093"></a>00093 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00094"></a>00094 genType round(genType <span class="keyword">const</span> &amp; x);
<a name="l00095"></a>00095
<a name="l00105"></a>00105 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00106"></a>00106 genType roundEven(genType <span class="keyword">const</span> &amp; x);
<a name="l00107"></a>00107
<a name="l00115"></a>00115 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00116"></a>00116 genType ceil(genType <span class="keyword">const</span> &amp; x);
<a name="l00117"></a>00117
<a name="l00124"></a>00124 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00125"></a>00125 genType fract(genType <span class="keyword">const</span> &amp; x);
<a name="l00126"></a>00126
<a name="l00134"></a>00134 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00135"></a>00135 genType mod(
<a name="l00136"></a>00136 genType <span class="keyword">const</span> &amp; x,
<a name="l00137"></a>00137 genType <span class="keyword">const</span> &amp; y);
<a name="l00138"></a>00138
<a name="l00146"></a>00146 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00147"></a>00147 genType mod(
<a name="l00148"></a>00148 genType <span class="keyword">const</span> &amp; x,
<a name="l00149"></a>00149 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; y);
<a name="l00150"></a>00150
<a name="l00160"></a>00160 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00161"></a>00161 genType modf(
<a name="l00162"></a>00162 genType <span class="keyword">const</span> &amp; x,
<a name="l00163"></a>00163 genType &amp; i);
<a name="l00164"></a>00164
<a name="l00171"></a>00171 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00172"></a>00172 genType min(
<a name="l00173"></a>00173 genType <span class="keyword">const</span> &amp; x,
<a name="l00174"></a>00174 genType <span class="keyword">const</span> &amp; y);
<a name="l00175"></a>00175
<a name="l00176"></a>00176 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00177"></a>00177 genType min(
<a name="l00178"></a>00178 genType <span class="keyword">const</span> &amp; x,
<a name="l00179"></a>00179 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; y);
<a name="l00180"></a>00180
<a name="l00187"></a>00187 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00188"></a>00188 genType max(
<a name="l00189"></a>00189 genType <span class="keyword">const</span> &amp; x,
<a name="l00190"></a>00190 genType <span class="keyword">const</span> &amp; y);
<a name="l00191"></a>00191
<a name="l00192"></a>00192 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00193"></a>00193 genType max(
<a name="l00194"></a>00194 genType <span class="keyword">const</span> &amp; x,
<a name="l00195"></a>00195 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; y);
<a name="l00196"></a>00196
<a name="l00204"></a>00204 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00205"></a>00205 genType clamp(
<a name="l00206"></a>00206 genType <span class="keyword">const</span> &amp; x,
<a name="l00207"></a>00207 genType <span class="keyword">const</span> &amp; minVal,
<a name="l00208"></a>00208 genType <span class="keyword">const</span> &amp; maxVal);
<a name="l00209"></a>00209
<a name="l00210"></a>00210 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00211"></a>00211 genType clamp(
<a name="l00212"></a>00212 genType <span class="keyword">const</span> &amp; x,
<a name="l00213"></a>00213 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; minVal,
<a name="l00214"></a>00214 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; maxVal);
<a name="l00215"></a>00215
<a name="l00258"></a>00258 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genTypeT, <span class="keyword">typename</span> genTypeU&gt;
<a name="l00259"></a>00259 genTypeT mix(genTypeT <span class="keyword">const</span> &amp; x, genTypeT <span class="keyword">const</span> &amp; y, genTypeU <span class="keyword">const</span> &amp; a);
<a name="l00260"></a>00260
<a name="l00265"></a>00265 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00266"></a>00266 genType step(
<a name="l00267"></a>00267 genType <span class="keyword">const</span> &amp; edge,
<a name="l00268"></a>00268 genType <span class="keyword">const</span> &amp; x);
<a name="l00269"></a>00269
<a name="l00270"></a>00270 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00271"></a>00271 genType step(
<a name="l00272"></a>00272 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; edge,
<a name="l00273"></a>00273 genType <span class="keyword">const</span> &amp; x);
<a name="l00274"></a>00274
<a name="l00289"></a>00289 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00290"></a>00290 genType smoothstep(
<a name="l00291"></a>00291 genType <span class="keyword">const</span> &amp; edge0,
<a name="l00292"></a>00292 genType <span class="keyword">const</span> &amp; edge1,
<a name="l00293"></a>00293 genType <span class="keyword">const</span> &amp; x);
<a name="l00294"></a>00294
<a name="l00295"></a>00295 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00296"></a>00296 genType smoothstep(
<a name="l00297"></a>00297 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; edge0,
<a name="l00298"></a>00298 <span class="keyword">typename</span> genType::value_type <span class="keyword">const</span> &amp; edge1,
<a name="l00299"></a>00299 genType <span class="keyword">const</span> &amp; x);
<a name="l00300"></a>00300
<a name="l00311"></a>00311 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00312"></a>00312 <span class="keyword">typename</span> genType::bool_type <a class="code" href="a00175.html#ga807207a40c45b45420080b39c8a22674" title="Returns true if x holds a NaN (not a number) representation in the underlying implementation&amp;#39;s se...">isnan</a>(genType <span class="keyword">const</span> &amp; x);
<a name="l00313"></a>00313
<a name="l00324"></a>00324 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00325"></a>00325 <span class="keyword">typename</span> genType::bool_type <a class="code" href="a00175.html#ga159b35a301256813ab66548460d0c159" title="Returns true if x holds a positive infinity or negative infinity representation in the underlying imp...">isinf</a>(genType <span class="keyword">const</span> &amp; x);
<a name="l00326"></a>00326
<a name="l00336"></a>00336 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genIType&gt;
<a name="l00337"></a>00337 genIType floatBitsToInt(genType <span class="keyword">const</span> &amp; value);
<a name="l00338"></a>00338
<a name="l00348"></a>00348 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genUType&gt;
<a name="l00349"></a>00349 genUType floatBitsToUint(genType <span class="keyword">const</span> &amp; value);
<a name="l00350"></a>00350
<a name="l00364"></a>00364 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genIType&gt;
<a name="l00365"></a>00365 genType intBitsToFloat(genIType <span class="keyword">const</span> &amp; value);
<a name="l00366"></a>00366
<a name="l00380"></a>00380 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genUType&gt;
<a name="l00381"></a>00381 genType uintBitsToFloat(genUType <span class="keyword">const</span> &amp; value);
<a name="l00382"></a>00382
<a name="l00389"></a>00389 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;
<a name="l00390"></a>00390 genType fma(genType <span class="keyword">const</span> &amp; a, genType <span class="keyword">const</span> &amp; b, genType <span class="keyword">const</span> &amp; c);
<a name="l00391"></a>00391
<a name="l00406"></a>00406 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genIType&gt;
<a name="l00407"></a>00407 genType frexp(genType <span class="keyword">const</span> &amp; x, genIType &amp; <a class="code" href="a00143.html#gaa80061d9689b93b512f17ce94872486d" title="Returns the natural exponentiation of x, i.e., e^x.">exp</a>);
<a name="l00408"></a>00408
<a name="l00420"></a>00420 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType, <span class="keyword">typename</span> genIType&gt;
<a name="l00421"></a>00421 genType ldexp(genType <span class="keyword">const</span> &amp; x, genIType <span class="keyword">const</span> &amp; <a class="code" href="a00143.html#gaa80061d9689b93b512f17ce94872486d" title="Returns the natural exponentiation of x, i.e., e^x.">exp</a>);
<a name="l00422"></a>00422
<a name="l00424"></a>00424 }<span class="comment">//namespace glm</span>
<a name="l00425"></a>00425
<a name="l00426"></a>00426 <span class="preprocessor">#include &quot;func_common.inl&quot;</span>
<a name="l00427"></a>00427
<a name="l00428"></a>00428 <span class="preprocessor">#endif//GLM_CORE_func_common</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>