[1488] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
---|
| 3 | <title>Indirect Environment Mapping: EnvMap.cpp File Reference</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | </head><body> |
---|
| 6 | <!-- Generated by Doxygen 1.4.2 --> |
---|
| 7 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div> |
---|
| 8 | <h1>EnvMap.cpp File Reference</h1><code>#include "dxstdafx.h"</code><br> |
---|
| 9 | <code>#include "<a class="el" href="resource_8h.html">resource.h</a>"</code><br> |
---|
| 10 | <code>#include <time.h></code><br> |
---|
| 11 | <code>#include "<a class="el" href="_cube_8h.html">Cube.h</a>"</code><br> |
---|
| 12 | <code>#include "<a class="el" href="_mesh_8h.html">Mesh.h</a>"</code><br> |
---|
| 13 | <code>#include "<a class="el" href="_parameters_8h.html">Parameters.h</a>"</code><br> |
---|
| 14 | <code>#include "<a class="el" href="_env_map_8h.html">EnvMap.h</a>"</code><br> |
---|
| 15 | <table border="0" cellpadding="0" cellspacing="0"> |
---|
| 16 | <tr><td></td></tr> |
---|
| 17 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
---|
| 18 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a0">MESH0</a> L"Media\\Objects\\room.x"</td></tr> |
---|
| 19 | |
---|
| 20 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a1">MESH1</a> L"Media\\Objects\\sphere.x"</td></tr> |
---|
| 21 | |
---|
| 22 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a2">MESH2</a> L"Media\\Objects\\column.x"</td></tr> |
---|
| 23 | |
---|
| 24 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a3">MESH3</a> L"Media\\Objects\\teapot.x"</td></tr> |
---|
| 25 | |
---|
| 26 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a4">MESH4</a> L"Media\\Objects\\ring.x"</td></tr> |
---|
| 27 | |
---|
| 28 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a5">MESH5</a> L"Media\\Objects\\lamp01.x"</td></tr> |
---|
| 29 | |
---|
| 30 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a6">MESH6</a> L"Media\\Objects\\happy.x"</td></tr> |
---|
| 31 | |
---|
| 32 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a7">MESH7</a> L"Media\\Objects\\dragon.x"</td></tr> |
---|
| 33 | |
---|
| 34 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a8">MESH8</a> L"Media\\Objects\\bunny.x"</td></tr> |
---|
| 35 | |
---|
| 36 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a9">MESH9</a> L"Media\\Objects\\skullocc.x"</td></tr> |
---|
| 37 | |
---|
| 38 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a10">TEX0</a> L"Media\\Maps\\white.png"</td></tr> |
---|
| 39 | |
---|
| 40 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a11">TEX1</a> L"Media\\Maps\\pixel-grid-gy.png"</td></tr> |
---|
| 41 | |
---|
| 42 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a12">TEX2</a> L"Media\\Maps\\fire.jpg"</td></tr> |
---|
| 43 | |
---|
| 44 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a13">ROOM_TEXTURE</a> L"Media\\Maps\\pixel-grid-b.png"</td></tr> |
---|
| 45 | |
---|
| 46 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a14">CUBEMAP_SIZE</a> 128</td></tr> |
---|
| 47 | |
---|
| 48 | <tr><td class="mdescLeft"> </td><td class="mdescRight">size of the cube map taken from the reference point of the object <a href="#a14"></a><br></td></tr> |
---|
| 49 | <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a15">M</a> 10</td></tr> |
---|
| 50 | |
---|
| 51 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of samples when precomputing geometric factors. <a href="#a15"></a><br></td></tr> |
---|
| 52 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
| 53 | <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a19">eval</a> (float cos_theta, float dw)</td></tr> |
---|
| 54 | |
---|
| 55 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates the reflectivity integral for a given texel. <a href="#a19"></a><br></td></tr> |
---|
| 56 | <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a20">evaluate</a> (float dx, float dy)</td></tr> |
---|
| 57 | |
---|
| 58 | <tr><td colspan="2"><br><h2>Variables</h2></td></tr> |
---|
| 59 | <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a16">LR_CUBEMAP_SIZE</a> = 2</td></tr> |
---|
| 60 | |
---|
| 61 | <tr><td class="mdescLeft"> </td><td class="mdescRight">size of the cube map for diffuse/glossy reflections <a href="#a16"></a><br></td></tr> |
---|
| 62 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_parameters.html">Parameters</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a17">pp</a></td></tr> |
---|
| 63 | |
---|
| 64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">HELPER CLASS TO MANAGE VARIOUS PARAMETERS. <a href="#a17"></a><br></td></tr> |
---|
| 65 | <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="_env_map_8cpp.html#a18">bPreproc</a> = false</td></tr> |
---|
| 66 | |
---|
| 67 | </table> |
---|
| 68 | <hr><h2>Define Documentation</h2> |
---|
| 69 | <a class="anchor" name="a14" doxytag="EnvMap.cpp::CUBEMAP_SIZE"></a><p> |
---|
| 70 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 71 | <tr> |
---|
| 72 | <td class="mdRow"> |
---|
| 73 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 74 | <tr> |
---|
| 75 | <td class="md" nowrap valign="top">#define CUBEMAP_SIZE 128 </td> |
---|
| 76 | </tr> |
---|
| 77 | </table> |
---|
| 78 | </td> |
---|
| 79 | </tr> |
---|
| 80 | </table> |
---|
| 81 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 82 | <tr> |
---|
| 83 | <td> |
---|
| 84 | |
---|
| 85 | </td> |
---|
| 86 | <td> |
---|
| 87 | |
---|
| 88 | <p> |
---|
| 89 | size of the cube map taken from the reference point of the object |
---|
| 90 | <p> |
---|
| 91 | </td> |
---|
| 92 | </tr> |
---|
| 93 | </table> |
---|
| 94 | <a class="anchor" name="a15" doxytag="EnvMap.cpp::M"></a><p> |
---|
| 95 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 96 | <tr> |
---|
| 97 | <td class="mdRow"> |
---|
| 98 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 99 | <tr> |
---|
| 100 | <td class="md" nowrap valign="top">#define M 10 </td> |
---|
| 101 | </tr> |
---|
| 102 | </table> |
---|
| 103 | </td> |
---|
| 104 | </tr> |
---|
| 105 | </table> |
---|
| 106 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 107 | <tr> |
---|
| 108 | <td> |
---|
| 109 | |
---|
| 110 | </td> |
---|
| 111 | <td> |
---|
| 112 | |
---|
| 113 | <p> |
---|
| 114 | Number of samples when precomputing geometric factors. |
---|
| 115 | <p> |
---|
| 116 | </td> |
---|
| 117 | </tr> |
---|
| 118 | </table> |
---|
| 119 | <a class="anchor" name="a0" doxytag="EnvMap.cpp::MESH0"></a><p> |
---|
| 120 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 121 | <tr> |
---|
| 122 | <td class="mdRow"> |
---|
| 123 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 124 | <tr> |
---|
| 125 | <td class="md" nowrap valign="top">#define MESH0 L"Media\\Objects\\room.x" </td> |
---|
| 126 | </tr> |
---|
| 127 | </table> |
---|
| 128 | </td> |
---|
| 129 | </tr> |
---|
| 130 | </table> |
---|
| 131 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 132 | <tr> |
---|
| 133 | <td> |
---|
| 134 | |
---|
| 135 | </td> |
---|
| 136 | <td> |
---|
| 137 | |
---|
| 138 | <p> |
---|
| 139 | </td> |
---|
| 140 | </tr> |
---|
| 141 | </table> |
---|
| 142 | <a class="anchor" name="a1" doxytag="EnvMap.cpp::MESH1"></a><p> |
---|
| 143 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 144 | <tr> |
---|
| 145 | <td class="mdRow"> |
---|
| 146 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 147 | <tr> |
---|
| 148 | <td class="md" nowrap valign="top">#define MESH1 L"Media\\Objects\\sphere.x" </td> |
---|
| 149 | </tr> |
---|
| 150 | </table> |
---|
| 151 | </td> |
---|
| 152 | </tr> |
---|
| 153 | </table> |
---|
| 154 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 155 | <tr> |
---|
| 156 | <td> |
---|
| 157 | |
---|
| 158 | </td> |
---|
| 159 | <td> |
---|
| 160 | |
---|
| 161 | <p> |
---|
| 162 | </td> |
---|
| 163 | </tr> |
---|
| 164 | </table> |
---|
| 165 | <a class="anchor" name="a2" doxytag="EnvMap.cpp::MESH2"></a><p> |
---|
| 166 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 167 | <tr> |
---|
| 168 | <td class="mdRow"> |
---|
| 169 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 170 | <tr> |
---|
| 171 | <td class="md" nowrap valign="top">#define MESH2 L"Media\\Objects\\column.x" </td> |
---|
| 172 | </tr> |
---|
| 173 | </table> |
---|
| 174 | </td> |
---|
| 175 | </tr> |
---|
| 176 | </table> |
---|
| 177 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 178 | <tr> |
---|
| 179 | <td> |
---|
| 180 | |
---|
| 181 | </td> |
---|
| 182 | <td> |
---|
| 183 | |
---|
| 184 | <p> |
---|
| 185 | </td> |
---|
| 186 | </tr> |
---|
| 187 | </table> |
---|
| 188 | <a class="anchor" name="a3" doxytag="EnvMap.cpp::MESH3"></a><p> |
---|
| 189 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 190 | <tr> |
---|
| 191 | <td class="mdRow"> |
---|
| 192 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 193 | <tr> |
---|
| 194 | <td class="md" nowrap valign="top">#define MESH3 L"Media\\Objects\\teapot.x" </td> |
---|
| 195 | </tr> |
---|
| 196 | </table> |
---|
| 197 | </td> |
---|
| 198 | </tr> |
---|
| 199 | </table> |
---|
| 200 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 201 | <tr> |
---|
| 202 | <td> |
---|
| 203 | |
---|
| 204 | </td> |
---|
| 205 | <td> |
---|
| 206 | |
---|
| 207 | <p> |
---|
| 208 | </td> |
---|
| 209 | </tr> |
---|
| 210 | </table> |
---|
| 211 | <a class="anchor" name="a4" doxytag="EnvMap.cpp::MESH4"></a><p> |
---|
| 212 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 213 | <tr> |
---|
| 214 | <td class="mdRow"> |
---|
| 215 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 216 | <tr> |
---|
| 217 | <td class="md" nowrap valign="top">#define MESH4 L"Media\\Objects\\ring.x" </td> |
---|
| 218 | </tr> |
---|
| 219 | </table> |
---|
| 220 | </td> |
---|
| 221 | </tr> |
---|
| 222 | </table> |
---|
| 223 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 224 | <tr> |
---|
| 225 | <td> |
---|
| 226 | |
---|
| 227 | </td> |
---|
| 228 | <td> |
---|
| 229 | |
---|
| 230 | <p> |
---|
| 231 | </td> |
---|
| 232 | </tr> |
---|
| 233 | </table> |
---|
| 234 | <a class="anchor" name="a5" doxytag="EnvMap.cpp::MESH5"></a><p> |
---|
| 235 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 236 | <tr> |
---|
| 237 | <td class="mdRow"> |
---|
| 238 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 239 | <tr> |
---|
| 240 | <td class="md" nowrap valign="top">#define MESH5 L"Media\\Objects\\lamp01.x" </td> |
---|
| 241 | </tr> |
---|
| 242 | </table> |
---|
| 243 | </td> |
---|
| 244 | </tr> |
---|
| 245 | </table> |
---|
| 246 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 247 | <tr> |
---|
| 248 | <td> |
---|
| 249 | |
---|
| 250 | </td> |
---|
| 251 | <td> |
---|
| 252 | |
---|
| 253 | <p> |
---|
| 254 | </td> |
---|
| 255 | </tr> |
---|
| 256 | </table> |
---|
| 257 | <a class="anchor" name="a6" doxytag="EnvMap.cpp::MESH6"></a><p> |
---|
| 258 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 259 | <tr> |
---|
| 260 | <td class="mdRow"> |
---|
| 261 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 262 | <tr> |
---|
| 263 | <td class="md" nowrap valign="top">#define MESH6 L"Media\\Objects\\happy.x" </td> |
---|
| 264 | </tr> |
---|
| 265 | </table> |
---|
| 266 | </td> |
---|
| 267 | </tr> |
---|
| 268 | </table> |
---|
| 269 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 270 | <tr> |
---|
| 271 | <td> |
---|
| 272 | |
---|
| 273 | </td> |
---|
| 274 | <td> |
---|
| 275 | |
---|
| 276 | <p> |
---|
| 277 | </td> |
---|
| 278 | </tr> |
---|
| 279 | </table> |
---|
| 280 | <a class="anchor" name="a7" doxytag="EnvMap.cpp::MESH7"></a><p> |
---|
| 281 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 282 | <tr> |
---|
| 283 | <td class="mdRow"> |
---|
| 284 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 285 | <tr> |
---|
| 286 | <td class="md" nowrap valign="top">#define MESH7 L"Media\\Objects\\dragon.x" </td> |
---|
| 287 | </tr> |
---|
| 288 | </table> |
---|
| 289 | </td> |
---|
| 290 | </tr> |
---|
| 291 | </table> |
---|
| 292 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 293 | <tr> |
---|
| 294 | <td> |
---|
| 295 | |
---|
| 296 | </td> |
---|
| 297 | <td> |
---|
| 298 | |
---|
| 299 | <p> |
---|
| 300 | </td> |
---|
| 301 | </tr> |
---|
| 302 | </table> |
---|
| 303 | <a class="anchor" name="a8" doxytag="EnvMap.cpp::MESH8"></a><p> |
---|
| 304 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 305 | <tr> |
---|
| 306 | <td class="mdRow"> |
---|
| 307 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 308 | <tr> |
---|
| 309 | <td class="md" nowrap valign="top">#define MESH8 L"Media\\Objects\\bunny.x" </td> |
---|
| 310 | </tr> |
---|
| 311 | </table> |
---|
| 312 | </td> |
---|
| 313 | </tr> |
---|
| 314 | </table> |
---|
| 315 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 316 | <tr> |
---|
| 317 | <td> |
---|
| 318 | |
---|
| 319 | </td> |
---|
| 320 | <td> |
---|
| 321 | |
---|
| 322 | <p> |
---|
| 323 | </td> |
---|
| 324 | </tr> |
---|
| 325 | </table> |
---|
| 326 | <a class="anchor" name="a9" doxytag="EnvMap.cpp::MESH9"></a><p> |
---|
| 327 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 328 | <tr> |
---|
| 329 | <td class="mdRow"> |
---|
| 330 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 331 | <tr> |
---|
| 332 | <td class="md" nowrap valign="top">#define MESH9 L"Media\\Objects\\skullocc.x" </td> |
---|
| 333 | </tr> |
---|
| 334 | </table> |
---|
| 335 | </td> |
---|
| 336 | </tr> |
---|
| 337 | </table> |
---|
| 338 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 339 | <tr> |
---|
| 340 | <td> |
---|
| 341 | |
---|
| 342 | </td> |
---|
| 343 | <td> |
---|
| 344 | |
---|
| 345 | <p> |
---|
| 346 | </td> |
---|
| 347 | </tr> |
---|
| 348 | </table> |
---|
| 349 | <a class="anchor" name="a13" doxytag="EnvMap.cpp::ROOM_TEXTURE"></a><p> |
---|
| 350 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 351 | <tr> |
---|
| 352 | <td class="mdRow"> |
---|
| 353 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 354 | <tr> |
---|
| 355 | <td class="md" nowrap valign="top">#define ROOM_TEXTURE L"Media\\Maps\\pixel-grid-b.png" </td> |
---|
| 356 | </tr> |
---|
| 357 | </table> |
---|
| 358 | </td> |
---|
| 359 | </tr> |
---|
| 360 | </table> |
---|
| 361 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 362 | <tr> |
---|
| 363 | <td> |
---|
| 364 | |
---|
| 365 | </td> |
---|
| 366 | <td> |
---|
| 367 | |
---|
| 368 | <p> |
---|
| 369 | </td> |
---|
| 370 | </tr> |
---|
| 371 | </table> |
---|
| 372 | <a class="anchor" name="a10" doxytag="EnvMap.cpp::TEX0"></a><p> |
---|
| 373 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 374 | <tr> |
---|
| 375 | <td class="mdRow"> |
---|
| 376 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 377 | <tr> |
---|
| 378 | <td class="md" nowrap valign="top">#define TEX0 L"Media\\Maps\\white.png" </td> |
---|
| 379 | </tr> |
---|
| 380 | </table> |
---|
| 381 | </td> |
---|
| 382 | </tr> |
---|
| 383 | </table> |
---|
| 384 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 385 | <tr> |
---|
| 386 | <td> |
---|
| 387 | |
---|
| 388 | </td> |
---|
| 389 | <td> |
---|
| 390 | |
---|
| 391 | <p> |
---|
| 392 | </td> |
---|
| 393 | </tr> |
---|
| 394 | </table> |
---|
| 395 | <a class="anchor" name="a11" doxytag="EnvMap.cpp::TEX1"></a><p> |
---|
| 396 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 397 | <tr> |
---|
| 398 | <td class="mdRow"> |
---|
| 399 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 400 | <tr> |
---|
| 401 | <td class="md" nowrap valign="top">#define TEX1 L"Media\\Maps\\pixel-grid-gy.png" </td> |
---|
| 402 | </tr> |
---|
| 403 | </table> |
---|
| 404 | </td> |
---|
| 405 | </tr> |
---|
| 406 | </table> |
---|
| 407 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 408 | <tr> |
---|
| 409 | <td> |
---|
| 410 | |
---|
| 411 | </td> |
---|
| 412 | <td> |
---|
| 413 | |
---|
| 414 | <p> |
---|
| 415 | </td> |
---|
| 416 | </tr> |
---|
| 417 | </table> |
---|
| 418 | <a class="anchor" name="a12" doxytag="EnvMap.cpp::TEX2"></a><p> |
---|
| 419 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 420 | <tr> |
---|
| 421 | <td class="mdRow"> |
---|
| 422 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 423 | <tr> |
---|
| 424 | <td class="md" nowrap valign="top">#define TEX2 L"Media\\Maps\\fire.jpg" </td> |
---|
| 425 | </tr> |
---|
| 426 | </table> |
---|
| 427 | </td> |
---|
| 428 | </tr> |
---|
| 429 | </table> |
---|
| 430 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 431 | <tr> |
---|
| 432 | <td> |
---|
| 433 | |
---|
| 434 | </td> |
---|
| 435 | <td> |
---|
| 436 | |
---|
| 437 | <p> |
---|
| 438 | </td> |
---|
| 439 | </tr> |
---|
| 440 | </table> |
---|
| 441 | <hr><h2>Function Documentation</h2> |
---|
| 442 | <a class="anchor" name="a19" doxytag="EnvMap.cpp::eval"></a><p> |
---|
| 443 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 444 | <tr> |
---|
| 445 | <td class="mdRow"> |
---|
| 446 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 447 | <tr> |
---|
| 448 | <td class="md" nowrap valign="top">float eval </td> |
---|
| 449 | <td class="md" valign="top">( </td> |
---|
| 450 | <td class="md" nowrap valign="top">float </td> |
---|
| 451 | <td class="mdname" nowrap> <em>cos_theta</em>, </td> |
---|
| 452 | </tr> |
---|
| 453 | <tr> |
---|
| 454 | <td class="md" nowrap align="right"></td> |
---|
| 455 | <td class="md"></td> |
---|
| 456 | <td class="md" nowrap>float </td> |
---|
| 457 | <td class="mdname" nowrap> <em>dw</em></td> |
---|
| 458 | </tr> |
---|
| 459 | <tr> |
---|
| 460 | <td class="md"></td> |
---|
| 461 | <td class="md">) </td> |
---|
| 462 | <td class="md" colspan="2"></td> |
---|
| 463 | </tr> |
---|
| 464 | </table> |
---|
| 465 | </td> |
---|
| 466 | </tr> |
---|
| 467 | </table> |
---|
| 468 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 469 | <tr> |
---|
| 470 | <td> |
---|
| 471 | |
---|
| 472 | </td> |
---|
| 473 | <td> |
---|
| 474 | |
---|
| 475 | <p> |
---|
| 476 | Calculates the reflectivity integral for a given texel. |
---|
| 477 | <p> |
---|
| 478 | The angle between the surface normal and texel center is described by cos_theta and the solid angle occupied by the texel is denoted by dw.<p> |
---|
| 479 | Instead of evaluating the reflectivity integral with only one sample belongig to the texel center (that would give us a result of cos_theta x dw), we use 2 <a class="el" href="_env_map_8cpp.html#a15">M</a> x 2 <a class="el" href="_env_map_8cpp.html#a15">M</a> x <a class="el" href="_env_map_8cpp.html#a15">M</a> regulary spaced samples, and discard those that lie outside the unit hemisphere. The remaining samples are regulary distributed over the hemisphere.<p> |
---|
| 480 | For each sample, we check if it lies inside the cone of the specified solid angle. If yes, its contribution is considered. </td> |
---|
| 481 | </tr> |
---|
| 482 | </table> |
---|
| 483 | <a class="anchor" name="a20" doxytag="EnvMap.cpp::evaluate"></a><p> |
---|
| 484 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 485 | <tr> |
---|
| 486 | <td class="mdRow"> |
---|
| 487 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 488 | <tr> |
---|
| 489 | <td class="md" nowrap valign="top">float evaluate </td> |
---|
| 490 | <td class="md" valign="top">( </td> |
---|
| 491 | <td class="md" nowrap valign="top">float </td> |
---|
| 492 | <td class="mdname" nowrap> <em>dx</em>, </td> |
---|
| 493 | </tr> |
---|
| 494 | <tr> |
---|
| 495 | <td class="md" nowrap align="right"></td> |
---|
| 496 | <td class="md"></td> |
---|
| 497 | <td class="md" nowrap>float </td> |
---|
| 498 | <td class="mdname" nowrap> <em>dy</em></td> |
---|
| 499 | </tr> |
---|
| 500 | <tr> |
---|
| 501 | <td class="md"></td> |
---|
| 502 | <td class="md">) </td> |
---|
| 503 | <td class="md" colspan="2"></td> |
---|
| 504 | </tr> |
---|
| 505 | </table> |
---|
| 506 | </td> |
---|
| 507 | </tr> |
---|
| 508 | </table> |
---|
| 509 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 510 | <tr> |
---|
| 511 | <td> |
---|
| 512 | |
---|
| 513 | </td> |
---|
| 514 | <td> |
---|
| 515 | |
---|
| 516 | <p> |
---|
| 517 | </td> |
---|
| 518 | </tr> |
---|
| 519 | </table> |
---|
| 520 | <hr><h2>Variable Documentation</h2> |
---|
| 521 | <a class="anchor" name="a18" doxytag="EnvMap.cpp::bPreproc"></a><p> |
---|
| 522 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 523 | <tr> |
---|
| 524 | <td class="mdRow"> |
---|
| 525 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 526 | <tr> |
---|
| 527 | <td class="md" nowrap valign="top">bool <a class="el" href="_env_map_8cpp.html#a18">bPreproc</a> = false </td> |
---|
| 528 | </tr> |
---|
| 529 | </table> |
---|
| 530 | </td> |
---|
| 531 | </tr> |
---|
| 532 | </table> |
---|
| 533 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 534 | <tr> |
---|
| 535 | <td> |
---|
| 536 | |
---|
| 537 | </td> |
---|
| 538 | <td> |
---|
| 539 | |
---|
| 540 | <p> |
---|
| 541 | </td> |
---|
| 542 | </tr> |
---|
| 543 | </table> |
---|
| 544 | <a class="anchor" name="a16" doxytag="EnvMap.cpp::LR_CUBEMAP_SIZE"></a><p> |
---|
| 545 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 546 | <tr> |
---|
| 547 | <td class="mdRow"> |
---|
| 548 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 549 | <tr> |
---|
| 550 | <td class="md" nowrap valign="top">int <a class="el" href="_env_map_8fx.html#a9">LR_CUBEMAP_SIZE</a> = 2 </td> |
---|
| 551 | </tr> |
---|
| 552 | </table> |
---|
| 553 | </td> |
---|
| 554 | </tr> |
---|
| 555 | </table> |
---|
| 556 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 557 | <tr> |
---|
| 558 | <td> |
---|
| 559 | |
---|
| 560 | </td> |
---|
| 561 | <td> |
---|
| 562 | |
---|
| 563 | <p> |
---|
| 564 | size of the cube map for diffuse/glossy reflections |
---|
| 565 | <p> |
---|
| 566 | </td> |
---|
| 567 | </tr> |
---|
| 568 | </table> |
---|
| 569 | <a class="anchor" name="a17" doxytag="EnvMap.cpp::pp"></a><p> |
---|
| 570 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
---|
| 571 | <tr> |
---|
| 572 | <td class="mdRow"> |
---|
| 573 | <table cellpadding="0" cellspacing="0" border="0"> |
---|
| 574 | <tr> |
---|
| 575 | <td class="md" nowrap valign="top"><a class="el" href="class_parameters.html">Parameters</a> <a class="el" href="_main_8cpp.html#a7">pp</a> </td> |
---|
| 576 | </tr> |
---|
| 577 | </table> |
---|
| 578 | </td> |
---|
| 579 | </tr> |
---|
| 580 | </table> |
---|
| 581 | <table cellspacing="5" cellpadding="0" border="0"> |
---|
| 582 | <tr> |
---|
| 583 | <td> |
---|
| 584 | |
---|
| 585 | </td> |
---|
| 586 | <td> |
---|
| 587 | |
---|
| 588 | <p> |
---|
| 589 | HELPER CLASS TO MANAGE VARIOUS PARAMETERS. |
---|
| 590 | <p> |
---|
| 591 | </td> |
---|
| 592 | </tr> |
---|
| 593 | </table> |
---|
| 594 | <hr size="1"><address style="align: right;"><small>Generated on Wed Aug 23 00:00:39 2006 for Indirect Environment Mapping by |
---|
| 595 | <a href="http://www.doxygen.org/index.html"> |
---|
| 596 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> |
---|
| 597 | </body> |
---|
| 598 | </html> |
---|