mirror of
https://github.com/g-truc/glm.git
synced 2024-11-15 22:34:35 +00:00
1036 lines
50 KiB
HTML
1036 lines
50 KiB
HTML
|
<!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"/>
|
|||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|||
|
|
|||
|
<title>Common functions</title>
|
|||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<div id="top"><!-- do not remove this div! -->
|
|||
|
|
|||
|
|
|||
|
<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>
|
|||
|
|
|||
|
<!-- Generated by Doxygen 1.7.6.1 -->
|
|||
|
<div id="navrow1" class="tabs">
|
|||
|
<ul class="tablist">
|
|||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|||
|
<li><a href="pages.html"><span>Related 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><a href="files.html"><span>Files</span></a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="header">
|
|||
|
<div class="summary">
|
|||
|
<a href="#func-members">Functions</a> </div>
|
|||
|
<div class="headertitle">
|
|||
|
<div class="title">Common functions</div> </div>
|
|||
|
<div class="ingroups"><a class="el" href="a00137.html">GLM Core</a></div></div><!--header-->
|
|||
|
<div class="contents">
|
|||
|
<table class="memberdecls">
|
|||
|
<tr><td colspan="2"><h2><a name="func-members"></a>
|
|||
|
Functions</h2></td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gaeca8e195d482248f677e3905d00f11ae">abs</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga1ce130f2934cf1d7aca83a7027422f3c">ceil</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga99b1ce602a02833646e5077345858da4">clamp</a> (genType const &x, genType const &minVal, genType const &maxVal)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genIType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genIType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga0ac6c59156dcdc12fa8fd861925ddb4c">floatBitsToInt</a> (genType const &value)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genUType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genUType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gaccd4fbc2c30848eb85370e2e5b4e4eec">floatBitsToUint</a> (genType const &value)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gac3458e950a8a716468866f841a833c77">floor</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gae88b926eebc4d610ecdd148bf8c7bdac">fma</a> (genType const &a, genType const &b, genType const &c)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gad5e3814491ff6baa4f0d16aebcabff9b">fract</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genIType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga459a98ee7601031e99bf0e99978ff13f">frexp</a> (genType const &x, genIType &exp)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genIType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga15f7f0f93ebb026338cb3d7d5876e1b7">intBitsToFloat</a> (genIType const &value)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType::bool_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga69fcbd40e0ce359f832329c0c93d5912">isinf</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType::bool_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga5efda4205aed487be515b5f2921303f8">isnan</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genIType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gaf210cb4f21bbfde6ace0849e960a4b3a">ldexp</a> (genType const &x, genIType const &exp)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga3f6af26fbb056e0fc8a04ddc8871add2">max</a> (genType const &x, genType const &y)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga0d2bb6c2caad4acf992e6dcd41a626fe">min</a> (genType const &x, genType const &y)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genTypeT , typename genTypeU > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genTypeT </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga3f64b3986efe205cf30300700667e761">mix</a> (genTypeT const &x, genTypeT const &y, genTypeU const &a)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga3bdf136bc96f670965cd2f48d14356b4">mod</a> (genType const &x, genType const &y)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gaafffb265a1455c56d85594032ded2dc3">mod</a> (genType const &x, typename genType::value_type const &y)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga34ff69d5efb2fafa3156ad2b87bd49ec">modf</a> (genType const &x, genType &i)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga32125c5451799e80b886ef665b947d0c">round</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gab46fe1ce5fdd08f904be811a53364968">roundEven</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga79f412e6d33cb4be13497056c2298d14">sign</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gabdfe71a62ef69b5ec834601e87588667">smoothstep</a> (genType const &edge0, genType const &edge1, genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga3d3199dcbbb0ac8e0d9664d538702a40">step</a> (genType const &edge, genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#gae1268fe85d913d9e4054de0e046abaef">trunc</a> (genType const &x)</td></tr>
|
|||
|
<tr><td class="memTemplParams" colspan="2">template<typename genType , typename genUType > </td></tr>
|
|||
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00125.html#ga3e4a94c90cffac713c287d1fb7b51c08">uintBitsToFloat</a> (genUType const &value)</td></tr>
|
|||
|
</table>
|
|||
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
|||
|
<p>These all operate component-wise. </p>
|
|||
|
<p>The description is per component. </p>
|
|||
|
<hr/><h2>Function Documentation</h2>
|
|||
|
<a class="anchor" id="gaeca8e195d482248f677e3905d00f11ae"></a><!-- doxytag: member="glm::abs" ref="gaeca8e195d482248f677e3905d00f11ae" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::abs </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns x if x >= 0; otherwise, it returns -x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>floating-point or signed integer; scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga1ce130f2934cf1d7aca83a7027422f3c"></a><!-- doxytag: member="glm::ceil" ref="ga1ce130f2934cf1d7aca83a7027422f3c" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::ceil </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a value equal to the nearest integer that is greater than or equal to x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga99b1ce602a02833646e5077345858da4"></a><!-- doxytag: member="glm::clamp" ref="ga99b1ce602a02833646e5077345858da4" args="(genType const &x, genType const &minVal, genType const &maxVal)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::clamp </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>minVal</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>maxVal</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns min(max(x, minVal), maxVal) for each component in x. </p>
|
|||
|
<p>using the floating-point values minVal and maxVal. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point or integer; scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga0ac6c59156dcdc12fa8fd861925ddb4c"></a><!-- doxytag: member="glm::floatBitsToInt" ref="ga0ac6c59156dcdc12fa8fd861925ddb4c" args="(genType const &value)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genIType glm::floatBitsToInt </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a signed integer value representing the encoding of a floating-point value. </p>
|
|||
|
<p>The floatingpoint value's bit-level representation is preserved.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Single-precision floating-point scalar or vector types. </td></tr>
|
|||
|
<tr><td class="paramname">genIType</td><td>Signed integer scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gaccd4fbc2c30848eb85370e2e5b4e4eec"></a><!-- doxytag: member="glm::floatBitsToUint" ref="gaccd4fbc2c30848eb85370e2e5b4e4eec" args="(genType const &value)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genUType glm::floatBitsToUint </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a unsigned integer value representing the encoding of a floating-point value. </p>
|
|||
|
<p>The floatingpoint value's bit-level representation is preserved.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Single-precision floating-point scalar or vector types. </td></tr>
|
|||
|
<tr><td class="paramname">genUType</td><td>Unsigned integer scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gac3458e950a8a716468866f841a833c77"></a><!-- doxytag: member="glm::floor" ref="gac3458e950a8a716468866f841a833c77" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::floor </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a value equal to the nearest integer that is less then or equal to x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gae88b926eebc4d610ecdd148bf8c7bdac"></a><!-- doxytag: member="glm::fma" ref="gae88b926eebc4d610ecdd148bf8c7bdac" args="(genType const &a, genType const &b, genType const &c)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::fma </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>a</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>b</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>c</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Computes and returns a * b + c. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gad5e3814491ff6baa4f0d16aebcabff9b"></a><!-- doxytag: member="glm::fract" ref="gad5e3814491ff6baa4f0d16aebcabff9b" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::fract </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Return x - floor(x). </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga459a98ee7601031e99bf0e99978ff13f"></a><!-- doxytag: member="glm::frexp" ref="ga459a98ee7601031e99bf0e99978ff13f" args="(genType const &x, genIType &exp)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::frexp </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genIType & </td>
|
|||
|
<td class="paramname"><em>exp</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two, such that: x = significand * exp(2, exponent) </p>
|
|||
|
<p>The significand is returned by the function and the exponent is returned in the parameter exp. For a floating-point value of zero, the significant and exponent are both zero. For a floating-point value that is an infinity or is not a number, the results are undefined.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types.</td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga15f7f0f93ebb026338cb3d7d5876e1b7"></a><!-- doxytag: member="glm::intBitsToFloat" ref="ga15f7f0f93ebb026338cb3d7d5876e1b7" args="(genIType const &value)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::intBitsToFloat </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genIType const & </td>
|
|||
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a floating-point value corresponding to a signed integer encoding of a floating-point value. </p>
|
|||
|
<p>If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Single-precision floating-point scalar or vector types. </td></tr>
|
|||
|
<tr><td class="paramname">genIType</td><td>Signed integer scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
<dl class="todo"><dt><b><a class="el" href="a00213.html#_todo000001">Todo:</a></b></dt><dd>Clarify this declaration, we don't need to actually specify the return type </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga69fcbd40e0ce359f832329c0c93d5912"></a><!-- doxytag: member="glm::isinf" ref="ga69fcbd40e0ce359f832329c0c93d5912" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType::bool_type glm::isinf </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations. </p>
|
|||
|
<p>Returns false otherwise, including for implementations with no infinity representations. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga5efda4205aed487be515b5f2921303f8"></a><!-- doxytag: member="glm::isnan" ref="ga5efda4205aed487be515b5f2921303f8" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType::bool_type glm::isnan </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations. </p>
|
|||
|
<p>Returns false otherwise, including for implementations with no NaN representations. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gaf210cb4f21bbfde6ace0849e960a4b3a"></a><!-- doxytag: member="glm::ldexp" ref="gaf210cb4f21bbfde6ace0849e960a4b3a" args="(genType const &x, genIType const &exp)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::ldexp </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genIType const & </td>
|
|||
|
<td class="paramname"><em>exp</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Builds a floating-point number from x and the corresponding integral exponent of two in exp, returning: significand * exp(2, exponent) </p>
|
|||
|
<p>If this product is too large to be represented in the floating-point type, the result is undefined.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types.</td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>; </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga3f6af26fbb056e0fc8a04ddc8871add2"></a><!-- doxytag: member="glm::max" ref="ga3f6af26fbb056e0fc8a04ddc8871add2" args="(genType const &x, genType const &y)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::max </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>y</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns y if x < y; otherwise, it returns x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point or integer; scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga0d2bb6c2caad4acf992e6dcd41a626fe"></a><!-- doxytag: member="glm::min" ref="ga0d2bb6c2caad4acf992e6dcd41a626fe" args="(genType const &x, genType const &y)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::min </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>y</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns y if y < x; otherwise, it returns x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point or integer; scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga3f64b3986efe205cf30300700667e761"></a><!-- doxytag: member="glm::mix" ref="ga3f64b3986efe205cf30300700667e761" args="(genTypeT const &x, genTypeT const &y, genTypeU const &a)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genTypeT glm::mix </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genTypeT const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genTypeT const & </td>
|
|||
|
<td class="paramname"><em>y</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genTypeU const & </td>
|
|||
|
<td class="paramname"><em>a</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1].</dd>
|
|||
|
<dd>
|
|||
|
If genTypeU is a boolean scalar or vector: Selects which vector each returned component comes from. For a component of a that is false, the corresponding component of x is returned. For a component of a that is true, the corresponding component of y is returned. Components of x and y that are not selected are allowed to be invalid floating point values and will have no effect on the results. Thus, this provides different functionality than genType mix(genType x, genType y, genType(a)) where a is a Boolean vector. </dd></dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|||
|
<table class="params">
|
|||
|
<tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Value to interpolate. </td></tr>
|
|||
|
<tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Value to interpolate. </td></tr>
|
|||
|
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Interpolant.</td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genTypeT</td><td>Floating point scalar or vector. </td></tr>
|
|||
|
<tr><td class="paramname">genTypeU</td><td>Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.</td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="a00034.html" title="OpenGL Mathematics (glm.g-truc.net)">glm/glm.hpp</a>></span>
|
|||
|
...
|
|||
|
<span class="keywordtype">float</span> a;
|
|||
|
<span class="keywordtype">bool</span> b;
|
|||
|
<a class="code" href="a00138.html#ga0f0fcb7b631cbbac4341badb01d84218" title="Vector of 3 double-precision floating-point numbers.">glm::dvec3</a> <a class="code" href="a00160.html#gab932c1030b8bef04437a2d066dc9dc6e" title="Return e constant.">e</a>;
|
|||
|
<a class="code" href="a00138.html#ga0f0fcb7b631cbbac4341badb01d84218" title="Vector of 3 double-precision floating-point numbers.">glm::dvec3</a> f;
|
|||
|
<a class="code" href="a00138.html#ga3f36f44916da88f7173bc4afa030ebe1" title="4 components vector of floating-point numbers.">glm::vec4</a> g;
|
|||
|
<a class="code" href="a00138.html#ga3f36f44916da88f7173bc4afa030ebe1" title="4 components vector of floating-point numbers.">glm::vec4</a> h;
|
|||
|
...
|
|||
|
<a class="code" href="a00138.html#ga3f36f44916da88f7173bc4afa030ebe1" title="4 components vector of floating-point numbers.">glm::vec4</a> r = <a class="code" href="a00125.html#ga3f64b3986efe205cf30300700667e761">glm::mix</a>(g, h, a); <span class="comment">// Interpolate with a floating-point scalar two vectors. </span>
|
|||
|
<a class="code" href="a00138.html#ga3f36f44916da88f7173bc4afa030ebe1" title="4 components vector of floating-point numbers.">glm::vec4</a> s = <a class="code" href="a00125.html#ga3f64b3986efe205cf30300700667e761">glm::mix</a>(g, h, b); <span class="comment">// Teturns g or h;</span>
|
|||
|
<a class="code" href="a00138.html#ga0f0fcb7b631cbbac4341badb01d84218" title="Vector of 3 double-precision floating-point numbers.">glm::dvec3</a> t = <a class="code" href="a00125.html#ga3f64b3986efe205cf30300700667e761">glm::mix</a>(<a class="code" href="a00160.html#gab932c1030b8bef04437a2d066dc9dc6e" title="Return e constant.">e</a>, f, a); <span class="comment">// Types of the third parameter is not required to match with the first and the second.</span>
|
|||
|
<a class="code" href="a00138.html#ga3f36f44916da88f7173bc4afa030ebe1" title="4 components vector of floating-point numbers.">glm::vec4</a> u = <a class="code" href="a00125.html#ga3f64b3986efe205cf30300700667e761">glm::mix</a>(g, h, r); <span class="comment">// Interpolations can be perform per component with a vector for the last parameter.</span>
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga3bdf136bc96f670965cd2f48d14356b4"></a><!-- doxytag: member="glm::mod" ref="ga3bdf136bc96f670965cd2f48d14356b4" args="(genType const &x, genType const &y)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::mod </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>y</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Modulus. </p>
|
|||
|
<p>Returns x - y * floor(x / y) for each component in x using the floating point value y.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gaafffb265a1455c56d85594032ded2dc3"></a><!-- doxytag: member="glm::mod" ref="gaafffb265a1455c56d85594032ded2dc3" args="(genType const &x, typename genType::value_type const &y)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::mod </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">typename genType::value_type const & </td>
|
|||
|
<td class="paramname"><em>y</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Modulus. </p>
|
|||
|
<p>Returns x - y * floor(x / y) for each component in x using the floating point value y.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga34ff69d5efb2fafa3156ad2b87bd49ec"></a><!-- doxytag: member="glm::modf" ref="ga34ff69d5efb2fafa3156ad2b87bd49ec" args="(genType const &x, genType &i)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::modf </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType & </td>
|
|||
|
<td class="paramname"><em>i</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns the fractional part of x and sets i to the integer part (as a whole number floating point value). </p>
|
|||
|
<p>Both the return value and the output parameter will have the same sign as x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga32125c5451799e80b886ef665b947d0c"></a><!-- doxytag: member="glm::round" ref="ga32125c5451799e80b886ef665b947d0c" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::round </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a value equal to the nearest integer to x. </p>
|
|||
|
<p>The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gab46fe1ce5fdd08f904be811a53364968"></a><!-- doxytag: member="glm::roundEven" ref="gab46fe1ce5fdd08f904be811a53364968" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::roundEven </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a value equal to the nearest integer to x. </p>
|
|||
|
<p>A fractional part of 0.5 will round toward the nearest even integer. (Both 3.5 and 4.5 for x will return 4.0.)</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga79f412e6d33cb4be13497056c2298d14"></a><!-- doxytag: member="glm::sign" ref="ga79f412e6d33cb4be13497056c2298d14" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::sign </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point or signed integer; scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gabdfe71a62ef69b5ec834601e87588667"></a><!-- doxytag: member="glm::smoothstep" ref="gabdfe71a62ef69b5ec834601e87588667" args="(genType const &edge0, genType const &edge1, genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::smoothstep </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>edge0</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>edge1</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1. </p>
|
|||
|
<p>This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to: genType t; t = clamp ((x <20> edge0) / (edge1 <20> edge0), 0, 1); return t * t * (3 <20> 2 * t); Results are undefined if edge0 >= edge1.</p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga3d3199dcbbb0ac8e0d9664d538702a40"></a><!-- doxytag: member="glm::step" ref="ga3d3199dcbbb0ac8e0d9664d538702a40" args="(genType const &edge, genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::step </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>edge</em>, </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="paramkey"></td>
|
|||
|
<td></td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em> </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td></td>
|
|||
|
<td>)</td>
|
|||
|
<td></td><td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns 0.0 if x < edge, otherwise it returns 1.0. </p>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="gae1268fe85d913d9e4054de0e046abaef"></a><!-- doxytag: member="glm::trunc" ref="gae1268fe85d913d9e4054de0e046abaef" args="(genType const &x)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::trunc </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genType const & </td>
|
|||
|
<td class="paramname"><em>x</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Floating-point scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<a class="anchor" id="ga3e4a94c90cffac713c287d1fb7b51c08"></a><!-- doxytag: member="glm::uintBitsToFloat" ref="ga3e4a94c90cffac713c287d1fb7b51c08" args="(genUType const &value)" -->
|
|||
|
<div class="memitem">
|
|||
|
<div class="memproto">
|
|||
|
<table class="memname">
|
|||
|
<tr>
|
|||
|
<td class="memname">genType glm::uintBitsToFloat </td>
|
|||
|
<td>(</td>
|
|||
|
<td class="paramtype">genUType const & </td>
|
|||
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<div class="memdoc">
|
|||
|
|
|||
|
<p>Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value. </p>
|
|||
|
<p>If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved. </p>
|
|||
|
<dl class=""><dt><b>Template Parameters:</b></dt><dd>
|
|||
|
<table class="">
|
|||
|
<tr><td class="paramname">genType</td><td>Single-precision floating-point scalar or vector types. </td></tr>
|
|||
|
<tr><td class="paramname">genUType</td><td>Unsigned integer scalar or vector types. </td></tr>
|
|||
|
</table>
|
|||
|
</dd>
|
|||
|
</dl>
|
|||
|
<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a> </dd>
|
|||
|
<dd>
|
|||
|
<a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> </dd></dl>
|
|||
|
<dl class="todo"><dt><b><a class="el" href="a00213.html#_todo000002">Todo:</a></b></dt><dd>Clarify this declaration, we don't need to actually specify the return type </dd></dl>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div><!-- contents -->
|
|||
|
|
|||
|
|
|||
|
<hr class="footer"/><address class="footer"><small>
|
|||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|||
|
</a> 1.7.6.1
|
|||
|
</small></address>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|