mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
364 lines
20 KiB
HTML
364 lines
20 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: glm::gtx::bit Namespace Reference</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.6.1 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
|
|
<li><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="navpath"><a class="el" href="a00124.html">glm</a>::<a class="el" href="a00150.html">gtx</a>::<a class="el" href="a00152.html">bit</a>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>glm::gtx::bit Namespace Reference</h1>
|
|
<p>GLM_GTX_bit extension: Allow to perform <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> operations on <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> values.
|
|
<a href="#_details">More...</a></p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>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="a00152.html#a2f145f264c334caba22e6949e015d208">bitRevert</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Revert all bits of any <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> based type. <a href="#a2f145f264c334caba22e6949e015d208"></a><br/></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="a00152.html#aa8de15434b73178fd1d2ea7ee16b59bd">bitRotateLeft</a> (genType const &In, std::size_t Shift)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Rotate all bits to the left. <a href="#aa8de15434b73178fd1d2ea7ee16b59bd"></a><br/></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="a00152.html#aeec0d4179d7a092056e2201fff385ef6">bitRotateRight</a> (genType const &In, std::size_t Shift)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Rotate all bits to the right. <a href="#aeec0d4179d7a092056e2201fff385ef6"></a><br/></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="a00152.html#ad89330d7f51a294c8cc57c71ebbe38ca">extractField</a> (genType const &v, genIType const &first, genIType const &count)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Component wise extraction of <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> fields. <a href="#ad89330d7f51a294c8cc57c71ebbe38ca"></a><br/></td></tr>
|
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|
<tr><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00152.html#a55e17a1e9347ca10d206f62ffe294608">highestBit</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the highest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable. <a href="#a55e17a1e9347ca10d206f62ffe294608"></a><br/></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="a00152.html#a2e2ba1398ef471e40e6a07cbab9a75fe">highestBitValue</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the highest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable and return its value. <a href="#a2e2ba1398ef471e40e6a07cbab9a75fe"></a><br/></td></tr>
|
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|
<tr><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00152.html#adddfcaa01efe60218e52323707331415">isPowerOfTwo</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return true if the value is a power of two number. <a href="#adddfcaa01efe60218e52323707331415"></a><br/></td></tr>
|
|
<tr><td class="memTemplParams" colspan="2">template<typename genType > </td></tr>
|
|
<tr><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00152.html#ace8029d9e9090f2aaa0248e320b3f24c">lowestBit</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the lowest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable. <a href="#ace8029d9e9090f2aaa0248e320b3f24c"></a><br/></td></tr>
|
|
<tr><td class="memTemplParams" colspan="2">template<typename genIType > </td></tr>
|
|
<tr><td class="memTemplItemLeft" align="right" valign="top">genIType </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00152.html#a31dbf05c851060984e107afb39dde5fe">mask</a> (genIType const &count)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Build a mask of 'count' bits From GLM_GTX_bit extension. <a href="#a31dbf05c851060984e107afb39dde5fe"></a><br/></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="a00152.html#a0a1683dffc58011a161c0b3cb867c93c">powerOfTwoAbove</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the power of two number which value is just higher the input value. <a href="#a0a1683dffc58011a161c0b3cb867c93c"></a><br/></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="a00152.html#a9adeb3bc22e67933665600e0dc2e1f8d">powerOfTwoBelow</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the power of two number which value is just lower the input value. <a href="#a9adeb3bc22e67933665600e0dc2e1f8d"></a><br/></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="a00152.html#a12d57451c94950bafe2e1fb57346f082">powerOfTwoNearest</a> (genType const &value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the power of two number which value is the closet to the input value. <a href="#a12d57451c94950bafe2e1fb57346f082"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>GLM_GTX_bit extension: Allow to perform <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> operations on <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> values. </p>
|
|
<hr/><h2>Function Documentation</h2>
|
|
<a class="anchor" id="a2f145f264c334caba22e6949e015d208"></a><!-- doxytag: member="glm::gtx::bit::bitRevert" ref="a2f145f264c334caba22e6949e015d208" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>value</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Revert all bits of any <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> based type. </p>
|
|
<p>From GLM_GTX_bit extension. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa8de15434b73178fd1d2ea7ee16b59bd"></a><!-- doxytag: member="glm::gtx::bit::bitRotateLeft" ref="aa8de15434b73178fd1d2ea7ee16b59bd" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>In</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"> <em>Shift</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<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="aeec0d4179d7a092056e2201fff385ef6"></a><!-- doxytag: member="glm::gtx::bit::bitRotateRight" ref="aeec0d4179d7a092056e2201fff385ef6" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>In</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"> <em>Shift</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<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="ad89330d7f51a294c8cc57c71ebbe38ca"></a><!-- doxytag: member="glm::gtx::bit::extractField" ref="ad89330d7f51a294c8cc57c71ebbe38ca" args="(genType const &v, genIType const &first, genIType const &count)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">genIType glm::gtx::bit::extractField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">genType const & </td>
|
|
<td class="paramname"> <em>v</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">genIType const & </td>
|
|
<td class="paramname"> <em>first</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">genIType const & </td>
|
|
<td class="paramname"> <em>count</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Component wise extraction of <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> 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="a55e17a1e9347ca10d206f62ffe294608"></a><!-- doxytag: member="glm::gtx::bit::highestBit" ref="a55e17a1e9347ca10d206f62ffe294608" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>value</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Find the highest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable. </p>
|
|
<p>From GLM_GTX_bit extension. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2e2ba1398ef471e40e6a07cbab9a75fe"></a><!-- doxytag: member="glm::gtx::bit::highestBitValue" ref="a2e2ba1398ef471e40e6a07cbab9a75fe" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>value</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Find the highest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable and return its value. </p>
|
|
<p>From GLM_GTX_bit extension. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="adddfcaa01efe60218e52323707331415"></a><!-- doxytag: member="glm::gtx::bit::isPowerOfTwo" ref="adddfcaa01efe60218e52323707331415" args="(genType const &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 & </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="ace8029d9e9090f2aaa0248e320b3f24c"></a><!-- doxytag: member="glm::gtx::bit::lowestBit" ref="ace8029d9e9090f2aaa0248e320b3f24c" args="(genType const &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 & </td>
|
|
<td class="paramname"> <em>value</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Find the lowest <a class="el" href="a00152.html" title="GLM_GTX_bit extension: Allow to perform bit operations on integer values.">bit</a> set to 1 in a <a class="el" href="a00173.html" title="GLM_GTX_integer extension: Add support for integer for core functions.">integer</a> variable. </p>
|
|
<p>From GLM_GTX_bit extension. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a31dbf05c851060984e107afb39dde5fe"></a><!-- doxytag: member="glm::gtx::bit::mask" ref="a31dbf05c851060984e107afb39dde5fe" args="(genIType const &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 & </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="a0a1683dffc58011a161c0b3cb867c93c"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoAbove" ref="a0a1683dffc58011a161c0b3cb867c93c" args="(genType const &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 & </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="a9adeb3bc22e67933665600e0dc2e1f8d"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoBelow" ref="a9adeb3bc22e67933665600e0dc2e1f8d" args="(genType const &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 & </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="a12d57451c94950bafe2e1fb57346f082"></a><!-- doxytag: member="glm::gtx::bit::powerOfTwoNearest" ref="a12d57451c94950bafe2e1fb57346f082" args="(genType const &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 & </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 size="1"/><address style="text-align: right;"><small>Generated on Mon Nov 16 11:23:24 2009 for GLM by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
|
|
</body>
|
|
</html>
|