Changeset 318
- Timestamp:
- Oct 4, 2010, 10:09:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
presentations/trunk/QtOverview-2010-ESA/QtOverview-2010-ESA.html
r317 r318 7 7 <meta http-equiv="Content-Style-Type" content="text/css" /> 8 8 <meta http-equiv="Content-Script-Type" content="text/javascript" /> 9 <title> Standard Template Library</title>9 <title>Geant4 Visualization</title> 10 10 11 11 <meta name="author" content="Enseignement LAL" /> … … 45 45 <li>Viewer and UI integration</li> 46 46 <li>Rotations</li> 47 <li> Meta Keys</li>47 <li>Keyboard Shortcuts</li> 48 48 <li>Speed improvments in OpenGL drivers</li> 49 49 <li>Make posters</li> … … 61 61 <li><font color="red">Viewer and UI integration</font></li> 62 62 <li>Rotations</li> 63 <li> Meta Keys</li>63 <li>Keyboard Shortcuts</li> 64 64 <li>Speed improvments in OpenGL drivers</li> 65 65 <li>Make posters</li> … … 74 74 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 75 75 76 <h1>Viewer and UI integration (Geant4.9.3)</h1> 77 <center> 78 <img src="./images/G4.9.3.png" height="85%"/> 79 </center> 80 </div> 81 82 <!-- Diapo --> 83 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 84 76 85 <h1>Viewer and UI integration</h1> 77 <p></p> 78 <ul class="incremental"> 79 <li></li> 80 <li></li> 81 <li></li> 82 </ul> 83 </div> 84 85 <!-- Diapo --> 86 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 87 88 <h1>Viewer and UI integration</h1> 89 <p></p> 90 <ul class="incremental"> 91 <li></li> 92 <li></li> 93 <li></li> 94 </ul> 86 <p>This was before Big change in Geant4 Qt Driver</p> 87 <ul class="incremental"> 88 <li> <b>Integration of viewers into UI</b></li> 89 <li> 90 <center> 91 <img src="./images/G4.9.4-History.png" height="75%"/> 92 </center> 93 </li> 94 </ul> 95 </div> 96 97 <!-- Diapo --> 98 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 99 <h1>Viewer and UI integration (History)</h1> 100 <p>What's new ?</p> 101 <ul class="non-incremental"> 102 <li>History/Cout/Help are now integrate into UI</li> 103 <li>Viewers can be view as Tab's</li> 104 <li>We can filter Cout messages</li> 105 <li>Easy help tree to find a command and its help</li> 106 <li>Still old things... : Make videos...</li> 107 </ul> 108 </div> 109 110 <!-- Diapo --> 111 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 112 113 <h1>Viewer and UI integration (Cout)</h1> 114 <center> 115 <img src="./images/G4.9.4-Cout2.png" height="85%"/> 116 </center> 117 </div> 118 <!-- Diapo --> 119 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 120 121 <h1>Viewer and UI integration (Cout without filter)</h1> 122 <center> 123 <img src="./images/G4.9.4-Cout.png" height="85%"/> 124 </center> 125 </div> 126 <!-- Diapo --> 127 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 128 129 <h1>Viewer and UI integration (Help view)</h1> 130 <center> 131 <img src="./images/G4.9.4-Help.png" height="85%"/> 132 </center> 95 133 </div> 96 134 … … 101 139 <li>Viewer and UI integration</li> 102 140 <li><font color="red">Rotations</font></li> 103 <li> Meta Keys</li>141 <li>Keyboard Shortcuts</li> 104 142 <li>Speed improvments in OpenGL drivers</li> 105 143 <li>Make posters</li> … … 116 154 117 155 <h1>Rotations</h1> 118 <p></p> 119 <ul class="incremental"> 120 <li></li> 121 <li></li> 122 <li></li> 123 </ul> 124 </div> 125 126 <!-- Diapo --> 127 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 128 129 <h1>Rotations</h1> 130 <p></p> 131 <ul class="incremental"> 132 <li></li> 133 <li></li> 134 <li></li> 135 </ul> 136 </div> 137 156 <p>Two rotation mode are available : <b>Theta/Phi</b> rotation and <b>'google earth' like</b> </p> 157 <ul class="incremental"> 158 <li><b>Theta/Phi rotation</b> : The default mode 159 <ul class="incremental"> 160 <li>Ensure the up vector to be vertical direction</li> 161 <li>Impossible to reach some points</li> 162 <li>'Not intuitive' behaviour on some angles</li> 163 </ul> 164 </li> 165 <li><b>'google earth like'</b> rotation 166 <ul class="incremental"> 167 <li>Up vector is NOT vertical</li> 168 <li>Could reach all volume angles</li> 169 <li>More 'intuitive' rotation mode</li> 170 </ul> 171 </li> 172 </ul> 173 </div> 174 138 175 <!-- Diapo [Plan] --> 139 176 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> … … 142 179 <li>Viewer and UI integration</li> 143 180 <li>Rotations</li> 144 <li><font color="red"> Meta Keys</font></li>181 <li><font color="red">Keyboard Shortcuts</font></li> 145 182 <li>Speed improvments in OpenGL drivers</li> 146 183 <li>Make posters</li> … … 156 193 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 157 194 158 <h1>Meta Keys</h1> 159 <p></p> 160 <ul class="incremental"> 161 <li></li> 162 <li></li> 163 <li></li> 164 </ul> 165 </div> 166 167 <!-- Diapo --> 168 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 169 170 <h1>Meta Keys</h1> 171 <p></p> 172 <ul class="incremental"> 173 <li></li> 174 <li></li> 175 <li></li> 195 <h1>Keyboard Shortcuts</h1> 196 <p>All move/rotate/zoom commands are available with Keyboard shortcuts. Ex :</p> 197 <ul class="incremental"> 198 <li>ALT + Click and move mouse : rotate volume (google like)</li> 199 <li>Click and move mouse : rotate volume</li> 200 <li>CTRL + Click and mouse move : zoom in/out</li> 201 <li>SHIFT + Click and mouse move : move camera point of view</li> 202 <li>Arrow : move volume</li> 203 <li>'+'/'-' : move volume toward/forward</li> 204 <li>SHIFT + Arrows : rotate volume in phi/theta</li> 205 <li>SHIFT + Arrows : rotate volume in vertical/horizontal</li> 206 <li>CTRL + '+'/'-' : zoom into volume</li> 207 <li>H : reset view to initial position</li> 208 <li>SPACE : Start/Pause video recording</li> 209 <li>RETURN : Stop video recording</li> 176 210 </ul> 177 211 </div> … … 183 217 <li>Viewer and UI integration</li> 184 218 <li>Rotations</li> 185 <li> Meta Keys</li>219 <li>Keyboard Shortcuts</li> 186 220 <li><font color="red">Speed improvments in OpenGL drivers</font></li> 187 221 <li>Make posters</li> … … 201 235 202 236 <p><b>Mac OSX 10.5 : Immediate Mode</b></p> 203 <table border="1" width=" 100%">237 <table border="1" width="80%"> 204 238 <tr> 205 239 <td width="25%"> </td> 206 <td width="30%"> First draw time (sec)</td>207 <td width="20%">Mem (Mo)</td> 208 <td width="25%"> Rotation (fps)</td>209 </tr> 210 <tr> 211 <td width="25%"> Geant 4.9.3</td>240 <td width="30%"><i>First draw time (sec)</i></td> 241 <!-- <td width="20%"><i>Mem (Mo)</i></td> --> 242 <td width="25%"><i>Rotation (fps)</i></td> 243 </tr> 244 <tr> 245 <td width="25%"><i>Geant 4.9.3</i></td> 212 246 <td width="30%">5</td> 213 <td width="20%">45</td> 247 <!-- <td width="20%">45</td> --> 214 248 <td width="25%">0,46</td> 215 249 </tr> 216 250 <tr> 217 <td width="25%"> Geant 4.9.4</td>251 <td width="25%"><i>Geant 4.9.4</i></td> 218 252 <td width="30%">6</td> 219 <td width="20%">48</td> 253 <!-- <td width="20%">48</td> --> 220 254 <td width="25%">0,53</td> 221 255 </tr> 222 </table>256 </table> 223 257 <p><b>Mac OSX 10.6 : Immediate Mode</b></p> 224 <table border="1" width=" 100%">258 <table border="1" width="80%"> 225 259 <tr> 226 260 <td colspan="4"></td> 227 261 </tr> 228 262 <tr> 229 <td width="25%"> Geant 4.9.3</td>263 <td width="25%"><i>Geant 4.9.3</i></td> 230 264 <td width="30%">5</td> 231 <td width="20%">40</td> 265 <!-- <td width="20%">40</td> --> 232 266 <td width="25%">0,6</td> 233 267 </tr> 234 268 <tr> 235 <td width="25%"> Geant 4.9.4</td>269 <td width="25%"><i>Geant 4.9.4</i></td> 236 270 <td width="30%">6</td> 237 <td width="20%">40(<b><font color="red">=</font></b>)</td> 271 <!-- <td width="20%">40(<b><font color="red">=</font></b>)</td> --> 238 272 <td width="25%">0,6</td> 239 273 </tr> 240 274 </table> 241 275 <p><b>Mac OSX 10.5 : Stored Mode</b></p> 242 <table border="1" width=" 100%">243 <tr> 244 <td width="25%"> Geant 4.9.3</td>276 <table border="1" width="80%"> 277 <tr> 278 <td width="25%"><i>Geant 4.9.3</i></td> 245 279 <td width="30%">94</td> 246 <td width="20%">270</td> 280 <!-- <td width="20%">270</td> --> 247 281 <td width="25%">1,2</td> 248 282 </tr> 249 283 <tr> 250 <td width="25%"> Geant 4.9.4</td>284 <td width="25%"><i>Geant 4.9.4</i></td> 251 285 <td width="30%">72 (<b><font color="red">x1,3</font></b>)</td> 252 <td width="20%">270 (<b><font color="red">=</font></b>)</td> 286 <!-- <td width="20%">270 (<b><font color="red">=</font></b>)</td> --> 253 287 <td width="25%">2,66 (<b><font color="red">x2,2</font></b>)</td> 254 288 </tr> 255 289 </table> 256 290 <p><b>Mac OSX 10.6 : Stored Mode</b></p> 257 <table border="1" width=" 100%">258 <tr> 259 <td width="25%"> Geant 4.9.3</td>291 <table border="1" width="80%"> 292 <tr> 293 <td width="25%"><i>Geant 4.9.3</i></td> 260 294 <td width="30%">13</td> 261 <td width="20%">227</td> 295 <!-- <td width="20%">227</td> --> 262 296 <td width="25%">3,73</td> 263 297 </tr> 264 298 <tr> 265 <td width="25%"> Geant 4.9.4</td>299 <td width="25%"><i>Geant 4.9.4</i></td> 266 300 <td width="30%">11 (<b><font color="red">x1,2</font></b>)</td> 267 <td width="20%">210 (<b><font color="red">-5%</font></b>)</td> 301 <!-- <td width="20%">210 (<b><font color="red">-5%</font></b>)</td> --> 268 302 <td width="25%">5,3 (<b><font color="red">x1,43</font></b>)</td> 269 303 </tr> … … 289 323 <li>Viewer and UI integration</li> 290 324 <li>Rotations</li> 291 <li> Meta Keys</li>325 <li>Keyboard Shortcuts</li> 292 326 <li>Speed improvments in OpenGL drivers</li> 293 327 <li><font color="red">Make posters</font></li> … … 306 340 <p></p> 307 341 <ul class="incremental"> 308 <li></li> 309 <li></li> 310 <li></li> 342 <li>Olders Geant4 version can only export up to screen size pictures</li> 343 <li>How could we export bigger file in order to <u>print</u>/<u>exchange screenshots</u>/<u>publish</u>/<u>make poster</u> ?</li> 344 <li>Thanks to gl2ps we could now export up to maximum graphic card capacity size (Ex: Up to <u>8192 x 8192</u> on MacBook Pro) </li> 345 <li>How does it work ?</li> 311 346 </ul> 312 347 </div> … … 316 351 317 352 <h1>Make posters</h1> 318 <p></p> 319 <ul class="incremental"> 320 <li></li> 321 <li></li> 322 <li></li> 323 </ul> 353 <p>Some G4 new commands :</p> 354 <ul class="incremental"> 355 <li>/vis/ogl/set/printMode <i>(vectored or pixmap)</i></li> 356 <li>/vis/ogl/set/printFilename <i>(default G4OpenGL_XX)</i></li> 357 <li>/vis/ogl/set/printSize <i>(< maximum graphic card capacity)</i></li> 358 <li>/vis/ogl/printEPS</li> 359 </ul> 360 </div> 361 362 <!-- Diapo --> 363 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 364 365 <h1>Make posters : 8192x8192 example</h1> 366 <center> 367 <img src="./images/G4LISA-Zoom1.png" height="85%"/> 368 </center> 369 </div> 370 <!-- Diapo --> 371 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 372 373 <h1>Make posters : 8192x8192 example</h1> 374 <center> 375 <img src="./images/G4LISA-Zoom2.png" height="85%"/> 376 </center> 377 </div> 378 <!-- Diapo --> 379 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 380 381 <h1>Make posters : 8192x8192 example</h1> 382 <center> 383 <img src="./images/G4LISA-Zoom3.png" height="85%"/> 384 </center> 385 </div> 386 <!-- Diapo --> 387 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 388 389 <h1>Make posters : 8192x8192 example</h1> 390 <center> 391 <img src="./images/G4LISA-Zoom4.png" height="85%"/> 392 </center> 393 </div> 394 <!-- Diapo --> 395 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 396 397 <h1>Make posters : 8192x8192 example</h1> 398 <center> 399 <img src="./images/G4LISA-Zoom5.png" height="85%"/> 400 </center> 401 </div> 402 <!-- Diapo --> 403 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 404 405 <h1>Make posters : 8192x8192 example</h1> 406 <center> 407 <img src="./images/G4LISA-Zoom6.png" height="85%"/> 408 </center> 409 </div> 410 <!-- Diapo --> 411 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 412 413 <h1>Make posters : 8192x8192 example</h1> 414 <center> 415 <img src="./images/G4LISA-Zoom7.png" height="85%"/> 416 </center> 417 </div> 418 <!-- Diapo --> 419 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 420 421 <h1>Make posters : 8192x8192 example</h1> 422 <center> 423 <img src="./images/G4LISA-Zoom8.png" height="85%"/> 424 </center> 425 </div> 426 <!-- Diapo --> 427 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 428 429 <h1>Make posters : 8192x8192 example</h1> 430 <center> 431 <img src="./images/G4LISA-Zoom9.png" height="85%"/> 432 </center> 433 </div> 434 <!-- Diapo --> 435 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 436 437 <h1>Make posters : 8192x8192 example</h1> 438 <center> 439 <img src="./images/G4LISA-Zoom10.png" height="85%"/> 440 </center> 441 </div> 442 <!-- Diapo --> 443 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 444 445 <h1>Make posters : 8192x8192 example</h1> 446 <center> 447 <img src="./images/G4LISA-Zoom11.png" height="85%"/> 448 </center> 449 </div> 450 <!-- Diapo --> 451 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 452 453 <h1>Make posters : 8192x8192 example</h1> 454 <center> 455 <img src="./images/G4LISA-Zoom11.png" height="85%"/> 456 </center> 457 </div> 458 <!-- Diapo --> 459 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 460 461 <h1>Make posters : 8192x8192 example</h1> 462 <center> 463 <img src="./images/G4LISA-Zoom12.png" height="85%"/> 464 </center> 465 </div> 466 <!-- Diapo --> 467 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 468 469 <h1>Make posters : 8192x8192 example</h1> 470 <center> 471 <img src="./images/G4LISA-Zoom13.png" height="85%"/> 472 </center> 473 </div> 474 <!-- Diapo --> 475 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 476 477 <h1>Make posters : 8192x8192 example</h1> 478 <center> 479 <img src="./images/G4LISA-Zoom14.png" height="85%"/> 480 </center> 481 </div> 482 <!-- Diapo --> 483 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 484 485 <h1>Make posters : 8192x8192 example</h1> 486 <center> 487 <img src="./images/G4LISA-Zoom15.png" height="85%"/> 488 </center> 489 </div> 490 <!-- Diapo --> 491 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 492 493 <h1>Make posters : 8192x8192 example</h1> 494 <center> 495 <img src="./images/G4LISA-Zoom16.png" height="85%"/> 496 </center> 497 </div> 498 <!-- Diapo --> 499 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 500 501 <h1>Make posters : 8192x8192 example</h1> 502 <center> 503 <img src="./images/G4LISA-Zoom17.png" height="85%"/> 504 </center> 505 </div> 506 <!-- Diapo --> 507 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 508 509 <h1>Make posters : 8192x8192 example</h1> 510 <center> 511 <img src="./images/G4LISA-Zoom18.png" height="85%"/> 512 </center> 513 </div> 514 <!-- Diapo --> 515 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 516 517 <h1>Make posters : 8192x8192 example</h1> 518 <center> 519 <img src="./images/G4LISA-Zoom19.png" height="85%"/> 520 </center> 324 521 </div> 325 522 … … 330 527 <li>Viewer and UI integration</li> 331 528 <li>Rotations</li> 332 <li> Meta Keys</li>529 <li>Keyboard Shortcuts</li> 333 530 <li>Speed improvments in OpenGL drivers</li> 334 531 <li>Make posters</li> … … 343 540 <!-- Diapo --> 344 541 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 345 346 542 <h1>Developpement on all platforms</h1> 347 <p></p> 348 <ul class="incremental"> 349 <li></li> 350 <li></li> 351 <li></li> 352 </ul> 353 </div> 354 355 <!-- Diapo --> 356 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 357 543 <p>Qt visualization driver is available on all Platform. Tested on all Geant4 supported computers and operating systems :</p> 544 <ul class="incremental"> 545 <li>WinXp</li> 546 <li>SLC4</li> 547 <li>SLC5</li> 548 <li>MacOsX 10.5</li> 549 <li>MacOsX 10.6</li> 550 </ul> 551 </div> 552 553 <!-- Diapo --> 554 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 358 555 <h1>Developpement on all platforms</h1> 359 <p></p> 360 <ul class="incremental"> 361 <li></li> 362 <li></li> 363 <li></li> 364 </ul> 556 <p>Windows Xp</p> 557 <center> 558 <img src="./images/G4OGLQtDriver-WinXp.png" height="85%"/> 559 </center> 560 </div> 561 562 <!-- Diapo --> 563 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 564 <h1>Developpement on all platforms</h1> 565 <p>SLC4</p> 566 <center> 567 <img src="./images/G4OGLQtDriver-SLC4.png" height="85%"/> 568 </center> 569 </div> 570 571 <!-- Diapo --> 572 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide"> 573 574 <h1>Developpement on all platforms</h1> 575 <p>SLC5</p> 576 <center> 577 <img src="./images/G4OGLQtDriver-SLC5.png" height="85%"/> 578 </center> 365 579 </div> 366 580 … … 371 585 <li>Viewer and UI integration</li> 372 586 <li>Rotations</li> 373 <li> Meta Keys</li>587 <li>Keyboard Shortcuts</li> 374 588 <li>Speed improvments in OpenGL drivers</li> 375 589 <li>Make posters</li> … … 420 634 <li>Viewer and UI integration</li> 421 635 <li>Rotations</li> 422 <li> Meta Keys</li>636 <li>Keyboard Shortcuts</li> 423 637 <li>Speed improvments in OpenGL drivers</li> 424 638 <li>Make posters</li> … … 469 683 + Demo 470 684 471 - Meta Keys685 - Keyboard Shortcuts 472 686 - Add some meta keys for all kinds of rotation, move, graphical actions... 473 687 + Demo … … 498 712 499 713 500 <!-- Diapo [Organisation] -->501 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">502 503 <h1>Organisation</h1>504 <p>La librarie STL est organisée en plusieurs parties. Il existe principalement 3 types d'éléments</p>505 <div class="incremental">506 <ul>507 <li>508 <strong>Les conteneurs</strong><br/>509 Permettent de contenir des données510 </li>511 <li>512 <strong>Les itérateurs</strong><br />513 Permettent aux algorithmes de manipuler les conteneurs :514 récupérer une donnée et passer à la suivante515 </li>516 <li>517 <strong>Les algorithmes</strong><br />518 Permettent de manipuler les données d'un conteneur en accédant aux données519 via les itérateurs520 </li>521 </ul>522 <div>523 <p>On ajoute</p>524 <ul>525 <li>526 <strong>Les strings</strong><br/>527 Qui définissent les chaines de caractères comme type <i>normal</i> (copie, assignation, comparaison,...)528 </li>529 </ul>530 </div>531 </div>532 </div>533 534 535 <!-- Diapo [Conteneurs (1)] -->536 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">537 538 <h1>Conteneurs</h1>539 <ul class="incremental">540 <li class="non-incremental">541 Il s'agit de structures <strong>algorithmiques</strong> permettant :542 <ul>543 <li>d'organiser un ensemble de données <strong>de même type</strong> en séquence,</li>544 <li>puis de <strong>parcourir</strong> ces données</li>545 </ul>546 </li>547 <li>Exemples :548 <ul>549 <li>les listes (<strong>std::list</strong>)</li>550 <li>les tableaux (<strong>std::vector</strong>)</li>551 <li>les listes triées (<strong>std::set</strong>)</li>552 <li>les listes d'associations (<strong>std::map</strong>)</li>553 </ul>554 </li>555 <li>La définition d'un conteneur est indépendante du type des objets contenus</li>556 <li>On spécifie ce qu'il <em>contient</em> lors de la déclaration de la variable</li>557 <li>Allocation dynamique et automatique de la mémoire</li>558 </ul>559 </div>560 561 <!-- Diapo [Conteneurs (2)] -->562 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">563 564 <h1>Conteneurs ...</h1>565 566 <div class="incremental">567 <div>568 <strong>Ordonnés</strong> (position indépendante de la valeur)569 <div style="padding-left: 5%; padding-top: 1%">570 <table class="noborder">571 <tbody>572 <tr>573 <td>574 <em>List</em> :<br />liste doublement chaînée575 </td>576 <td style="text-align: center;">577 <br />578 <img src="./STL_images/list.png" alt="Image d'une list" width="50%"/>579 </td>580 </tr>581 <tr>582 <td>583 <em>Vector</em> :<br />tableau à 1 dimension584 </td>585 <td style="text-align: center;">586 <br />587 <img src="./STL_images/vector.png" alt="Image d'un vecteur" width="50%"/>588 </td>589 </tr>590 </tbody>591 </table>592 </div>593 </div>594 <div style="padding-top: 5%;">595 <strong>Triés</strong> (position dépendante de la valeur)596 <div style="padding-left: 5%; padding-top: 1%">597 <table class="noborder" style="padding-left: 15%; padding-top: 10%">598 <tbody>599 <tr>600 <td>601 <em>Set/Multiset</em> :<br />ensemble602 </td>603 <td style="text-align: center;">604 <img src="./STL_images/set.png" alt="Image d'un set/multiset" width="30%"/>605 </td>606 </tr>607 <tr>608 <td>609 <em>Map/Multimap</em> :<br />tableau associatif610 </td>611 <td style="text-align: center;">612 <img src="./STL_images/map.png" alt="Image d'un map/multimap" width="30%"/>613 </td>614 </tr>615 </tbody>616 </table>617 </div>618 </div>619 </div>620 </div>621 622 623 <!-- Diapo [List] -->624 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">625 626 <h1>List</h1>627 628 <table class="noborder" style="padding-left: 15%; padding-top: 10%">629 <tbody>630 <tr>631 <td style="width: 30%; valign: top">632 Utilisation des listes633 </td>634 <td>635 <pre>636 #include <iostream>637 <font color="red"><strong>#include <list></strong></font>638 639 int main()640 {641 std::list<int> l;642 643 l.push_front(3);644 l.push_front(2);645 l.push_back(4);646 647 l.pop_front();648 l.pop_back();649 650 std::cout << l.front() << std::endl;651 std::cout << l.back() << std::endl;652 653 return 0;654 }655 </pre>656 </td>657 </tr>658 </tbody>659 </table>660 661 </div>662 663 <!-- Diapo [List] -->664 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">665 666 <h1>List</h1>667 668 <table class="noborder" style="padding-left: 15%; padding-top: 10%">669 <tbody>670 <tr>671 <td style="width: 30%; valign: top">672 Comme pour tous les composants <em>STL</em>,673 il faut toujours se placer dans l'<span style="color: red">espace de nommage std::</span>674 </td>675 <td>676 <pre>677 #include <iostream>678 #include <list>679 680 int main()681 {682 <font color="red"><strong>std::</strong></font>list<int> l;683 684 l.push_front(3);685 l.push_front(2);686 l.push_back(4);687 688 l.pop_front();689 l.pop_back();690 691 std::cout << l.front() << std::endl;692 std::cout << l.back() << std::endl;693 694 return 0;695 }696 </pre>697 </td>698 </tr>699 </tbody>700 </table>701 702 </div>703 704 <!-- Diapo [List] -->705 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">706 707 <h1>List</h1>708 709 <table class="noborder" style="padding-left: 15%; padding-top: 10%">710 <tbody>711 <tr>712 <td style="width: 30%; valign: top">713 <span style="color: red">Insère un élément</span> dans la liste714 </td>715 <td>716 <pre>717 #include <iostream>718 #include <list>719 720 int main()721 {722 std::list<int> l;723 724 <font color="red"><strong>l.push_front(3);</strong></font>725 <font color="red"><strong>l.push_front(2);</strong></font>726 <font color="red"><strong>l.push_back(4);</strong></font>727 728 l.pop_front();729 l.pop_back();730 731 std::cout << l.front() << std::endl;732 std::cout << l.back() << std::endl;733 734 return 0;735 }736 </pre>737 </td>738 </tr>739 </tbody>740 </table>741 742 </div>743 744 <!-- Diapo [List] -->745 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">746 747 <h1>List</h1>748 749 <table class="noborder" style="padding-left: 15%; padding-top: 10%">750 <tbody>751 <tr>752 <td style="width: 30%; valign: top">753 <span style="color: red">Retire un élément</span> de la liste754 </td>755 <td>756 <pre>757 #include <iostream>758 #include <list>759 760 int main()761 {762 std::list<int> l;763 764 l.push_front(3);765 l.push_front(2);766 l.push_back(4);767 768 <font color="red"><strong>l.pop_front();</strong></font>769 <font color="red"><strong>l.pop_back();</strong></font>770 771 std::cout << l.front() << std::endl;772 std::cout << l.back() << std::endl;773 774 return 0;775 }776 </pre>777 </td>778 </tr>779 </tbody>780 </table>781 782 </div>783 784 <!-- Diapo [List] -->785 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">786 787 <h1>List</h1>788 789 <table class="noborder" style="padding-left: 15%; padding-top: 10%">790 <tbody>791 <tr>792 <td style="width: 30%; valign: top">793 <span style="color: red">Accède à un élément</span> de la liste794 </td>795 <td>796 <pre>797 #include <iostream>798 #include <list>799 800 int main()801 {802 std::list<int> l;803 804 l.push_front(3);805 l.push_front(2);806 l.push_back(4);807 808 l.pop_front();809 l.pop_back();810 811 std::cout << <font color="red"><strong>l.front()</strong></font> << std::endl;812 std::cout << <font color="red"><strong>l.back()</strong></font> << std::endl;813 814 return 0;815 }816 </pre>817 </td>818 </tr>819 </tbody>820 </table>821 822 </div>823 824 825 826 <!-- Diapo [Vector] -->827 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">828 829 <h1>Vector</h1>830 831 <table class="noborder" style="padding-left: 15%; padding-top: 10%">832 <tbody>833 <tr>834 <td style="width: 30%; valign: top">835 Utilisation des vecteurs836 </td>837 <td>838 <pre>839 #include <iostream>840 <font color="red"><strong> #include <vector></strong></font>841 842 int main()843 {844 std::vector<int> v;845 846 v.push_back(3);847 v.push_back(4);848 849 std::cout << v[0] << std::endl;850 851 v.at( 1 ) = 5;852 std::cout << v.back() << std::endl;853 854 v.clear();855 return 0;856 }857 </pre>858 </td>859 </tr>860 </tbody>861 </table>862 863 </div>864 865 <!-- Diapo [Vector] -->866 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">867 868 <h1>Vector</h1>869 870 <table class="noborder" style="padding-left: 15%; padding-top: 10%">871 <tbody>872 <tr>873 <td style="width: 30%; valign: top">874 <span style="color: red">Insère un élément</span> dans le vecteur875 </td>876 <td>877 <pre>878 #include <iostream>879 #include <vector>880 881 int main()882 {883 std::vector<int> v;884 885 <font color="red"><strong>v.push_back(3);</strong></font>886 <font color="red"><strong>v.push_back(4);</strong></font>887 888 std::cout << v[0] << std::endl;889 890 v.at( 1 ) = 5;891 std::cout << v.back() << std::endl;892 893 v.clear();894 return 0;895 }896 </pre>897 </td>898 </tr>899 </tbody>900 </table>901 902 </div>903 904 <!-- Diapo [Vector] -->905 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">906 907 <h1>Vector</h1>908 909 <table class="noborder" style="padding-left: 15%; padding-top: 10%">910 <tbody>911 <tr>912 <td style="width: 30%; valign: top">913 <span style="color: red">Accède</span> au 1er élément914 </td>915 <td>916 <pre>917 #include <iostream>918 #include <vector>919 920 int main()921 {922 std::vector<int> v;923 924 v.push_back(3);925 v.push_back(4);926 927 std::cout << <font color="red"><strong>v[0]</strong></font> << std::endl;928 929 v.at( 1 ) = 5;930 std::cout << v.back() << std::endl;931 932 v.clear();933 return 0;934 }935 </pre>936 </td>937 </tr>938 </tbody>939 </table>940 941 </div>942 943 <!-- Diapo [Vector] -->944 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">945 946 <h1>Vector</h1>947 948 <table class="noborder" style="padding-left: 15%; padding-top: 10%">949 <tbody>950 <tr>951 <td style="width: 30%; valign: top">952 <span style="color: red">Modifie</span> le 2è élément953 </td>954 <td>955 <pre>956 #include <iostream>957 #include <vector>958 959 int main()960 {961 std::vector<int> v;962 963 v.push_back(3);964 v.push_back(4);965 966 std::cout << v[0] << std::endl;967 968 <font color="red"><strong>v.at( 1 ) = 5;</strong></font>969 std::cout << v.back() << std::endl;970 971 v.clear();972 return 0;973 }974 </pre>975 </td>976 </tr>977 </tbody>978 </table>979 980 </div>981 982 <!-- Diapo [Vector] -->983 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">984 985 <h1>Vector</h1>986 987 <table class="noborder" style="padding-left: 15%; padding-top: 10%">988 <tbody>989 <tr>990 <td style="width: 30%; valign: top">991 <span style="color: red">Accède au dernier élément</span> du vecteur992 </td>993 <td>994 <pre>995 #include <iostream>996 #include <vector>997 998 int main()999 {1000 std::vector<int> v;1001 1002 v.push_back(3);1003 v.push_back(4);1004 1005 std::cout << v[0] << std::endl;1006 1007 v.at( 1 ) = 5;1008 std::cout << <font color="red"><strong>v.back()</strong></font> << std::endl;1009 1010 v.clear();1011 return 0;1012 }1013 </pre>1014 </td>1015 </tr>1016 </tbody>1017 </table>1018 1019 </div>1020 1021 <!-- Diapo [Vector] -->1022 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1023 1024 <h1>Vector</h1>1025 1026 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1027 <tbody>1028 <tr>1029 <td style="width: 30%; valign: top">1030 <span style="color: red">Supprime tous les éléments</span>1031 </td>1032 <td>1033 <pre>1034 #include <iostream>1035 #include <vector>1036 1037 int main()1038 {1039 std::vector<int> v;1040 1041 v.push_back(3);1042 v.push_back(4);1043 1044 std::cout << v[0] << std::endl;1045 1046 v.at( 1 ) = 5;1047 std::cout << v.back() << std::endl;1048 1049 <font color="red"><strong>v.clear();</strong></font>1050 return 0;1051 }1052 </pre>1053 </td>1054 </tr>1055 </tbody>1056 </table>1057 1058 </div>1059 1060 1061 <!-- Diapo [Méthodes communes] -->1062 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1063 1064 <h1>Quelques méthodes communes</h1>1065 1066 <ul class="incremental">1067 <li class="non-incremental">1068 Vider le conteneur :1069 <ul>1070 <li>1071 <strong>void clear();</strong>1072 <br />1073 appelle le destructeur pour chaque objet dans le conteneur1074 <br />1075 désalloue la mémoire utilisée1076 </li>1077 </ul>1078 <br /><br />1079 </li>1080 <li>1081 Retourner le nombre d'éléments :1082 <ul><li><strong>int size();</strong></li></ul>1083 <br /><br />1084 </li>1085 <li>1086 Tester si le conteneur est vide :1087 <ul><li><strong>bool empty();</strong></li></ul>1088 </li>1089 </ul>1090 1091 </div>1092 1093 1094 <!-- Diapo [Itérateurs] -->1095 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1096 1097 <h1>Itérateurs</h1>1098 1099 <div class="incremental">1100 <ul class="non-incremental">1101 <li>1102 C'est une généralisation de la notion de <em>pointeur</em>.1103 </li>1104 <li>1105 Il permet de parcourir en séquence les éléments d'un conteneur1106 sans avoir à se préoccuper du type du conteneur.1107 </li>1108 </ul>1109 1110 <div style="padding-top: 5px; padding-left: 30%">1111 <pre style="width: 75%">1112 #include <vector>1113 {1114 std::vector<int> v;1115 //1116 <font color="red"><strong>std::vector<int>::iterator</strong></font> it1 = v.begin();1117 <font color="red"><strong>std::vector<int>::iterator</strong></font> it2 = v.end();1118 }1119 </pre>1120 </div>1121 <div style="text-align: center;">1122 <img src="./STL_images/iterator.png" alt="Représentation graphique d'un itérateur" width="30%"/>1123 </div>1124 1125 </div>1126 1127 </div>1128 1129 <!-- Diapo [Itérateurs] -->1130 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1131 1132 <h1>Itérateurs</h1>1133 1134 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1135 <tbody>1136 <tr>1137 <td style="width: 30%; valign: top">1138 1139 </td>1140 <td>1141 <pre>1142 #include <iostream>1143 #include <list>1144 1145 int main()1146 {1147 std::list<int> liste;1148 1149 for (unsigned int i = 0; i < 10; i++) {1150 liste.push_back(i);1151 }1152 1153 std::list<int>::iterator it;1154 for (it = liste.begin(); it != liste.end(); ++it) {1155 int i = *it;1156 std::cout << "i = " << i << std::endl;1157 }1158 return (0);1159 }1160 </pre>1161 </td>1162 </tr>1163 </tbody>1164 </table>1165 1166 </div>1167 1168 <!-- Diapo [Itérateurs] -->1169 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1170 1171 <h1>Itérateurs</h1>1172 1173 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1174 <tbody>1175 <tr>1176 <td style="width: 30%; valign: top">1177 <span style="color: red">Déclaration</span>1178 </td>1179 <td>1180 <pre>1181 #include <iostream>1182 #include <list>1183 1184 int main()1185 {1186 std::list<int> liste;1187 1188 for (unsigned int i = 0; i < 10; i++) {1189 liste.push_back(i);1190 }1191 1192 <font color="red"><strong>std::list<int>::iterator it;</strong></font>1193 for (it = liste.begin(); it != liste.end(); ++it) {1194 int i = *it;1195 std::cout << "i = " << i << std::endl;1196 }1197 return (0);1198 }1199 </pre>1200 </td>1201 </tr>1202 </tbody>1203 </table>1204 1205 </div>1206 1207 <!-- Diapo [Itérateurs] -->1208 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1209 1210 <h1>Itérateurs</h1>1211 1212 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1213 <tbody>1214 <tr>1215 <td style="width: 30%; valign: top">1216 <span style="color: red">1er élément</span>1217 </td>1218 <td>1219 <pre>1220 #include <iostream>1221 #include <list>1222 1223 int main()1224 {1225 std::list<int> liste;1226 1227 for (unsigned int i = 0; i < 10; i++) {1228 liste.push_back(i);1229 }1230 1231 std::list<int>::iterator it;1232 for (it = <font color="red"><strong>liste.begin()</strong></font>; it != liste.end(); ++it) {1233 int i = *it;1234 std::cout << "i = " << i << std::endl;1235 }1236 return (0);1237 }1238 </pre>1239 </td>1240 </tr>1241 </tbody>1242 </table>1243 1244 </div>1245 1246 <!-- Diapo [Itérateurs] -->1247 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1248 1249 <h1>Itérateurs</h1>1250 1251 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1252 <tbody>1253 <tr>1254 <td style="width: 30%; valign: top">1255 <span style="color: red">Pointe après le dernier élément</span>1256 </td>1257 <td>1258 <pre>1259 #include <iostream>1260 #include <list>1261 1262 int main()1263 {1264 std::list<int> liste;1265 1266 for (unsigned int i = 0; i < 10; i++) {1267 liste.push_back(i);1268 }1269 1270 std::list<int>::iterator it;1271 for (it = liste.begin(); it != <font color="red"><strong>liste.end()</strong></font>; ++it) {1272 int i = *it;1273 std::cout << "i = " << i << std::endl;1274 }1275 return (0);1276 }1277 </pre>1278 </td>1279 </tr>1280 </tbody>1281 </table>1282 1283 </div>1284 1285 <!-- Diapo [Itérateurs] -->1286 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1287 1288 <h1>Itérateurs</h1>1289 1290 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1291 <tbody>1292 <tr>1293 <td style="width: 30%; valign: top">1294 On <span style="color: red">incrémente</span> l'itérateur1295 </td>1296 <td>1297 <pre>1298 #include <iostream>1299 #include <list>1300 1301 int main()1302 {1303 std::list<int> liste;1304 1305 for (unsigned int i = 0; i < 10; i++) {1306 liste.push_back(i);1307 }1308 1309 std::list<int>::iterator it;1310 for (it = liste.begin(); it != liste.end(); <font color="red"><strong>++it</strong></font>) {1311 int i = *it;1312 std::cout << "i = " << i << std::endl;1313 }1314 return (0);1315 }1316 </pre>1317 </td>1318 </tr>1319 </tbody>1320 </table>1321 1322 </div>1323 1324 <!-- Diapo [Itérateurs] -->1325 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1326 1327 <h1>Itérateurs</h1>1328 1329 <table class="noborder" style="padding-left: 15%; padding-top: 10%">1330 <tbody>1331 <tr>1332 <td style="width: 30%; valign: top">1333 On accède à l'élément par <span style="color: red">déréférencement</span>1334 </td>1335 <td>1336 <pre>1337 #include <iostream>1338 #include <list>1339 1340 int main()1341 {1342 std::list<int> liste;1343 1344 for (unsigned int i = 0; i < 10; i++) {1345 liste.push_back(i);1346 }1347 1348 std::list<int>::iterator it;1349 for (it = liste.begin(); it != liste.end(); ++it) {1350 int <font color="red"><strong>i = *it</strong></font>;1351 std::cout << "i = " << i << std::endl;1352 }1353 return (0);1354 }1355 </pre>1356 </td>1357 </tr>1358 </tbody>1359 </table>1360 1361 </div>1362 1363 1364 <!-- Diapo [Choisir un conteneur] -->1365 <div style="border-style: none; display: none; visibility: hidden; position: absolute;" class="slide">1366 1367 <h1>Choisir un conteneur</h1>1368 1369 <ul class="incremental">1370 <li class="non-incremental">1371 <strong>List</strong> :1372 <ul>1373 <li>si on a besoin d'insérer ou de supprimer au milieu</li>1374 <li>insertion en temps constant</li>1375 <li>accès au n-ième élément en itérant depuis le 1er</li>1376 </ul>1377 <br />1378 </li>1379 <li>1380 <strong>Vector</strong> :1381 <ul>1382 <li>si on a besoin d'accéder au n-ième élément</li>1383 <li>insertion et suppression peuvent être coûteuses</li>1384 <li>très efficace lorsqu'on a à parcourir le conteneur</li>1385 </ul>1386 <br />1387 </li>1388 <li>1389 <strong>Map</strong> :1390 <ul>1391 <li>listes associatives</li>1392 <li>listes maintenues triées lors de l'insertion de nouveaux éléments</li>1393 </ul>1394 </li>1395 </ul>1396 1397 </div>1398 1399 1400 714 1401 715 <!-- Diapo --> … … 1409 723 1410 724 </html> 1411 1412 1371 cp ../../../interfaces\ -\ copie/basic/src/G4UIQt.cc ../interfaces/basic/src/.1413 1372 opendiff ../../../visualization\ -\* .1414 1373 opendiff ../../../visualization\ -\ copie/* .1415 1374 opendiff ../../../visualization\ -\ copie .1416 1375 cvs update -A1417 1376 cp ../../../visualization\ -\ copie/OpenGL/include/G4OpenGLQtViewer.hh OpenGL/include/.1418 1377 cp ../../../visualization\ -\ copie/OpenGL/include/G4OpenGLViewer.hh OpenGL/include/.1419 1378 cp ../../../visualization\ -\ copie/OpenGL/src/G4OpenGLQtViewer.cc OpenGL/src/.1420 1379 cp ../../../visualization\ -\ copie/OpenGL/src/G4OpenGLStoredQtViewer.cc OpenGL/src/.1421 1380 cp ../../../visualization\ -\ copie/OpenGL/src/G4OpenGLStoredViewer.cc OpenGL/src/.1422 1381 cp ../../../visualization\ -\ copie/OpenGL/src/G4OpenGLViewer.cc OpenGL/src/.
Note:
See TracChangeset
for help on using the changeset viewer.
