glm/doc/api-0.9.2/a00250.html

354 lines
15 KiB
HTML
Raw Normal View History

2011-10-24 14:24:48 +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>GLM_GTX_bit: Extended bitwise operations</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.4 -->
<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="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</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_GTX_bit: Extended bitwise operations</div> </div>
<div class="ingroups"><a class="el" href="a00248.html">GTX Extensions (Experimental)</a></div></div>
<div class="contents">
<p>Allow to perform bit operations on integer values.
<a href="#details">More...</a></p>
<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 genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">genType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#ga2f145f264c334caba22e6949e015d208">bitRevert</a> (genType const &amp;value)</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="a00250.html#gaa8de15434b73178fd1d2ea7ee16b59bd">bitRotateLeft</a> (genType const &amp;In, std::size_t Shift)</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="a00250.html#gaeec0d4179d7a092056e2201fff385ef6">bitRotateRight</a> (genType const &amp;In, std::size_t Shift)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genIUType , typename sizeType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">genIUType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#ga244734bb54e4648970c38b032258035a">extractField</a> (genIUType const &amp;v, sizeType const &amp;first, sizeType const &amp;count)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#ga55e17a1e9347ca10d206f62ffe294608">highestBit</a> (genType const &amp;value)</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="a00250.html#ga2e2ba1398ef471e40e6a07cbab9a75fe">highestBitValue</a> (genType const &amp;value)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#gadddfcaa01efe60218e52323707331415">isPowerOfTwo</a> (genType const &amp;value)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#gace8029d9e9090f2aaa0248e320b3f24c">lowestBit</a> (genType const &amp;value)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename genIType &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">genIType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00250.html#ga31dbf05c851060984e107afb39dde5fe">mask</a> (genIType const &amp;count)</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="a00250.html#ga0a1683dffc58011a161c0b3cb867c93c">powerOfTwoAbove</a> (genType const &amp;value)</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="a00250.html#ga9adeb3bc22e67933665600e0dc2e1f8d">powerOfTwoBelow</a> (genType const &amp;value)</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="a00250.html#ga12d57451c94950bafe2e1fb57346f082">powerOfTwoNearest</a> (genType const &amp;value)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Allow to perform bit operations on integer values. </p>
<p>&lt;<a class="el" href="a00027_source.html">glm/gtx/bit.hpp</a>&gt; need to be included to use these functionalities. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga2f145f264c334caba22e6949e015d208"></a><!-- doxytag: member="glm::gtx::bit::bitRevert" ref="ga2f145f264c334caba22e6949e015d208" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::bitRevert </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Revert all bits of any integer based type. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="gaa8de15434b73178fd1d2ea7ee16b59bd"></a><!-- doxytag: member="glm::gtx::bit::bitRotateLeft" ref="gaa8de15434b73178fd1d2ea7ee16b59bd" args="(genType const &amp;In, std::size_t Shift)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::bitRotateLeft </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>In</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>Shift</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Rotate all bits to the left. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="gaeec0d4179d7a092056e2201fff385ef6"></a><!-- doxytag: member="glm::gtx::bit::bitRotateRight" ref="gaeec0d4179d7a092056e2201fff385ef6" args="(genType const &amp;In, std::size_t Shift)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::bitRotateRight </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>In</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>Shift</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Rotate all bits to the right. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga244734bb54e4648970c38b032258035a"></a><!-- doxytag: member="glm::gtx::bit::extractField" ref="ga244734bb54e4648970c38b032258035a" args="(genIUType const &amp;v, sizeType const &amp;first, sizeType const &amp;count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genIUType glm::gtx::bit::extractField </td>
<td>(</td>
<td class="paramtype">genIUType const &amp;&#160;</td>
<td class="paramname"><em>v</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">sizeType const &amp;&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">sizeType const &amp;&#160;</td>
<td class="paramname"><em>count</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Component wise extraction of bit fields. </p>
<p>genType and genIType could be a scalar or a vector. From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga55e17a1e9347ca10d206f62ffe294608"></a><!-- doxytag: member="glm::gtx::bit::highestBit" ref="ga55e17a1e9347ca10d206f62ffe294608" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glm::gtx::bit::highestBit </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find the highest bit set to 1 in a integer variable. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga2e2ba1398ef471e40e6a07cbab9a75fe"></a><!-- doxytag: member="glm::gtx::bit::highestBitValue" ref="ga2e2ba1398ef471e40e6a07cbab9a75fe" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::highestBitValue </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find the highest bit set to 1 in a integer variable and return its value. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="gadddfcaa01efe60218e52323707331415"></a><!-- doxytag: member="glm::gtx::bit::isPowerOfTwo" ref="gadddfcaa01efe60218e52323707331415" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool glm::gtx::bit::isPowerOfTwo </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return true if the value is a power of two number. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="gace8029d9e9090f2aaa0248e320b3f24c"></a><!-- doxytag: member="glm::gtx::bit::lowestBit" ref="gace8029d9e9090f2aaa0248e320b3f24c" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glm::gtx::bit::lowestBit </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find the lowest bit set to 1 in a integer variable. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga31dbf05c851060984e107afb39dde5fe"></a><!-- doxytag: member="glm::gtx::bit::mask" ref="ga31dbf05c851060984e107afb39dde5fe" args="(genIType const &amp;count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genIType glm::gtx::bit::mask </td>
<td>(</td>
<td class="paramtype">genIType const &amp;&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Build a mask of 'count' bits From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga0a1683dffc58011a161c0b3cb867c93c"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoAbove" ref="ga0a1683dffc58011a161c0b3cb867c93c" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::powerOfTwoAbove </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the power of two number which value is just higher the input value. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga9adeb3bc22e67933665600e0dc2e1f8d"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoBelow" ref="ga9adeb3bc22e67933665600e0dc2e1f8d" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::powerOfTwoBelow </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the power of two number which value is just lower the input value. </p>
<p>From GLM_GTX_bit extension. </p>
</div>
</div>
<a class="anchor" id="ga12d57451c94950bafe2e1fb57346f082"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoNearest" ref="ga12d57451c94950bafe2e1fb57346f082" args="(genType const &amp;value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">genType glm::gtx::bit::powerOfTwoNearest </td>
<td>(</td>
<td class="paramtype">genType const &amp;&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the power of two number which value is the closet to the input value. </p>
<p>From GLM_GTX_bit extension. </p>
</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.4 </small></address>
</body>
</html>