mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 09:14:34 +00:00
190 lines
20 KiB
HTML
190 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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.10"/>
|
|
<title>0.9.9 API documenation: bitfield.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">0.9.9 API documenation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.10 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_934f46a345653ef2b3014a1b37a162c1.html">G:</a></li><li class="navelem"><a class="el" href="dir_98f7f9d41f9d3029bd68cf237526a774.html">Source</a></li><li class="navelem"><a class="el" href="dir_9344afb825aed5e2f5be1d2015dde43c.html">G-Truc</a></li><li class="navelem"><a class="el" href="dir_45973f864e07b2505003ae343b7c8af7.html">glm</a></li><li class="navelem"><a class="el" href="dir_304be5dfae1339a7705426c0b536faf2.html">glm</a></li><li class="navelem"><a class="el" href="dir_7997edb062bdde9a99cb6835d42b0d9d.html">gtc</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">bitfield.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="a00009.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include "../detail/setup.hpp"</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// Dependencies</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "../detail/qualifier.hpp"</span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "../detail/type_int.hpp"</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "../detail/_vectorize.hpp"</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <limits></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)</span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"># pragma message("GLM: GLM_GTC_bitfield extension included")</span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span><a class="code" href="a00138.html">glm</a></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  GLM_FUNC_DECL genIUType <a class="code" href="a00155.html#ga2e64e3b922a296033b825311e7f5fff1">mask</a>(genIUType Bits);</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier Q></div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  GLM_FUNC_DECL vec<L, T, Q> <a class="code" href="a00155.html#ga2e64e3b922a296033b825311e7f5fff1">mask</a>(vec<L, T, Q> <span class="keyword">const</span>& v);</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  GLM_FUNC_DECL genIUType <a class="code" href="a00155.html#ga590488e1fc00a6cfe5d3bcaf93fbfe88">bitfieldRotateRight</a>(genIUType In, <span class="keywordtype">int</span> Shift);</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier Q></div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  GLM_FUNC_DECL vec<L, T, Q> <a class="code" href="a00155.html#ga590488e1fc00a6cfe5d3bcaf93fbfe88">bitfieldRotateRight</a>(vec<L, T, Q> <span class="keyword">const</span>& In, <span class="keywordtype">int</span> Shift);</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  GLM_FUNC_DECL genIUType <a class="code" href="a00155.html#gae186317091b1a39214ebf79008d44a1e">bitfieldRotateLeft</a>(genIUType In, <span class="keywordtype">int</span> Shift);</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier Q></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  GLM_FUNC_DECL vec<L, T, Q> <a class="code" href="a00155.html#gae186317091b1a39214ebf79008d44a1e">bitfieldRotateLeft</a>(vec<L, T, Q> <span class="keyword">const</span>& In, <span class="keywordtype">int</span> Shift);</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  GLM_FUNC_DECL genIUType <a class="code" href="a00155.html#ga3e96dd1f0a4bc892f063251ed118c0c1">bitfieldFillOne</a>(genIUType Value, <span class="keywordtype">int</span> FirstBit, <span class="keywordtype">int</span> BitCount);</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier Q></div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  GLM_FUNC_DECL vec<L, T, Q> <a class="code" href="a00155.html#ga3e96dd1f0a4bc892f063251ed118c0c1">bitfieldFillOne</a>(vec<L, T, Q> <span class="keyword">const</span>& Value, <span class="keywordtype">int</span> FirstBit, <span class="keywordtype">int</span> BitCount);</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  GLM_FUNC_DECL genIUType <a class="code" href="a00155.html#ga0d16c9acef4be79ea9b47c082a0cf7c2">bitfieldFillZero</a>(genIUType Value, <span class="keywordtype">int</span> FirstBit, <span class="keywordtype">int</span> BitCount);</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier Q></div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  GLM_FUNC_DECL vec<L, T, Q> <a class="code" href="a00155.html#ga0d16c9acef4be79ea9b47c082a0cf7c2">bitfieldFillZero</a>(vec<L, T, Q> <span class="keyword">const</span>& Value, <span class="keywordtype">int</span> FirstBit, <span class="keywordtype">int</span> BitCount);</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  GLM_FUNC_DECL int16 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int8 x, int8 y);</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  GLM_FUNC_DECL uint16 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint8 x, uint8 y);</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  GLM_FUNC_DECL int32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int16 x, int16 y);</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  GLM_FUNC_DECL uint32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint16 x, uint16 y);</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  GLM_FUNC_DECL int64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int32 x, int32 y);</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  GLM_FUNC_DECL uint64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint32 x, uint32 y);</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  GLM_FUNC_DECL int32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int8 x, int8 y, int8 z);</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  GLM_FUNC_DECL uint32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint8 x, uint8 y, uint8 z);</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  GLM_FUNC_DECL int64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int16 x, int16 y, int16 z);</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  GLM_FUNC_DECL uint64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint16 x, uint16 y, uint16 z);</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  GLM_FUNC_DECL int64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int32 x, int32 y, int32 z);</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  GLM_FUNC_DECL uint64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint32 x, uint32 y, uint32 z);</div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> </div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  GLM_FUNC_DECL int32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int8 x, int8 y, int8 z, int8 w);</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  GLM_FUNC_DECL uint32 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint8 x, uint8 y, uint8 z, uint8 w);</div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  GLM_FUNC_DECL int64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(int16 x, int16 y, int16 z, int16 w);</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  GLM_FUNC_DECL uint64 <a class="code" href="a00155.html#gafca8768671a14c8016facccb66a89f26">bitfieldInterleave</a>(uint16 x, uint16 y, uint16 z, uint16 w);</div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> } <span class="comment">//namespace glm</span></div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> </div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="preprocessor">#include "bitfield.inl"</span></div>
|
|
<div class="ttc" id="a00155_html_gae186317091b1a39214ebf79008d44a1e"><div class="ttname"><a href="a00155.html#gae186317091b1a39214ebf79008d44a1e">glm::bitfieldRotateLeft</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft(vec< L, T, Q > const &In, int Shift)</div><div class="ttdoc">Rotate all bits to the left. </div></div>
|
|
<div class="ttc" id="a00155_html_gafca8768671a14c8016facccb66a89f26"><div class="ttname"><a href="a00155.html#gafca8768671a14c8016facccb66a89f26">glm::bitfieldInterleave</a></div><div class="ttdeci">GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)</div><div class="ttdoc">Interleaves the bits of x, y, z and w. </div></div>
|
|
<div class="ttc" id="a00138_html"><div class="ttname"><a href="a00138.html">glm</a></div><div class="ttdef"><b>Definition:</b> <a href="a00015_source.html#l00020">common.hpp:20</a></div></div>
|
|
<div class="ttc" id="a00155_html_ga2e64e3b922a296033b825311e7f5fff1"><div class="ttname"><a href="a00155.html#ga2e64e3b922a296033b825311e7f5fff1">glm::mask</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, Q > mask(vec< L, T, Q > const &v)</div><div class="ttdoc">Build a mask of 'count' bits. </div></div>
|
|
<div class="ttc" id="a00155_html_ga3e96dd1f0a4bc892f063251ed118c0c1"><div class="ttname"><a href="a00155.html#ga3e96dd1f0a4bc892f063251ed118c0c1">glm::bitfieldFillOne</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne(vec< L, T, Q > const &Value, int FirstBit, int BitCount)</div><div class="ttdoc">Set to 1 a range of bits. </div></div>
|
|
<div class="ttc" id="a00155_html_ga590488e1fc00a6cfe5d3bcaf93fbfe88"><div class="ttname"><a href="a00155.html#ga590488e1fc00a6cfe5d3bcaf93fbfe88">glm::bitfieldRotateRight</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight(vec< L, T, Q > const &In, int Shift)</div><div class="ttdoc">Rotate all bits to the right. </div></div>
|
|
<div class="ttc" id="a00155_html_ga0d16c9acef4be79ea9b47c082a0cf7c2"><div class="ttname"><a href="a00155.html#ga0d16c9acef4be79ea9b47c082a0cf7c2">glm::bitfieldFillZero</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero(vec< L, T, Q > const &Value, int FirstBit, int BitCount)</div><div class="ttdoc">Set to 0 a range of bits. </div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<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.8.10
|
|
</small></address>
|
|
</body>
|
|
</html>
|