1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>view</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="V_Sim API - Reference Manual">
<link rel="up" href="ch03.html" title="OpenGL tools">
<link rel="prev" href="v-sim-text.html" title="text">
<link rel="next" href="v-sim-interactive.html" title="interactive">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="v-sim-text.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">V_Sim API - Reference Manual</th>
<td><a accesskey="n" href="v-sim-interactive.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#v-sim-view.synopsis" class="shortcut">Top</a>
|
<a href="#v-sim-view.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="view">
<a name="v-sim-view"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="v-sim-view.top_of_page"></a>view</span></h2>
<p>view — Defines all necessary informations for the
rendering of a view.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="v-sim-view.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">#define <a class="link" href="v-sim-view.html#PI180:CAPS" title="PI180">PI180</a>
<a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView">VisuOpenGLView</a>;
<a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera">VisuOpenGLCamera</a>;
enum <a class="link" href="v-sim-view.html#ViewAxis" title="enum ViewAxis">ViewAxis</a>;
#define <a class="link" href="v-sim-view.html#VISU-CAMERA-THETA:CAPS" title="VISU_CAMERA_THETA">VISU_CAMERA_THETA</a>
#define <a class="link" href="v-sim-view.html#VISU-CAMERA-PHI:CAPS" title="VISU_CAMERA_PHI">VISU_CAMERA_PHI</a>
#define <a class="link" href="v-sim-view.html#VISU-CAMERA-OMEGA:CAPS" title="VISU_CAMERA_OMEGA">VISU_CAMERA_OMEGA</a>
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLCameraSet-thetaPhiOmega" title="openGLCameraSet_thetaPhiOmega ()">openGLCameraSet_thetaPhiOmega</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> valueTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> valuePhi</code></em>,
<em class="parameter"><code><span class="type">float</span> valueOmega</code></em>,
<em class="parameter"><code><span class="type">int</span> mask</code></em>);
#define <a class="link" href="v-sim-view.html#MASK-XS:CAPS" title="MASK_XS">MASK_XS</a>
#define <a class="link" href="v-sim-view.html#MASK-YS:CAPS" title="MASK_YS">MASK_YS</a>
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLCameraSet-XsYs" title="openGLCameraSet_XsYs ()">openGLCameraSet_XsYs</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> valueX</code></em>,
<em class="parameter"><code><span class="type">float</span> valueY</code></em>,
<em class="parameter"><code><span class="type">int</span> mask</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLCameraSet-gross" title="openGLCameraSet_gross ()">openGLCameraSet_gross</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLCameraSet-persp" title="openGLCameraSet_persp ()">openGLCameraSet_persp</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLCameraSet-refLength" title="openGLCameraSet_refLength ()">openGLCameraSet_refLength</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolPhysic.html#ToolUnits" title="enum ToolUnits"><span class="type">ToolUnits</span></a> unit</code></em>);
<span class="returnvalue">float</span> <a class="link" href="v-sim-view.html#openGLCameraGet-refLength" title="openGLCameraGet_refLength ()">openGLCameraGet_refLength</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolPhysic.html#ToolUnits" title="enum ToolUnits"><span class="type">ToolUnits</span></a> *unit</code></em>);
<a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow">OpenGLWindow</a>;
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-view.html#openGLWindowSet-viewport" title="openGLWindowSet_viewport ()">openGLWindowSet_viewport</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> *window</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);
<span class="returnvalue">float</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewGet-fileUnitPerPixel" title="VisuOpenGLViewGet_fileUnitPerPixel ()">VisuOpenGLViewGet_fileUnitPerPixel</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewGet-screenAxes" title="VisuOpenGLViewGet_screenAxes ()">VisuOpenGLViewGet_screenAxes</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xAxis[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> yAxis[3]</code></em>);
<span class="returnvalue">float</span> <a class="link" href="v-sim-view.html#openGLViewGet-zCoordinate" title="openGLViewGet_zCoordinate ()">openGLViewGet_zCoordinate</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xyz[3]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLViewGet-realCoordinates" title="openGLViewGet_realCoordinates ()">openGLViewGet_realCoordinates</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xyz[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> winx</code></em>,
<em class="parameter"><code><span class="type">float</span> winy</code></em>,
<em class="parameter"><code><span class="type">float</span> winz</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLViewSet-upAxis" title="openGLViewSet_upAxis ()">openGLViewSet_upAxis</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-view.html#ViewAxis" title="enum ViewAxis"><span class="type">ViewAxis</span></a> upAxis</code></em>);
<a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="returnvalue">VisuOpenGLView</span></a>* <a class="link" href="v-sim-view.html#VisuOpenGLViewNew" title="VisuOpenGLViewNew ()">VisuOpenGLViewNew</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewFree" title="VisuOpenGLViewFree ()">VisuOpenGLViewFree</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);
<a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="returnvalue">VisuOpenGLView</span></a>* <a class="link" href="v-sim-view.html#VisuOpenGLViewCopy" title="VisuOpenGLViewCopy ()">VisuOpenGLViewCopy</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="v-sim-view.html#VisuOpenGLCameraGet-numberOfFacettes" title="VisuOpenGLCameraGet_numberOfFacettes ()">VisuOpenGLCameraGet_numberOfFacettes</a>
(<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> winSize</code></em>,
<em class="parameter"><code><span class="type">float</span> dimension</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLProject" title="openGLProject ()">openGLProject</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> *window</code></em>,
<em class="parameter"><code>const <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> extens</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLModelize" title="openGLModelize ()">openGLModelize</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>);
<span class="returnvalue">int</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewSet-precision" title="VisuOpenGLViewSet_precision ()">VisuOpenGLViewSet_precision</a> (<em class="parameter"><code><span class="type">float</span> value</code></em>);
<span class="returnvalue">float</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewGet-precision" title="VisuOpenGLViewGet_precision ()">VisuOpenGLViewGet_precision</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLViewRotate-box" title="openGLViewRotate_box ()">openGLViewRotate_box</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> dTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> dPhi</code></em>,
<em class="parameter"><code><span class="type">float</span> angles[2]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#openGLViewRotate-camera" title="openGLViewRotate_camera ()">openGLViewRotate_camera</a> (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> dTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> dPhi</code></em>,
<em class="parameter"><code><span class="type">float</span> angles[3]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-view.html#VisuOpenGLViewInit" title="VisuOpenGLViewInit ()">VisuOpenGLViewInit</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="v-sim-view.description"></a><h2>Description</h2>
<p>
</p>
<p>The <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> stores three basic informations: one for the
position and orientation of the camera (<a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a>), one for the
description of the bounding box in the OpenGL coordinates
(<a href="v-sim-view.html#OpenGLBox"><span class="type">OpenGLBox</span></a>, should be moved elsewhere later) and one last for the
definition of the viewing window (<a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a>, including volumic
informations).</p>
<p>
</p>
<p>
</p>
<p>One resource is used by this part, defining the precision
desired by the user when drawing OpenGL objects. This precision can
be changed using <a class="link" href="v-sim-view.html#VisuOpenGLViewSet-precision" title="VisuOpenGLViewSet_precision ()"><code class="function">VisuOpenGLViewSet_precision()</code></a> and all V_Sim part
drawing something should use <a class="link" href="v-sim-view.html#VisuOpenGLCameraGet-numberOfFacettes" title="VisuOpenGLCameraGet_numberOfFacettes ()"><code class="function">VisuOpenGLCameraGet_numberOfFacettes()</code></a> to
know the size of the vertices to be drawn depending on this
precision and the level of zoom.</p>
<p>
</p>
<p>
</p>
<p>The rendering is done in an OpenGl viewport whose size is
given by the bounding box (plus 10%). The camera can be positionned
with three angles (theta, phi and omega) and has a zoom factor
(gross) and a perspective value (d_red). The angle theta is around
the z axis (box coordinates), phi is around the new x axis (after
the theta rotation) and omega is a rotation around the axis which
goes from the observer to the center of the bounding box. By
default the camera looks at the center of the bounding box but this
can be changed with the Xs and Ys parameters. These values are
stored and are readable through the <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> structure. They
must be changed with the following methods :
<a href="v-sim-view.html#openGLViewSet-thetaPhiOmega"><code class="function">openGLViewSet_thetaPhiOmega()</code></a>, <a href="v-sim-view.html#openGLViewSet-gross"><code class="function">openGLViewSet_gross()</code></a>,
<a href="v-sim-view.html#openGLViewSet-persp"><code class="function">openGLViewSet_persp()</code></a> and <a href="v-sim-view.html#openGLViewSet-XsYs"><code class="function">openGLViewSet_XsYs()</code></a>.</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="v-sim-view.details"></a><h2>Details</h2>
<div class="refsect2" title="PI180">
<a name="PI180:CAPS"></a><h3>PI180</h3>
<pre class="programlisting">#define PI180 0.017453292522
</pre>
<p>
Value of pi / 180.
</p>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLView">
<a name="VisuOpenGLView"></a><h3>VisuOpenGLView</h3>
<pre class="programlisting">typedef struct {
VisuOpenGLCamera *camera;
OpenGLWindow *window;
} VisuOpenGLView;
</pre>
<p>
A container structure to deal with OpenGL observer position, size of rendering
viewport...
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *<em class="structfield"><code><a name="VisuOpenGLView.camera"></a>camera</code></em>;</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> structure;
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> *<em class="structfield"><code><a name="VisuOpenGLView.window"></a>window</code></em>;</span></p></td>
<td>a <a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> structure;
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLCamera">
<a name="VisuOpenGLCamera"></a><h3>VisuOpenGLCamera</h3>
<pre class="programlisting">typedef struct {
/* Perspective. */
double d_red;
/* Orientation. */
double theta, phi, omega;
/* Position. */
double xs, ys;
/* Zoom. */
double gross;
/* A length reference and its unit. */
double length0;
ToolUnits unit;
/* Up vector. */
double up[3];
/* Up axis. */
ViewAxis upAxis;
/* Eye target and eye position. */
double centre[3], eye[3];
} VisuOpenGLCamera;
</pre>
<p>
Values to define the position of the observer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.d-red"></a>d_red</code></em>;</span></p></td>
<td>a factor for perspective from 1. to inifnity. With one, the nose of
the observer is completly set on the rendered object, and the size
of the observer is neglectible compared to the size of the object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.theta"></a>theta</code></em>;</span></p></td>
<td>the theta angle in spherical coordinates of the position of the observer ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.phi"></a>phi</code></em>;</span></p></td>
<td>the phi angle in spherical coordinates of the position of the observer ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.omega"></a>omega</code></em>;</span></p></td>
<td>rotation of the observer on itself ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.xs"></a>xs</code></em>;</span></p></td>
<td>a value for translation of the viewport on x axis ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.ys"></a>ys</code></em>;</span></p></td>
<td>a value for translation of the viewport on y axis ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.gross"></a>gross</code></em>;</span></p></td>
<td>a value of zoom ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.length0"></a>length0</code></em>;</span></p></td>
<td>a length reference to adimension all values, by default,
this is the longest diagonal of the current box (without
duplication) ;
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="v-sim-toolPhysic.html#ToolUnits" title="enum ToolUnits"><span class="type">ToolUnits</span></a> <em class="structfield"><code><a name="VisuOpenGLCamera.unit"></a>unit</code></em>;</span></p></td>
<td>the unit of <em class="parameter"><code>length0</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.up"></a>up</code></em>[3];</span></p></td>
<td> the current up vector.. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="v-sim-view.html#ViewAxis" title="enum ViewAxis"><span class="type">ViewAxis</span></a> <em class="structfield"><code><a name="VisuOpenGLCamera.upAxis"></a>upAxis</code></em>;</span></p></td>
<td>which axis define the north pole.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.centre"></a>centre</code></em>[3];</span></p></td>
<td> position of the eye look at ;. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="VisuOpenGLCamera.eye"></a>eye</code></em>[3];</span></p></td>
<td> position of the eye.. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum ViewAxis">
<a name="ViewAxis"></a><h3>enum ViewAxis</h3>
<pre class="programlisting">typedef enum
{
VIEW_X,
VIEW_Y,
VIEW_Z
} ViewAxis;
</pre>
<p>
Define the up axis.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="VIEW-X:CAPS"></a><span class="term"><code class="literal">VIEW_X</code></span></p></td>
<td>the up axis is X ;
</td>
</tr>
<tr>
<td><p><a name="VIEW-Y:CAPS"></a><span class="term"><code class="literal">VIEW_Y</code></span></p></td>
<td>the up axis is Y ;
</td>
</tr>
<tr>
<td><p><a name="VIEW-Z:CAPS"></a><span class="term"><code class="literal">VIEW_Z</code></span></p></td>
<td>the up axis is Z.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VISU_CAMERA_THETA">
<a name="VISU-CAMERA-THETA:CAPS"></a><h3>VISU_CAMERA_THETA</h3>
<pre class="programlisting">#define VISU_CAMERA_THETA (1 << 1)
</pre>
<p>
Value used in the <a class="link" href="v-sim-view.html#openGLCameraSet-thetaPhiOmega" title="openGLCameraSet_thetaPhiOmega ()"><code class="function">openGLCameraSet_thetaPhiOmega()</code></a> method to store the tetha angle.
</p>
</div>
<hr>
<div class="refsect2" title="VISU_CAMERA_PHI">
<a name="VISU-CAMERA-PHI:CAPS"></a><h3>VISU_CAMERA_PHI</h3>
<pre class="programlisting">#define VISU_CAMERA_PHI (1 << 2)
</pre>
<p>
Value used in the <a class="link" href="v-sim-view.html#openGLCameraSet-thetaPhiOmega" title="openGLCameraSet_thetaPhiOmega ()"><code class="function">openGLCameraSet_thetaPhiOmega()</code></a> method to store the phi angle.
</p>
</div>
<hr>
<div class="refsect2" title="VISU_CAMERA_OMEGA">
<a name="VISU-CAMERA-OMEGA:CAPS"></a><h3>VISU_CAMERA_OMEGA</h3>
<pre class="programlisting">#define VISU_CAMERA_OMEGA (1 << 3)
</pre>
<p>
Value used in the <a class="link" href="v-sim-view.html#openGLCameraSet-thetaPhiOmega" title="openGLCameraSet_thetaPhiOmega ()"><code class="function">openGLCameraSet_thetaPhiOmega()</code></a> method to store the omega angle.
</p>
</div>
<hr>
<div class="refsect2" title="openGLCameraSet_thetaPhiOmega ()">
<a name="openGLCameraSet-thetaPhiOmega"></a><h3>openGLCameraSet_thetaPhiOmega ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLCameraSet_thetaPhiOmega (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> valueTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> valuePhi</code></em>,
<em class="parameter"><code><span class="type">float</span> valueOmega</code></em>,
<em class="parameter"><code><span class="type">int</span> mask</code></em>);</pre>
<p>
Change the orientation of the camera to the specified angles.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valueTheta</code></em> :</span></p></td>
<td>a floatinf point value in degrees ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valuePhi</code></em> :</span></p></td>
<td>a floating point value in degrees ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valueOmega</code></em> :</span></p></td>
<td>a floating point value in degrees ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>to specified what values will be changed.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the signal OpenGLAskForReDraw should be emitted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="MASK_XS">
<a name="MASK-XS:CAPS"></a><h3>MASK_XS</h3>
<pre class="programlisting">#define MASK_XS (1 << 1)
</pre>
<p>
Value used in the <a class="link" href="v-sim-view.html#openGLCameraSet-XsYs" title="openGLCameraSet_XsYs ()"><code class="function">openGLCameraSet_XsYs()</code></a> method to store the horizontal offset.
</p>
</div>
<hr>
<div class="refsect2" title="MASK_YS">
<a name="MASK-YS:CAPS"></a><h3>MASK_YS</h3>
<pre class="programlisting">#define MASK_YS (1 << 2)
</pre>
<p>
Value used in the <a class="link" href="v-sim-view.html#openGLCameraSet-XsYs" title="openGLCameraSet_XsYs ()"><code class="function">openGLCameraSet_XsYs()</code></a> method to store the vertical offset.
</p>
</div>
<hr>
<div class="refsect2" title="openGLCameraSet_XsYs ()">
<a name="openGLCameraSet-XsYs"></a><h3>openGLCameraSet_XsYs ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLCameraSet_XsYs (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> valueX</code></em>,
<em class="parameter"><code><span class="type">float</span> valueY</code></em>,
<em class="parameter"><code><span class="type">int</span> mask</code></em>);</pre>
<p>
Change the point where the camera is pointed to.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valueX</code></em> :</span></p></td>
<td>a floatinf point value in the bounding box scale
(1 is the size of the bounding box) ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valueY</code></em> :</span></p></td>
<td>a floating point value in bounding box scale ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>to specified what values will be changed.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the signal OpenGLAskForReDraw should be emitted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLCameraSet_gross ()">
<a name="openGLCameraSet-gross"></a><h3>openGLCameraSet_gross ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLCameraSet_gross (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);</pre>
<p>
Change the value of the camera zoom value. If the value is higher than 10
it is set to 10 and if the value is negative it is set to 0.001.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a positive floating point value.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the signal OpenGLAskForReDraw should be emitted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLCameraSet_persp ()">
<a name="openGLCameraSet-persp"></a><h3>openGLCameraSet_persp ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLCameraSet_persp (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);</pre>
<p>
Change the value of the camera perspective value and put it in
bounds if needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a floating point value greater than 1.1.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the signal OpenGLAskForReDraw should be emitted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLCameraSet_refLength ()">
<a name="openGLCameraSet-refLength"></a><h3>openGLCameraSet_refLength ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLCameraSet_refLength (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolPhysic.html#ToolUnits" title="enum ToolUnits"><span class="type">ToolUnits</span></a> unit</code></em>);</pre>
<p>
Change the reference value that is used for the zoom.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a new length.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit</code></em> :</span></p></td>
<td>its measurement unit.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the value is indeed changed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="openGLCameraGet_refLength ()">
<a name="openGLCameraGet-refLength"></a><h3>openGLCameraGet_refLength ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span> openGLCameraGet_refLength (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolPhysic.html#ToolUnits" title="enum ToolUnits"><span class="type">ToolUnits</span></a> *unit</code></em>);</pre>
<p>
The zoom is define from a reference length in given unit. If <em class="parameter"><code>unit</code></em>
is provided, the corresponding unit will be set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>unit</code></em> :</span></p></td>
<td>a location for unit value (can be NULL).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current reference length.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="OpenGLWindow">
<a name="OpenGLWindow"></a><h3>OpenGLWindow</h3>
<pre class="programlisting">typedef struct {
guint width, height;
double near, far;
double left, right, bottom, top;
} OpenGLWindow;
</pre>
<p>
Values to describe the window where the render is done.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="OpenGLWindow.width"></a>width</code></em>;</span></p></td>
<td>the width of the window ;
</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="OpenGLWindow.height"></a>height</code></em>;</span></p></td>
<td>the height of the window ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.near"></a>near</code></em>;</span></p></td>
<td>the beginning of the viewport on z axis (z for observer) ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.far"></a>far</code></em>;</span></p></td>
<td>the end of the viewport on z axis (z for observer) ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.left"></a>left</code></em>;</span></p></td>
<td>the left of the viewport on x axis ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.right"></a>right</code></em>;</span></p></td>
<td>the right of the viewport on x axis ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.bottom"></a>bottom</code></em>;</span></p></td>
<td>the bottom of the viewport on y axis ;
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="OpenGLWindow.top"></a>top</code></em>;</span></p></td>
<td>the top of the viewport on y axis ;
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLWindowSet_viewport ()">
<a name="openGLWindowSet-viewport"></a><h3>openGLWindowSet_viewport ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> openGLWindowSet_viewport (<em class="parameter"><code><a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> *window</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
<p>
It changes the size of the OpenGl area and reccompute the OpenGL viewport.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>the new horizontal size ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>the new vertical size.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE the size of <em class="parameter"><code>window</code></em> is actually changed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewGet_fileUnitPerPixel ()">
<a name="VisuOpenGLViewGet-fileUnitPerPixel"></a><h3>VisuOpenGLViewGet_fileUnitPerPixel ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span> VisuOpenGLViewGet_fileUnitPerPixel (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);</pre>
<p>
This method is used to know the ratio of a pixel with the unit of the file.
WARNING : this method is valid only when the camera is position at infinity.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> how much of a unit of file is in a pixel.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewGet_screenAxes ()">
<a name="VisuOpenGLViewGet-screenAxes"></a><h3>VisuOpenGLViewGet_screenAxes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> VisuOpenGLViewGet_screenAxes (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xAxis[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> yAxis[3]</code></em>);</pre>
<p>
This method is used to get the coordinates in box frame of x axis and y axis
of the current camera view.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xAxis</code></em> :</span></p></td>
<td> three float values representing x axis ;. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yAxis</code></em> :</span></p></td>
<td> three float values representing y axis.. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLViewGet_zCoordinate ()">
<a name="openGLViewGet-zCoordinate"></a><h3>openGLViewGet_zCoordinate ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span> openGLViewGet_zCoordinate (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xyz[3]</code></em>);</pre>
<p>
Use this routine to know the Z value of a real point defined by
<em class="parameter"><code>xyz</code></em> in caretsian coordinates.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xyz</code></em> :</span></p></td>
<td>a cartesian point.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLViewGet_realCoordinates ()">
<a name="openGLViewGet-realCoordinates"></a><h3>openGLViewGet_realCoordinates ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLViewGet_realCoordinates (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> xyz[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> winx</code></em>,
<em class="parameter"><code><span class="type">float</span> winy</code></em>,
<em class="parameter"><code><span class="type">float</span> winz</code></em>);</pre>
<p>
Use this routine to get the cartesian coordinates in real space of
a point located at <em class="parameter"><code>winx</code></em> and <em class="parameter"><code>winy</code></em> on screen.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xyz</code></em> :</span></p></td>
<td>a location to store the result.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winx</code></em> :</span></p></td>
<td>position on X axis of screen.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winy</code></em> :</span></p></td>
<td>position on Y axis of screen.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winz</code></em> :</span></p></td>
<td>height before projection on screen.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLViewSet_upAxis ()">
<a name="openGLViewSet-upAxis"></a><h3>openGLViewSet_upAxis ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLViewSet_upAxis (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-view.html#ViewAxis" title="enum ViewAxis"><span class="type">ViewAxis</span></a> upAxis</code></em>);</pre>
<p>
In constraint observation mode, the "north" direction is a singular
one. Define this direction with this routine.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>upAxis</code></em> :</span></p></td>
<td>a direction.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.6</p>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewNew ()">
<a name="VisuOpenGLViewNew"></a><h3>VisuOpenGLViewNew ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="returnvalue">VisuOpenGLView</span></a>* VisuOpenGLViewNew (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Create a new <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object with default values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the newly created object (to be free with <a class="link" href="v-sim-view.html#VisuOpenGLViewFree" title="VisuOpenGLViewFree ()"><code class="function">VisuOpenGLViewFree()</code></a>).. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewFree ()">
<a name="VisuOpenGLViewFree"></a><h3>VisuOpenGLViewFree ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> VisuOpenGLViewFree (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);</pre>
<p>
Free the given <em class="parameter"><code>view</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewCopy ()">
<a name="VisuOpenGLViewCopy"></a><h3>VisuOpenGLViewCopy ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="returnvalue">VisuOpenGLView</span></a>* VisuOpenGLViewCopy (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>);</pre>
<p>
Copy operator (newly <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> created with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-malloc"><code class="function">g_malloc()</code></a> to be freed be <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> with same values than <em class="parameter"><code>view</code></em>.. <acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>. </td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLCameraGet_numberOfFacettes ()">
<a name="VisuOpenGLCameraGet-numberOfFacettes"></a><h3>VisuOpenGLCameraGet_numberOfFacettes ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> VisuOpenGLCameraGet_numberOfFacettes
(<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> winSize</code></em>,
<em class="parameter"><code><span class="type">float</span> dimension</code></em>);</pre>
<p>
This is a function to get the number of "facettes" advised
by the server (according to its policy on rendering)
to draw an object according to a given dimension.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winSize</code></em> :</span></p></td>
<td>the size of the rendering area.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dimension</code></em> :</span></p></td>
<td>the size of the object which asks for its number of facettes.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the number of facettes the object should used.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLProject ()">
<a name="openGLProject"></a><h3>openGLProject ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLProject (<em class="parameter"><code><a class="link" href="v-sim-view.html#OpenGLWindow" title="OpenGLWindow"><span class="type">OpenGLWindow</span></a> *window</code></em>,
<em class="parameter"><code>const <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>,
<em class="parameter"><code><span class="type">float</span> extens</code></em>);</pre>
<p>
This method is used to set the projection and the OpenGL viewport.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>definition of the screen.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>position of the camera.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extens</code></em> :</span></p></td>
<td>expansion of the object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLModelize ()">
<a name="openGLModelize"></a><h3>openGLModelize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLModelize (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> *camera</code></em>);</pre>
<p>
Set-up the orientation matrix, depending on the camera definition.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>camera</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-view.html#VisuOpenGLCamera" title="VisuOpenGLCamera"><span class="type">VisuOpenGLCamera</span></a> object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewSet_precision ()">
<a name="VisuOpenGLViewSet-precision"></a><h3>VisuOpenGLViewSet_precision ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> VisuOpenGLViewSet_precision (<em class="parameter"><code><span class="type">float</span> value</code></em>);</pre>
<p>
This function change the value of the parameter precisionOfRendering. It
changes the number of facettes advised for every objects. It allows to
increase or decrease the number of polygons drawn and thus acts on the
speed of rendering.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a positive value (100 is normal precision).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the signals OpenGLFacetteChanged and
OpenGLAskForReDraw should be emitted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewGet_precision ()">
<a name="VisuOpenGLViewGet-precision"></a><h3>VisuOpenGLViewGet_precision ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span> VisuOpenGLViewGet_precision (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
This function retrieve the value of the parameter precisionOfRendering.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the actual precision.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLViewRotate_box ()">
<a name="openGLViewRotate-box"></a><h3>openGLViewRotate_box ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLViewRotate_box (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> dTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> dPhi</code></em>,
<em class="parameter"><code><span class="type">float</span> angles[2]</code></em>);</pre>
<p>
This methods rotates the camera of the given <em class="parameter"><code>view</code></em> of (<em class="parameter"><code>dTheta</code></em>, <em class="parameter"><code>dPhi</code></em>) and
put new theta and phi angles in <em class="parameter"><code>angles</code></em>, first being theta and second phi.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dTheta</code></em> :</span></p></td>
<td>a float value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dPhi</code></em> :</span></p></td>
<td>a float value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>angles</code></em> :</span></p></td>
<td> a storing area two floats.. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=2. </td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="openGLViewRotate_camera ()">
<a name="openGLViewRotate-camera"></a><h3>openGLViewRotate_camera ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> openGLViewRotate_camera (<em class="parameter"><code><a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> *view</code></em>,
<em class="parameter"><code><span class="type">float</span> dTheta</code></em>,
<em class="parameter"><code><span class="type">float</span> dPhi</code></em>,
<em class="parameter"><code><span class="type">float</span> angles[3]</code></em>);</pre>
<p>
This methods rotates the camera of the given <em class="parameter"><code>view</code></em> of (<em class="parameter"><code>dTheta</code></em>, <em class="parameter"><code>dPhi</code></em>).
<em class="parameter"><code>dTheta</code></em> is taken as displacement along camera x axis and dPhi along camera y axis.
Then, computations are done to obtain new theta, phi and omega values. They are
put in <em class="parameter"><code>angles</code></em>, first being theta, second phi and third omega.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>view</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-view.html#VisuOpenGLView" title="VisuOpenGLView"><span class="type">VisuOpenGLView</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dTheta</code></em> :</span></p></td>
<td>a float value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dPhi</code></em> :</span></p></td>
<td>a float value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>angles</code></em> :</span></p></td>
<td> a storing area three floats.. <acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>. <acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3. </td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="VisuOpenGLViewInit ()">
<a name="VisuOpenGLViewInit"></a><h3>VisuOpenGLViewInit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> VisuOpenGLViewInit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
This method is used by V_Sim during initilization process and should
not be called.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|