1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5 6 <title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference</title> 7 <link href="tabs.css" rel="stylesheet" type="text/css"/> 8 <link href="doxygen.css" rel="stylesheet" type="text/css" /> 9 10 11 12 </head> 13 <body> 14 <div id="top"><!-- do not remove this div! --> 15 16 17 <!-- Generated by Doxygen 1.7.5.1 --> 18 <div id="navrow1" class="tabs"> 19 <ul class="tablist"> 20 <li><a href="index.html"><span>Overview</span></a></li> 21 <li class="current"><a href="globals.html"><span>Globals</span></a></li> 22 <li><a href="annotated.html"><span>Structs</span></a></li> 23 </ul> 24 </div> 25 </div> 26 <div class="header"> 27 <div class="summary"> 28 <a href="#func-members">Functions</a> </div> 29 <div class="headertitle"> 30 <div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference</div> </div> 31 </div> 32 <div class="contents"> 33 <table class="memberdecls"> 34 <tr><td colspan="2"><h2><a name="func-members"></a> 35 Functions</h2></td></tr> 36 <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ad9106e5aae5b1248870f21061f36a1c9">rsRand</a> (int max_value)</td></tr> 37 <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a01edf1cf3cdaecb1629761b69148e189">rsRand</a> (int min_value, int max_value)</td></tr> 38 <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a03e898d810ac44158e7461b2b2b1c356">rsRand</a> (float max_value)</td></tr> 39 <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a84b2e7468314873b3aa02969e310d9e4">rsRand</a> (float min_value, float max_value)</td></tr> 40 <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ac4f127e78da0849321c7f6db14f9e989">rsFrac</a> (float)</td></tr> 41 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> amount, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> low, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> high)</td></tr> 42 <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ad5732b8b1f1d0d53d605a7dc6908dc85">rsClamp</a> (int amount, int low, int high)</td></tr> 43 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#af5e17f571b13c3391d860eac172be1c6">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> amount, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> low, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> high)</td></tr> 44 <tr><td class="memItemLeft" align="right" valign="top">short </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a40eddbf6c2462eada177a581a49bd3c6">rsClamp</a> (short amount, short low, short high)</td></tr> 45 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a2845f16757fe9eb7204bfb6f94d7fcc6">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> amount, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> low, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> high)</td></tr> 46 <tr><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a33122202f10764687e2d3ab1a8c27062">rsClamp</a> (char amount, char low, char high)</td></tr> 47 <tr><td class="memItemLeft" align="right" valign="top">static __inline__ void </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a191f9c687c56322c18b7d71491602122">rsExtractFrustumPlanes</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *viewProj, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *left, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *right, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *top, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *bottom, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *near, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *far)</td></tr> 48 <tr><td class="memItemLeft" align="right" valign="top">static __inline__ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a7bbeaf44838e08e68d5cf3e3d7b0818c">rsIsSphereInFrustum</a> (<a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *sphere, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *left, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *right, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *top, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *bottom, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *near, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *far)</td></tr> 49 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a> (float r, float g, float b)</td></tr> 50 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a1f1107cf778cf1f614edfb5b8ac436a0">rsPackColorTo8888</a> (float r, float g, float b, float a)</td></tr> 51 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ac30a8c020eade2b57fd5966cb7c8665e">rsPackColorTo8888</a> (<a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> color)</td></tr> 52 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a48bb0c2e7b1f2b62b2a8970c7d709eca">rsUnpackColor8888</a> (<a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> c)</td></tr> 53 </table> 54 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> 55 <div class="textblock"><p>todo-jsams </p> 56 57 <p>Definition in file <a class="el" href="rs__math_8rsh_source.html">rs_math.rsh</a>.</p> 58 </div><hr/><h2>Function Documentation</h2> 59 <a class="anchor" id="a5de277f7518a61646c3d74f3a0b9e893"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a5de277f7518a61646c3d74f3a0b9e893" args="(uint amount, uint low, uint high)" --> 60 <div class="memitem"> 61 <div class="memproto"> 62 <table class="memname"> 63 <tr> 64 <td class="memname"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> rsClamp </td> 65 <td>(</td> 66 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> </td> 67 <td class="paramname"><em>amount</em>, </td> 68 </tr> 69 <tr> 70 <td class="paramkey"></td> 71 <td></td> 72 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> </td> 73 <td class="paramname"><em>low</em>, </td> 74 </tr> 75 <tr> 76 <td class="paramkey"></td> 77 <td></td> 78 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> </td> 79 <td class="paramname"><em>high</em> </td> 80 </tr> 81 <tr> 82 <td></td> 83 <td>)</td> 84 <td></td><td></td> 85 </tr> 86 </table> 87 </div> 88 <div class="memdoc"> 89 <p>Clamp the value amount between low and high.</p> 90 <dl><dt><b>Parameters:</b></dt><dd> 91 <table class="params"> 92 <tr><td class="paramname">amount</td><td>The value to clamp </td></tr> 93 <tr><td class="paramname">low</td><td></td></tr> 94 <tr><td class="paramname">high</td><td></td></tr> 95 </table> 96 </dd> 97 </dl> 98 99 </div> 100 </div> 101 <a class="anchor" id="ad5732b8b1f1d0d53d605a7dc6908dc85"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="ad5732b8b1f1d0d53d605a7dc6908dc85" args="(int amount, int low, int high)" --> 102 <div class="memitem"> 103 <div class="memproto"> 104 <table class="memname"> 105 <tr> 106 <td class="memname">int rsClamp </td> 107 <td>(</td> 108 <td class="paramtype">int </td> 109 <td class="paramname"><em>amount</em>, </td> 110 </tr> 111 <tr> 112 <td class="paramkey"></td> 113 <td></td> 114 <td class="paramtype">int </td> 115 <td class="paramname"><em>low</em>, </td> 116 </tr> 117 <tr> 118 <td class="paramkey"></td> 119 <td></td> 120 <td class="paramtype">int </td> 121 <td class="paramname"><em>high</em> </td> 122 </tr> 123 <tr> 124 <td></td> 125 <td>)</td> 126 <td></td><td></td> 127 </tr> 128 </table> 129 </div> 130 <div class="memdoc"> 131 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 132 133 </div> 134 </div> 135 <a class="anchor" id="af5e17f571b13c3391d860eac172be1c6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="af5e17f571b13c3391d860eac172be1c6" args="(ushort amount, ushort low, ushort high)" --> 136 <div class="memitem"> 137 <div class="memproto"> 138 <table class="memname"> 139 <tr> 140 <td class="memname"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> rsClamp </td> 141 <td>(</td> 142 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> </td> 143 <td class="paramname"><em>amount</em>, </td> 144 </tr> 145 <tr> 146 <td class="paramkey"></td> 147 <td></td> 148 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> </td> 149 <td class="paramname"><em>low</em>, </td> 150 </tr> 151 <tr> 152 <td class="paramkey"></td> 153 <td></td> 154 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> </td> 155 <td class="paramname"><em>high</em> </td> 156 </tr> 157 <tr> 158 <td></td> 159 <td>)</td> 160 <td></td><td></td> 161 </tr> 162 </table> 163 </div> 164 <div class="memdoc"> 165 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 166 167 </div> 168 </div> 169 <a class="anchor" id="a40eddbf6c2462eada177a581a49bd3c6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a40eddbf6c2462eada177a581a49bd3c6" args="(short amount, short low, short high)" --> 170 <div class="memitem"> 171 <div class="memproto"> 172 <table class="memname"> 173 <tr> 174 <td class="memname">short rsClamp </td> 175 <td>(</td> 176 <td class="paramtype">short </td> 177 <td class="paramname"><em>amount</em>, </td> 178 </tr> 179 <tr> 180 <td class="paramkey"></td> 181 <td></td> 182 <td class="paramtype">short </td> 183 <td class="paramname"><em>low</em>, </td> 184 </tr> 185 <tr> 186 <td class="paramkey"></td> 187 <td></td> 188 <td class="paramtype">short </td> 189 <td class="paramname"><em>high</em> </td> 190 </tr> 191 <tr> 192 <td></td> 193 <td>)</td> 194 <td></td><td></td> 195 </tr> 196 </table> 197 </div> 198 <div class="memdoc"> 199 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 200 201 </div> 202 </div> 203 <a class="anchor" id="a2845f16757fe9eb7204bfb6f94d7fcc6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a2845f16757fe9eb7204bfb6f94d7fcc6" args="(uchar amount, uchar low, uchar high)" --> 204 <div class="memitem"> 205 <div class="memproto"> 206 <table class="memname"> 207 <tr> 208 <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsClamp </td> 209 <td>(</td> 210 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> </td> 211 <td class="paramname"><em>amount</em>, </td> 212 </tr> 213 <tr> 214 <td class="paramkey"></td> 215 <td></td> 216 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> </td> 217 <td class="paramname"><em>low</em>, </td> 218 </tr> 219 <tr> 220 <td class="paramkey"></td> 221 <td></td> 222 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> </td> 223 <td class="paramname"><em>high</em> </td> 224 </tr> 225 <tr> 226 <td></td> 227 <td>)</td> 228 <td></td><td></td> 229 </tr> 230 </table> 231 </div> 232 <div class="memdoc"> 233 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 234 235 </div> 236 </div> 237 <a class="anchor" id="a33122202f10764687e2d3ab1a8c27062"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a33122202f10764687e2d3ab1a8c27062" args="(char amount, char low, char high)" --> 238 <div class="memitem"> 239 <div class="memproto"> 240 <table class="memname"> 241 <tr> 242 <td class="memname">char rsClamp </td> 243 <td>(</td> 244 <td class="paramtype">char </td> 245 <td class="paramname"><em>amount</em>, </td> 246 </tr> 247 <tr> 248 <td class="paramkey"></td> 249 <td></td> 250 <td class="paramtype">char </td> 251 <td class="paramname"><em>low</em>, </td> 252 </tr> 253 <tr> 254 <td class="paramkey"></td> 255 <td></td> 256 <td class="paramtype">char </td> 257 <td class="paramname"><em>high</em> </td> 258 </tr> 259 <tr> 260 <td></td> 261 <td>)</td> 262 <td></td><td></td> 263 </tr> 264 </table> 265 </div> 266 <div class="memdoc"> 267 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 268 269 </div> 270 </div> 271 <a class="anchor" id="a191f9c687c56322c18b7d71491602122"></a><!-- doxytag: member="rs_math.rsh::rsExtractFrustumPlanes" ref="a191f9c687c56322c18b7d71491602122" args="(const rs_matrix4x4 *viewProj, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far)" --> 272 <div class="memitem"> 273 <div class="memproto"> 274 <table class="memname"> 275 <tr> 276 <td class="memname">static __inline__ void rsExtractFrustumPlanes </td> 277 <td>(</td> 278 <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> * </td> 279 <td class="paramname"><em>viewProj</em>, </td> 280 </tr> 281 <tr> 282 <td class="paramkey"></td> 283 <td></td> 284 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 285 <td class="paramname"><em>left</em>, </td> 286 </tr> 287 <tr> 288 <td class="paramkey"></td> 289 <td></td> 290 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 291 <td class="paramname"><em>right</em>, </td> 292 </tr> 293 <tr> 294 <td class="paramkey"></td> 295 <td></td> 296 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 297 <td class="paramname"><em>top</em>, </td> 298 </tr> 299 <tr> 300 <td class="paramkey"></td> 301 <td></td> 302 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 303 <td class="paramname"><em>bottom</em>, </td> 304 </tr> 305 <tr> 306 <td class="paramkey"></td> 307 <td></td> 308 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 309 <td class="paramname"><em>near</em>, </td> 310 </tr> 311 <tr> 312 <td class="paramkey"></td> 313 <td></td> 314 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 315 <td class="paramname"><em>far</em> </td> 316 </tr> 317 <tr> 318 <td></td> 319 <td>)</td> 320 <td></td><td><code> [static]</code></td> 321 </tr> 322 </table> 323 </div> 324 <div class="memdoc"> 325 <p>Computes 6 frustum planes from the view projection matrix </p> 326 <dl><dt><b>Parameters:</b></dt><dd> 327 <table class="params"> 328 <tr><td class="paramname">viewProj</td><td>matrix to extract planes from </td></tr> 329 <tr><td class="paramname">left</td><td>plane </td></tr> 330 <tr><td class="paramname">right</td><td>plane </td></tr> 331 <tr><td class="paramname">top</td><td>plane </td></tr> 332 <tr><td class="paramname">bottom</td><td>plane </td></tr> 333 <tr><td class="paramname">near</td><td>plane </td></tr> 334 <tr><td class="paramname">far</td><td>plane </td></tr> 335 </table> 336 </dd> 337 </dl> 338 339 <p>Definition at line <a class="el" href="rs__math_8rsh_source.html#l00102">102</a> of file <a class="el" href="rs__math_8rsh_source.html">rs_math.rsh</a>.</p> 340 341 </div> 342 </div> 343 <a class="anchor" id="ac4f127e78da0849321c7f6db14f9e989"></a><!-- doxytag: member="rs_math.rsh::rsFrac" ref="ac4f127e78da0849321c7f6db14f9e989" args="(float)" --> 344 <div class="memitem"> 345 <div class="memproto"> 346 <table class="memname"> 347 <tr> 348 <td class="memname">float rsFrac </td> 349 <td>(</td> 350 <td class="paramtype">float </td> 351 <td class="paramname"></td><td>)</td> 352 <td></td> 353 </tr> 354 </table> 355 </div> 356 <div class="memdoc"> 357 <p>Returns the fractional part of a float </p> 358 359 </div> 360 </div> 361 <a class="anchor" id="a7bbeaf44838e08e68d5cf3e3d7b0818c"></a><!-- doxytag: member="rs_math.rsh::rsIsSphereInFrustum" ref="a7bbeaf44838e08e68d5cf3e3d7b0818c" args="(float4 *sphere, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far)" --> 362 <div class="memitem"> 363 <div class="memproto"> 364 <table class="memname"> 365 <tr> 366 <td class="memname">static __inline__ bool rsIsSphereInFrustum </td> 367 <td>(</td> 368 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 369 <td class="paramname"><em>sphere</em>, </td> 370 </tr> 371 <tr> 372 <td class="paramkey"></td> 373 <td></td> 374 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 375 <td class="paramname"><em>left</em>, </td> 376 </tr> 377 <tr> 378 <td class="paramkey"></td> 379 <td></td> 380 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 381 <td class="paramname"><em>right</em>, </td> 382 </tr> 383 <tr> 384 <td class="paramkey"></td> 385 <td></td> 386 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 387 <td class="paramname"><em>top</em>, </td> 388 </tr> 389 <tr> 390 <td class="paramkey"></td> 391 <td></td> 392 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 393 <td class="paramname"><em>bottom</em>, </td> 394 </tr> 395 <tr> 396 <td class="paramkey"></td> 397 <td></td> 398 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 399 <td class="paramname"><em>near</em>, </td> 400 </tr> 401 <tr> 402 <td class="paramkey"></td> 403 <td></td> 404 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> * </td> 405 <td class="paramname"><em>far</em> </td> 406 </tr> 407 <tr> 408 <td></td> 409 <td>)</td> 410 <td></td><td><code> [static]</code></td> 411 </tr> 412 </table> 413 </div> 414 <div class="memdoc"> 415 <p>Checks if a sphere is withing the 6 frustum planes </p> 416 <dl><dt><b>Parameters:</b></dt><dd> 417 <table class="params"> 418 <tr><td class="paramname">sphere</td><td>float4 representing the sphere </td></tr> 419 <tr><td class="paramname">left</td><td>plane </td></tr> 420 <tr><td class="paramname">right</td><td>plane </td></tr> 421 <tr><td class="paramname">top</td><td>plane </td></tr> 422 <tr><td class="paramname">bottom</td><td>plane </td></tr> 423 <tr><td class="paramname">near</td><td>plane </td></tr> 424 <tr><td class="paramname">far</td><td>plane </td></tr> 425 </table> 426 </dd> 427 </dl> 428 429 <p>Definition at line <a class="el" href="rs__math_8rsh_source.html#l00162">162</a> of file <a class="el" href="rs__math_8rsh_source.html">rs_math.rsh</a>.</p> 430 431 </div> 432 </div> 433 <a class="anchor" id="a5e20d326a6e2532d19a493b01f948c17"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a5e20d326a6e2532d19a493b01f948c17" args="(float r, float g, float b)" --> 434 <div class="memitem"> 435 <div class="memproto"> 436 <table class="memname"> 437 <tr> 438 <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td> 439 <td>(</td> 440 <td class="paramtype">float </td> 441 <td class="paramname"><em>r</em>, </td> 442 </tr> 443 <tr> 444 <td class="paramkey"></td> 445 <td></td> 446 <td class="paramtype">float </td> 447 <td class="paramname"><em>g</em>, </td> 448 </tr> 449 <tr> 450 <td class="paramkey"></td> 451 <td></td> 452 <td class="paramtype">float </td> 453 <td class="paramname"><em>b</em> </td> 454 </tr> 455 <tr> 456 <td></td> 457 <td>)</td> 458 <td></td><td></td> 459 </tr> 460 </table> 461 </div> 462 <div class="memdoc"> 463 <p>Pack floating point (0-1) RGB values into a uchar4. The alpha component is set to 255 (1.0).</p> 464 <dl><dt><b>Parameters:</b></dt><dd> 465 <table class="params"> 466 <tr><td class="paramname">r</td><td></td></tr> 467 <tr><td class="paramname">g</td><td></td></tr> 468 <tr><td class="paramname">b</td><td></td></tr> 469 </table> 470 </dd> 471 </dl> 472 <dl class="return"><dt><b>Returns:</b></dt><dd>uchar4 </dd></dl> 473 474 </div> 475 </div> 476 <a class="anchor" id="a1f1107cf778cf1f614edfb5b8ac436a0"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a1f1107cf778cf1f614edfb5b8ac436a0" args="(float r, float g, float b, float a)" --> 477 <div class="memitem"> 478 <div class="memproto"> 479 <table class="memname"> 480 <tr> 481 <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td> 482 <td>(</td> 483 <td class="paramtype">float </td> 484 <td class="paramname"><em>r</em>, </td> 485 </tr> 486 <tr> 487 <td class="paramkey"></td> 488 <td></td> 489 <td class="paramtype">float </td> 490 <td class="paramname"><em>g</em>, </td> 491 </tr> 492 <tr> 493 <td class="paramkey"></td> 494 <td></td> 495 <td class="paramtype">float </td> 496 <td class="paramname"><em>b</em>, </td> 497 </tr> 498 <tr> 499 <td class="paramkey"></td> 500 <td></td> 501 <td class="paramtype">float </td> 502 <td class="paramname"><em>a</em> </td> 503 </tr> 504 <tr> 505 <td></td> 506 <td>)</td> 507 <td></td><td></td> 508 </tr> 509 </table> 510 </div> 511 <div class="memdoc"> 512 <p>Pack floating point (0-1) RGBA values into a uchar4.</p> 513 <dl><dt><b>Parameters:</b></dt><dd> 514 <table class="params"> 515 <tr><td class="paramname">r</td><td></td></tr> 516 <tr><td class="paramname">g</td><td></td></tr> 517 <tr><td class="paramname">b</td><td></td></tr> 518 <tr><td class="paramname">a</td><td></td></tr> 519 </table> 520 </dd> 521 </dl> 522 <dl class="return"><dt><b>Returns:</b></dt><dd>uchar4 </dd></dl> 523 524 </div> 525 </div> 526 <a class="anchor" id="ac30a8c020eade2b57fd5966cb7c8665e"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="ac30a8c020eade2b57fd5966cb7c8665e" args="(float3 color)" --> 527 <div class="memitem"> 528 <div class="memproto"> 529 <table class="memname"> 530 <tr> 531 <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td> 532 <td>(</td> 533 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> </td> 534 <td class="paramname"><em>color</em></td><td>)</td> 535 <td></td> 536 </tr> 537 </table> 538 </div> 539 <div class="memdoc"> 540 <p>Pack floating point (0-1) RGB values into a uchar4. The alpha component is set to 255 (1.0).</p> 541 <dl><dt><b>Parameters:</b></dt><dd> 542 <table class="params"> 543 <tr><td class="paramname">color</td><td></td></tr> 544 </table> 545 </dd> 546 </dl> 547 <dl class="return"><dt><b>Returns:</b></dt><dd>uchar4</dd></dl> 548 <p>Pack floating point (0-1) RGBA values into a uchar4.</p> 549 <dl><dt><b>Parameters:</b></dt><dd> 550 <table class="params"> 551 <tr><td class="paramname">color</td><td></td></tr> 552 </table> 553 </dd> 554 </dl> 555 <dl class="return"><dt><b>Returns:</b></dt><dd>uchar4 </dd></dl> 556 557 </div> 558 </div> 559 <a class="anchor" id="ad9106e5aae5b1248870f21061f36a1c9"></a><!-- doxytag: member="rs_math.rsh::rsRand" ref="ad9106e5aae5b1248870f21061f36a1c9" args="(int max_value)" --> 560 <div class="memitem"> 561 <div class="memproto"> 562 <table class="memname"> 563 <tr> 564 <td class="memname">int rsRand </td> 565 <td>(</td> 566 <td class="paramtype">int </td> 567 <td class="paramname"><em>max_value</em></td><td>)</td> 568 <td></td> 569 </tr> 570 </table> 571 </div> 572 <div class="memdoc"> 573 <p>Return a random value between 0 (or min_value) and max_malue. </p> 574 575 </div> 576 </div> 577 <a class="anchor" id="a01edf1cf3cdaecb1629761b69148e189"></a><!-- doxytag: member="rs_math.rsh::rsRand" ref="a01edf1cf3cdaecb1629761b69148e189" args="(int min_value, int max_value)" --> 578 <div class="memitem"> 579 <div class="memproto"> 580 <table class="memname"> 581 <tr> 582 <td class="memname">int rsRand </td> 583 <td>(</td> 584 <td class="paramtype">int </td> 585 <td class="paramname"><em>min_value</em>, </td> 586 </tr> 587 <tr> 588 <td class="paramkey"></td> 589 <td></td> 590 <td class="paramtype">int </td> 591 <td class="paramname"><em>max_value</em> </td> 592 </tr> 593 <tr> 594 <td></td> 595 <td>)</td> 596 <td></td><td></td> 597 </tr> 598 </table> 599 </div> 600 <div class="memdoc"> 601 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 602 603 </div> 604 </div> 605 <a class="anchor" id="a03e898d810ac44158e7461b2b2b1c356"></a><!-- doxytag: member="rs_math.rsh::rsRand" ref="a03e898d810ac44158e7461b2b2b1c356" args="(float max_value)" --> 606 <div class="memitem"> 607 <div class="memproto"> 608 <table class="memname"> 609 <tr> 610 <td class="memname">float rsRand </td> 611 <td>(</td> 612 <td class="paramtype">float </td> 613 <td class="paramname"><em>max_value</em></td><td>)</td> 614 <td></td> 615 </tr> 616 </table> 617 </div> 618 <div class="memdoc"> 619 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 620 621 </div> 622 </div> 623 <a class="anchor" id="a84b2e7468314873b3aa02969e310d9e4"></a><!-- doxytag: member="rs_math.rsh::rsRand" ref="a84b2e7468314873b3aa02969e310d9e4" args="(float min_value, float max_value)" --> 624 <div class="memitem"> 625 <div class="memproto"> 626 <table class="memname"> 627 <tr> 628 <td class="memname">float rsRand </td> 629 <td>(</td> 630 <td class="paramtype">float </td> 631 <td class="paramname"><em>min_value</em>, </td> 632 </tr> 633 <tr> 634 <td class="paramkey"></td> 635 <td></td> 636 <td class="paramtype">float </td> 637 <td class="paramname"><em>max_value</em> </td> 638 </tr> 639 <tr> 640 <td></td> 641 <td>)</td> 642 <td></td><td></td> 643 </tr> 644 </table> 645 </div> 646 <div class="memdoc"> 647 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 648 649 </div> 650 </div> 651 <a class="anchor" id="a48bb0c2e7b1f2b62b2a8970c7d709eca"></a><!-- doxytag: member="rs_math.rsh::rsUnpackColor8888" ref="a48bb0c2e7b1f2b62b2a8970c7d709eca" args="(uchar4 c)" --> 652 <div class="memitem"> 653 <div class="memproto"> 654 <table class="memname"> 655 <tr> 656 <td class="memname"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsUnpackColor8888 </td> 657 <td>(</td> 658 <td class="paramtype"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> </td> 659 <td class="paramname"><em>c</em></td><td>)</td> 660 <td></td> 661 </tr> 662 </table> 663 </div> 664 <div class="memdoc"> 665 <p>Unpack a uchar4 color to float4. The resulting float range will be (0-1).</p> 666 <dl><dt><b>Parameters:</b></dt><dd> 667 <table class="params"> 668 <tr><td class="paramname">c</td><td></td></tr> 669 </table> 670 </dd> 671 </dl> 672 <dl class="return"><dt><b>Returns:</b></dt><dd>float4 </dd></dl> 673 674 </div> 675 </div> 676 </div> 677 678 </body> 679 </html> 680