glm/doc/api-0.9.3/a00165.html
2011-12-07 14:50:15 +00:00

268 lines
11 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"/>
<title>GLM_GTC_random: Random number generation</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.5 -->
<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><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">GLM_GTC_random: Random number generation</div> </div>
<div class="ingroups"><a class="el" href="a00151.html">GTC Extensions (Stable)</a></div></div>
<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&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">GLM_FUNC_QUALIFIER <br class="typebreak"/>
detail::tvec3&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#ga9603f085f45198fac365d85756941be5">ballRand</a> (T const &amp;Radius)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tvec2&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#ga6e74477d1997a1bc2cf62bcc36167674">circularRand</a> (T const &amp;Radius)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tvec2&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#gaacf5ed0c8f984b4ca3004019c573dc51">diskRand</a> (T const &amp;Radius)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">genType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#ga8cf40a2f2268b91103f763b6ea2c44d8">gaussRand</a> (genType const &amp;Mean, genType const &amp;Deviation)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">genType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#ga4fbce21c9727ffcd7f19813d6d7d8024">linearRand</a> (genType const &amp;Min, genType const &amp;Max)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">detail::tvec3&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00165.html#ga291f75129653fa6371d2d57d78f8aca6">sphericalRand</a> (T const &amp;Radius)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Generate random number from various distribution methods. </p>
<p>&lt;<a class="el" href="a00093.html" title="OpenGL Mathematics (glm.g-truc.net)">glm/gtc/random.hpp</a>&gt; need to be included to use these functionalities. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga9603f085f45198fac365d85756941be5"></a><!-- doxytag: member="glm::ballRand" ref="ga9603f085f45198fac365d85756941be5" args="(T const &amp;Radius)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GLM_FUNC_QUALIFIER detail::tvec3&lt;T&gt; glm::ballRand </td>
<td>(</td>
<td class="paramtype">T const &amp;&#160;</td>
<td class="paramname"><em>Radius</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Radius</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga6e74477d1997a1bc2cf62bcc36167674"></a><!-- doxytag: member="glm::circularRand" ref="ga6e74477d1997a1bc2cf62bcc36167674" args="(T const &amp;Radius)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">detail::tvec2&lt;T&gt; glm::circularRand </td>
<td>(</td>
<td class="paramtype">T const &amp;&#160;</td>
<td class="paramname"><em>Radius</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Radius</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gaacf5ed0c8f984b4ca3004019c573dc51"></a><!-- doxytag: member="glm::diskRand" ref="gaacf5ed0c8f984b4ca3004019c573dc51" args="(T const &amp;Radius)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">detail::tvec2&lt;T&gt; glm::diskRand </td>
<td>(</td>
<td class="paramtype">T const &amp;&#160;</td>
<td class="paramname"><em>Radius</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Radius</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga8cf40a2f2268b91103f763b6ea2c44d8"></a><!-- doxytag: member="glm::gaussRand" ref="ga8cf40a2f2268b91103f763b6ea2c44d8" args="(genType const &amp;Mean, genType const &amp;Deviation)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gaussRand </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>Mean</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>Deviation</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate random numbers in the interval [Min, Max], according a gaussian distribution. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Mean</td><td></td></tr>
<tr><td class="paramname">Deviation</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga4fbce21c9727ffcd7f19813d6d7d8024"></a><!-- doxytag: member="glm::linearRand" ref="ga4fbce21c9727ffcd7f19813d6d7d8024" args="(genType const &amp;Min, genType const &amp;Max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::linearRand </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>Min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>Max</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate random numbers in the interval [Min, Max], according a linear distribution. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Min</td><td></td></tr>
<tr><td class="paramname">Max</td><td></td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Template Parameters:</b></dt><dd>
<table class="">
<tr><td class="paramname">genType</td><td>Value type. Currently supported: half (not recommanded), float or double scalars and vectors. </td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga291f75129653fa6371d2d57d78f8aca6"></a><!-- doxytag: member="glm::sphericalRand" ref="ga291f75129653fa6371d2d57d78f8aca6" args="(T const &amp;Radius)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">detail::tvec3&lt;T&gt; glm::sphericalRand </td>
<td>(</td>
<td class="paramtype">T const &amp;&#160;</td>
<td class="paramname"><em>Radius</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">Radius</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00165.html" title="Generate random number from various distribution methods.">GLM_GTC_random: Random number generation</a> </dd></dl>
</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.5
</small></address>
</body>
</html>