/usr/include/oce/V3d_View.hxx is in liboce-visualization-dev 0.9.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _V3d_View_HeaderFile
#define _V3d_View_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_V3d_View_HeaderFile
#include <Handle_V3d_View.hxx>
#endif
#ifndef _V3d_TypeOfView_HeaderFile
#include <V3d_TypeOfView.hxx>
#endif
#ifndef _V3d_ViewerPointer_HeaderFile
#include <V3d_ViewerPointer.hxx>
#endif
#ifndef _V3d_ListOfTransient_HeaderFile
#include <V3d_ListOfTransient.hxx>
#endif
#ifndef _Handle_Visual3d_View_HeaderFile
#include <Handle_Visual3d_View.hxx>
#endif
#ifndef _Visual3d_ViewMapping_HeaderFile
#include <Visual3d_ViewMapping.hxx>
#endif
#ifndef _Visual3d_ViewOrientation_HeaderFile
#include <Visual3d_ViewOrientation.hxx>
#endif
#ifndef _Visual3d_ContextView_HeaderFile
#include <Visual3d_ContextView.hxx>
#endif
#ifndef _Aspect_Background_HeaderFile
#include <Aspect_Background.hxx>
#endif
#ifndef _Aspect_GradientBackground_HeaderFile
#include <Aspect_GradientBackground.hxx>
#endif
#ifndef _Graphic3d_Vector_HeaderFile
#include <Graphic3d_Vector.hxx>
#endif
#ifndef _Graphic3d_Vertex_HeaderFile
#include <Graphic3d_Vertex.hxx>
#endif
#ifndef _Handle_Aspect_Window_HeaderFile
#include <Handle_Aspect_Window.hxx>
#endif
#ifndef _Handle_Graphic3d_Plotter_HeaderFile
#include <Handle_Graphic3d_Plotter.hxx>
#endif
#ifndef _TColStd_ListIteratorOfListOfTransient_HeaderFile
#include <TColStd_ListIteratorOfListOfTransient.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Aspect_Grid_HeaderFile
#include <Handle_Aspect_Grid.hxx>
#endif
#ifndef _gp_Ax3_HeaderFile
#include <gp_Ax3.hxx>
#endif
#ifndef _Handle_V3d_LayerMgr_HeaderFile
#include <Handle_V3d_LayerMgr.hxx>
#endif
#ifndef _TColStd_Array2OfReal_HeaderFile
#include <TColStd_Array2OfReal.hxx>
#endif
#ifndef _Handle_Graphic3d_Structure_HeaderFile
#include <Handle_Graphic3d_Structure.hxx>
#endif
#ifndef _Handle_Graphic3d_Group_HeaderFile
#include <Handle_Graphic3d_Group.hxx>
#endif
#ifndef _V3d_TypeOfProjectionModel_HeaderFile
#include <V3d_TypeOfProjectionModel.hxx>
#endif
#ifndef _Viewer_View_HeaderFile
#include <Viewer_View.hxx>
#endif
#ifndef _V3d_Viewer_HeaderFile
#include <V3d_Viewer.hxx>
#endif
#ifndef _Handle_V3d_View_HeaderFile
#include <Handle_V3d_View.hxx>
#endif
#ifndef _Handle_V3d_Viewer_HeaderFile
#include <Handle_V3d_Viewer.hxx>
#endif
#ifndef _Aspect_RenderingContext_HeaderFile
#include <Aspect_RenderingContext.hxx>
#endif
#ifndef _Aspect_GraphicCallbackProc_HeaderFile
#include <Aspect_GraphicCallbackProc.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Quantity_TypeOfColor_HeaderFile
#include <Quantity_TypeOfColor.hxx>
#endif
#ifndef _Quantity_Parameter_HeaderFile
#include <Quantity_Parameter.hxx>
#endif
#ifndef _Quantity_NameOfColor_HeaderFile
#include <Quantity_NameOfColor.hxx>
#endif
#ifndef _Aspect_GradientFillMethod_HeaderFile
#include <Aspect_GradientFillMethod.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Aspect_FillMethod_HeaderFile
#include <Aspect_FillMethod.hxx>
#endif
#ifndef _V3d_Coordinate_HeaderFile
#include <V3d_Coordinate.hxx>
#endif
#ifndef _V3d_TypeOfShadingModel_HeaderFile
#include <V3d_TypeOfShadingModel.hxx>
#endif
#ifndef _V3d_TypeOfSurfaceDetail_HeaderFile
#include <V3d_TypeOfSurfaceDetail.hxx>
#endif
#ifndef _Handle_Graphic3d_TextureEnv_HeaderFile
#include <Handle_Graphic3d_TextureEnv.hxx>
#endif
#ifndef _V3d_TypeOfVisualization_HeaderFile
#include <V3d_TypeOfVisualization.hxx>
#endif
#ifndef _Quantity_Length_HeaderFile
#include <Quantity_Length.hxx>
#endif
#ifndef _V3d_TypeOfZclipping_HeaderFile
#include <V3d_TypeOfZclipping.hxx>
#endif
#ifndef _Handle_V3d_Light_HeaderFile
#include <Handle_V3d_Light.hxx>
#endif
#ifndef _Handle_V3d_Plane_HeaderFile
#include <Handle_V3d_Plane.hxx>
#endif
#ifndef _Aspect_TypeOfTriedronPosition_HeaderFile
#include <Aspect_TypeOfTriedronPosition.hxx>
#endif
#ifndef _Aspect_TypeOfTriedronEcho_HeaderFile
#include <Aspect_TypeOfTriedronEcho.hxx>
#endif
#ifndef _OSD_FontAspect_HeaderFile
#include <OSD_FontAspect.hxx>
#endif
#ifndef _TCollection_ExtendedString_HeaderFile
#include <TCollection_ExtendedString.hxx>
#endif
#ifndef _Quantity_Color_HeaderFile
#include <Quantity_Color.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _Handle_Aspect_ColorScale_HeaderFile
#include <Handle_Aspect_ColorScale.hxx>
#endif
#ifndef _Quantity_PlaneAngle_HeaderFile
#include <Quantity_PlaneAngle.hxx>
#endif
#ifndef _V3d_TypeOfAxe_HeaderFile
#include <V3d_TypeOfAxe.hxx>
#endif
#ifndef _Quantity_Factor_HeaderFile
#include <Quantity_Factor.hxx>
#endif
#ifndef _V3d_TypeOfOrientation_HeaderFile
#include <V3d_TypeOfOrientation.hxx>
#endif
#ifndef _Quantity_Coefficient_HeaderFile
#include <Quantity_Coefficient.hxx>
#endif
#ifndef _Quantity_Ratio_HeaderFile
#include <Quantity_Ratio.hxx>
#endif
#ifndef _Handle_PlotMgt_PlotterDriver_HeaderFile
#include <Handle_PlotMgt_PlotterDriver.hxx>
#endif
#ifndef _Image_TypeOfImage_HeaderFile
#include <Image_TypeOfImage.hxx>
#endif
#ifndef _Aspect_FormatOfSheetPaper_HeaderFile
#include <Aspect_FormatOfSheetPaper.hxx>
#endif
#ifndef _Aspect_Handle_HeaderFile
#include <Aspect_Handle.hxx>
#endif
#ifndef _Aspect_PrintAlgo_HeaderFile
#include <Aspect_PrintAlgo.hxx>
#endif
#ifndef _Handle_Image_PixMap_HeaderFile
#include <Handle_Image_PixMap.hxx>
#endif
#ifndef _V3d_TypeOfBackfacingModel_HeaderFile
#include <V3d_TypeOfBackfacingModel.hxx>
#endif
class Visual3d_View;
class Aspect_Window;
class Graphic3d_Plotter;
class Aspect_Grid;
class V3d_LayerMgr;
class Graphic3d_Structure;
class Graphic3d_Group;
class Viewer_BadValue;
class Standard_TypeMismatch;
class Standard_MultiplyDefined;
class V3d_UnMapped;
class V3d_Viewer;
class Quantity_Color;
class Graphic3d_TextureEnv;
class V3d_Light;
class V3d_Plane;
class TCollection_ExtendedString;
class TCollection_AsciiString;
class Aspect_ColorScale;
class Visual3d_ViewOrientation;
class Visual3d_ViewMapping;
class Aspect_GradientBackground;
class Graphic3d_Vector;
class TColStd_Array2OfReal;
class Graphic3d_Vertex;
class gp_Ax3;
class PlotMgt_PlotterDriver;
class Image_PixMap;
//! Defines the application object VIEW for the <br>
//! VIEWER application. <br>
//! The methods of this class allow the editing <br>
//! and inquiring the parameters linked to the view. <br>
//! (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing <br>
//! et Conversions) . <br>
//! Warning: The default parameters are defined by the class <br>
//! Viewer (Example : SetDefaultViewSize()). <br>
//! Certain methods are mouse oriented, and it is <br>
//! necessary to know the difference between the start and <br>
//! the continuation of this gesture in putting the method <br>
//! into operation. <br>
//! Example : Shifting the eye-view along the screen axes. <br>
class V3d_View : public Viewer_View {
public:
//! Activates the view in the window specified and Map the <br>
//! Window to the screen. <br>//! Warning! raises MultiplyDefined from Standard <br>
//! if the view is already activated in a window. <br>
//! Warning: The view is centered and resized to preserve <br>
//! the height/width ratio of the window. <br>
Standard_EXPORT void SetWindow(const Handle(Aspect_Window)& IdWin) ;
//! Activates the view in the specified Window <br>
//! If <aContext> is not NULL the graphic context is used <br>
//! to draw something in this view. <br>
//! Otherwise an internal graphic context is created. <br>
//! If <aDisplayCB> is not NULL then a user display CB is <br>
//! call at the end of the OCC graphic traversal and just <br>
//! before the swap of buffers. The <aClientData> is pass <br>
//! to this call back. <br>//! Warning! raises MultiplyDefined from Standard <br>
//! if the view is already activated in a window. <br>
//! Warning: The view is centered and resized to preserve <br>
//! the height/width ratio of the window. <br>
Standard_EXPORT void SetWindow(const Handle(Aspect_Window)& aWindow,const Aspect_RenderingContext aContext,const Aspect_GraphicCallbackProc& aDisplayCB,const Standard_Address aClientData) ;
Standard_EXPORT void SetMagnify(const Handle(Aspect_Window)& IdWin,const Handle(V3d_View)& aPreviousView,const Standard_Integer x1,const Standard_Integer y1,const Standard_Integer x2,const Standard_Integer y2) ;
//! Destroys the view. <br>
Standard_EXPORT void Remove() const;
//! Updates the display of the view. <br>
//! Must be called to update the view <br>
//! when the update mode is deferred (WAIT) . <br>
Standard_EXPORT void Update() const;
//! Redisplays the view even if there has not <br>
//! been any modification. <br>
//! Must be called if the view is shown. <br>
//! (Ex: DeIconification ) . <br>
Standard_EXPORT void Redraw() const;
//! Redisplays the view area after esxposure. <br>
//! [x,y] define the min xy area position <br>
//! [width,height] the size of the area in pixel unit. <br>
Standard_EXPORT void Redraw(const Standard_Integer x,const Standard_Integer y,const Standard_Integer width,const Standard_Integer height) const;
//! Must be called when the window supporting the <br>
//! view changes size. <br>//! if the view is not mapped on a window. <br>
//! Warning: The view is centered and resized to preserve <br>
//! the height/width ratio of the window. <br>
Standard_EXPORT void MustBeResized() ;
//! Must be called when the window supporting the <br>
//! view is mapped or unmapped. <br>
Standard_EXPORT void DoMapping() ;
//! Returns the status of the view regarding <br>
//! the displayed structures inside <br>
//! Returns True is The View is empty <br>
Standard_EXPORT Standard_Boolean IsEmpty() const;
//! Updates the lights of the view. The view is redrawn. <br>
Standard_EXPORT void UpdateLights() const;
//! Defines the background colour of the view <br>
//! by supplying : <br>
//! the colour definition type, <br>
//! and the three corresponding values. <br>
Standard_EXPORT void SetBackgroundColor(const Quantity_TypeOfColor Type,const Quantity_Parameter V1,const Quantity_Parameter V2,const Quantity_Parameter V3) ;
//! Defines the background colour of the view <br>
//! by supplying : <br>
//! the colour object. <br>
Standard_EXPORT void SetBackgroundColor(const Quantity_Color& Color) ;
//! Defines the background colour of the view <br>
//! by supplying : <br>
//! the colour name in the form Quantity_NOC_xxxx . <br>
Standard_EXPORT void SetBackgroundColor(const Quantity_NameOfColor Name) ;
//! Defines the gradient background colours of the view <br>
//! by supplying : <br>
//! the colour objects. <br>
Standard_EXPORT void SetBgGradientColors(const Quantity_Color& Color1,const Quantity_Color& Color2,const Aspect_GradientFillMethod FillStyle = Aspect_GFM_HOR,const Standard_Boolean update = Standard_False) ;
//! Defines the gradient background colours of the view <br>
//! by supplying : <br>
//! the colour names in the form Quantity_NOC_xxxx . <br>
Standard_EXPORT void SetBgGradientColors(const Quantity_NameOfColor Color1,const Quantity_NameOfColor Color2,const Aspect_GradientFillMethod FillStyle = Aspect_GFM_HOR,const Standard_Boolean update = Standard_False) ;
//! Defines the gradient background fill method of the view <br>
Standard_EXPORT void SetBgGradientStyle(const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR,const Standard_Boolean update = Standard_False) const;
Standard_EXPORT void SetBackgroundImage(const Standard_CString FileName,const Aspect_FillMethod FillStyle = Aspect_FM_CENTERED,const Standard_Boolean update = Standard_False) ;
Standard_EXPORT void SetBgImageStyle(const Aspect_FillMethod FillStyle,const Standard_Boolean update = Standard_False) ;
//! Definition of an axis from its origin and <br>
//! its orientation . <br>
//! This will be the current axis for rotations and movements. <br>//! Warning! raises BadValue from Viewer if the vector normal is NULL. . <br>
Standard_EXPORT void SetAxis(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,const Quantity_Parameter Vx,const Quantity_Parameter Vy,const Quantity_Parameter Vz) ;
//! Defines the shading model for the <br>
//! visualisation ZBUFFER mode. <br>
//! Various models are available. <br>
Standard_EXPORT void SetShadingModel(const V3d_TypeOfShadingModel Model) ;
//! select the kind of rendering for texture mapping <br>
//! no texture mapping by default <br>
Standard_EXPORT void SetSurfaceDetail(const V3d_TypeOfSurfaceDetail SurfaceDetail) ;
//! set the environment texture to use <br>
//! no environment texture by default <br>
Standard_EXPORT void SetTextureEnv(const Handle(Graphic3d_TextureEnv)& ATexture) ;
//! Defines the visualisation mode in the view. <br>
Standard_EXPORT void SetVisualization(const V3d_TypeOfVisualization Mode) ;
//! Activates antialiasing in the view. <br>
Standard_EXPORT void SetAntialiasingOn() ;
//! Desactivates antialiasing in the view. <br>
Standard_EXPORT void SetAntialiasingOff() ;
//! Defines the depth of the medium clipping plane. <br>
Standard_EXPORT void SetZClippingDepth(const Quantity_Length Depth) ;
//! Defines the thicknes around the medium clippling plane. . <br>
Standard_EXPORT void SetZClippingWidth(const Quantity_Length Width) ;
//! Defines the type of ZClipping. <br>
Standard_EXPORT void SetZClippingType(const V3d_TypeOfZclipping Type) ;
//! Defines the depth of the medium plane. <br>
Standard_EXPORT void SetZCueingDepth(const Quantity_Length Depth) ;
//! Defines the thickness around the medium plane. <br>
Standard_EXPORT void SetZCueingWidth(const Quantity_Length Width) ;
//! Activates ZCueing in the view. <br>
Standard_EXPORT void SetZCueingOn() ;
//! Desactivates ZCueing in the view. <br>
Standard_EXPORT void SetZCueingOff() ;
//! Activates MyLight in the view. <br>
Standard_EXPORT void SetLightOn(const Handle(V3d_Light)& MyLight) ;
//! Activates all the lights defined in this view. <br>
Standard_EXPORT void SetLightOn() ;
//! Desactivate MyLight in this view. <br>
Standard_EXPORT void SetLightOff(const Handle(V3d_Light)& MyLight) ;
//! Deactivate all the Lights defined in this view. <br>
Standard_EXPORT void SetLightOff() ;
//! Returns TRUE when the light is active in this view. <br>
Standard_EXPORT Standard_Boolean IsActiveLight(const Handle(V3d_Light)& aLight) const;
//! Activate/Deactivate the transparency in this view. <br>
Standard_EXPORT void SetTransparency(const Standard_Boolean AnActivity = Standard_False) ;
//! Activates the clipping plane in this view. <br>//! If No More Plane can be activated in MyView . <br>
Standard_EXPORT void SetPlaneOn(const Handle(V3d_Plane)& MyPlane) ;
//! Activate all the clipping planes defined in <br>
//! this view. <br>//! If No More Plane can be activated in MyView . <br>
Standard_EXPORT void SetPlaneOn() ;
//! Desactivates the clipping plane defined <br>
//! in this view. <br>
Standard_EXPORT void SetPlaneOff(const Handle(V3d_Plane)& MyPlane) ;
//! Deactivate all clipping planes defined <br>
//! in this view. <br>
Standard_EXPORT void SetPlaneOff() ;
//! Returns TRUE when the plane is active in this view. <br>
Standard_EXPORT Standard_Boolean IsActivePlane(const Handle(V3d_Plane)& aPlane) const;
//! Customization of the ZBUFFER Triedron. <br>
//! XColor,YColor,ZColor - colors of axis <br>
//! SizeRatio - ratio of decreasing of the trihedron size when its phisical <br>
//! position comes out of the view <br>
//! AxisDiametr - diameter relatively to axis length <br>
//! NbFacettes - number of facettes of cylinders and cones <br>
Standard_EXPORT void ZBufferTriedronSetup(const Quantity_NameOfColor XColor = Quantity_NOC_RED,const Quantity_NameOfColor YColor = Quantity_NOC_GREEN,const Quantity_NameOfColor ZColor = Quantity_NOC_BLUE1,const Standard_Real SizeRatio = 0.8,const Standard_Real AxisDiametr = 0.05,const Standard_Integer NbFacettes = 12) ;
//! Display of the Triedron. <br>
//! Initialize position, color and length of Triedron axes. <br>
//! The scale is a percent of the window width. <br>
Standard_EXPORT void TriedronDisplay(const Aspect_TypeOfTriedronPosition APosition = Aspect_TOTP_CENTER,const Quantity_NameOfColor AColor = Quantity_NOC_WHITE,const Standard_Real AScale = 0.02,const V3d_TypeOfVisualization AMode = V3d_WIREFRAME) ;
//! Erases the Triedron. <br>
Standard_EXPORT void TriedronErase() ;
//! Highlights the echo zone of the Triedron. <br>
Standard_EXPORT void TriedronEcho(const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE) ;
//! Returns data of a graduated trihedron. <br>
Standard_EXPORT void GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,OSD_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,OSD_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const;
//! Displays a graduated trihedron. <br>
Standard_EXPORT void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname = "X",const TCollection_ExtendedString& yname = "Y",const TCollection_ExtendedString& zname = "Z",const Standard_Boolean xdrawname = Standard_True,const Standard_Boolean ydrawname = Standard_True,const Standard_Boolean zdrawname = Standard_True,const Standard_Boolean xdrawvalues = Standard_True,const Standard_Boolean ydrawvalues = Standard_True,const Standard_Boolean zdrawvalues = Standard_True,const Standard_Boolean drawgrid = Standard_True,const Standard_Boolean drawaxes = Standard_True,const Standard_Integer nbx = 3,const Standard_Integer nby = 3,const Standard_Integer nbz = 3,const Standard_Integer xoffset = 10,const Standard_Integer yoffset = 10,const Standard_Integer zoffset = 10,const Standard_Integer xaxisoffset = 30,const Standard_Integer yaxisoffset = 30,const Standard_Integer zaxisoffset = 30,const Standard_Boolean xdrawtickmarks = Standard_True,const Standard_Boolean ydrawtickmarks = Standard_True,const Standard_Boolean zdrawtickmarks = Standard_True,const Standard_Integer xtickmarklength = 10,const Standard_Integer ytickmarklength = 10,const Standard_Integer ztickmarklength = 10,const Quantity_Color& gridcolor = Quantity_NOC_WHITE,const Quantity_Color& xnamecolor = Quantity_NOC_RED,const Quantity_Color& ynamecolor = Quantity_NOC_GREEN,const Quantity_Color& znamecolor = Quantity_NOC_BLUE1,const Quantity_Color& xcolor = Quantity_NOC_RED,const Quantity_Color& ycolor = Quantity_NOC_GREEN,const Quantity_Color& zcolor = Quantity_NOC_BLUE1,const TCollection_AsciiString& fontOfNames = "Arial",const OSD_FontAspect styleOfNames = OSD_FA_Bold,const Standard_Integer sizeOfNames = 12,const TCollection_AsciiString& fontOfValues = "Arial",const OSD_FontAspect styleOfValues = OSD_FA_Regular,const Standard_Integer sizeOfValues = 12) ;
//! Erases a graduated trihedron from the view. <br>
Standard_EXPORT void GraduatedTrihedronErase() ;
Standard_EXPORT void SetLayerMgr(const Handle(V3d_LayerMgr)& aMgr) ;
Standard_EXPORT void ColorScaleDisplay() ;
Standard_EXPORT void ColorScaleErase() ;
Standard_EXPORT Standard_Boolean ColorScaleIsDisplayed() const;
Standard_EXPORT Handle_Aspect_ColorScale ColorScale() const;
//! modify the Projection of the view perpendicularly to <br>
//! the privileged plane of the viewer. <br>
Standard_EXPORT void SetFront() ;
//! Rotates the eye about the coordinate system of <br>
//! reference of the screen <br>
//! for which the origin is the view point of the projection, <br>
//! with a relative angular value in RADIANS with respect to <br>
//! the initial position expressed by Start = Standard_True <br>//! Warning! raises BadValue from Viewer <br>
//! If the eye, the view point, or the high point are <br>
//! aligned or confused. <br>
Standard_EXPORT void Rotate(const Quantity_PlaneAngle Ax,const Quantity_PlaneAngle Ay,const Quantity_PlaneAngle Az,const Standard_Boolean Start = Standard_True) ;
//! Rotates the eye about the coordinate system of <br>
//! reference of the screen <br>
//! for which the origin is Gravity point {X,Y,Z}, <br>
//! with a relative angular value in RADIANS with respect to <br>
//! the initial position expressed by Start = Standard_True <br>//! If the eye, the view point, or the high point are <br>
//! aligned or confused. <br>
Standard_EXPORT void Rotate(const Quantity_PlaneAngle Ax,const Quantity_PlaneAngle Ay,const Quantity_PlaneAngle Az,const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,const Standard_Boolean Start = Standard_True) ;
//! Rotates the eye about one of the coordinate axes of <br>
//! of the view for which the origin is the Gravity point{X,Y,Z} <br>
//! with an relative angular value in RADIANS with <br>
//! respect to the initial position expressed by <br>
//! Start = Standard_True <br>
Standard_EXPORT void Rotate(const V3d_TypeOfAxe Axe,const Quantity_PlaneAngle Angle,const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,const Standard_Boolean Start = Standard_True) ;
//! Rotates the eye about one of the coordinate axes of <br>
//! of the view for which the origin is the view point of the <br>
//! projection with an relative angular value in RADIANS with <br>
//! respect to the initial position expressed by <br>
//! Start = Standard_True <br>
Standard_EXPORT void Rotate(const V3d_TypeOfAxe Axe,const Quantity_PlaneAngle Angle,const Standard_Boolean Start = Standard_True) ;
//! Rotates the eye around the current axis a relative <br>
//! angular value in RADIANS with respect to the initial <br>
//! position expressed by Start = Standard_True <br>
Standard_EXPORT void Rotate(const Quantity_PlaneAngle Angle,const Standard_Boolean Start = Standard_True) ;
//! Movement of the eye parallel to the coordinate system <br>
//! of reference of the screen a distance relative to the <br>
//! initial position expressed by Start = Standard_True. <br>
Standard_EXPORT void Move(const Quantity_Length Dx,const Quantity_Length Dy,const Quantity_Length Dz,const Standard_Boolean Start = Standard_True) ;
//! Movement of the eye parallel to one of the axes of the <br>
//! coordinate system of reference of the view a distance <br>
//! relative to the initial position expressed by <br>
//! Start = Standard_True. <br>
Standard_EXPORT void Move(const V3d_TypeOfAxe Axe,const Quantity_Length Length,const Standard_Boolean Start = Standard_True) ;
//! Movement of the eye parllel to the current axis <br>
//! a distance relative to the initial position <br>
//! expressed by Start = Standard_True <br>
Standard_EXPORT void Move(const Quantity_Length Length,const Standard_Boolean Start = Standard_True) ;
//! Movement of the ye and the view point parallel to the <br>
//! frame of reference of the screen a distance relative <br>
//! to the initial position expressed by <br>
//! Start = Standard_True <br>
Standard_EXPORT void Translate(const Quantity_Length Dx,const Quantity_Length Dy,const Quantity_Length Dz,const Standard_Boolean Start = Standard_True) ;
//! Movement of the eye and the view point parallel to one <br>
//! of the axes of the fame of reference of the view a <br>
//! distance relative to the initial position <br>
//! expressed by Start = Standard_True <br>
Standard_EXPORT void Translate(const V3d_TypeOfAxe Axe,const Quantity_Length Length,const Standard_Boolean Start = Standard_True) ;
//! Movement of the eye and view point parallel to <br>
//! the current axis a distance relative to the initial <br>
//! position expressed by Start = Standard_True <br>
Standard_EXPORT void Translate(const Quantity_Length Length,const Standard_Boolean Start = Standard_True) ;
//! places the point of the view corresponding <br>
//! at the pixel position x,y at the center of the window <br>
//! and updates the view. <br>
Standard_EXPORT void Place(const Standard_Integer x,const Standard_Integer y,const Quantity_Factor aZoomFactor = 1) ;
//! Rotation of the view point around the frame of reference <br>
//! of the screen for which the origin is the eye of the <br>
//! projection with a relative angular value in RADIANS <br>
//! with respect to the initial position expressed by <br>
//! Start = Standard_True <br>
Standard_EXPORT void Turn(const Quantity_PlaneAngle Ax,const Quantity_PlaneAngle Ay,const Quantity_PlaneAngle Az,const Standard_Boolean Start = Standard_True) ;
//! Rotation of the view point around one of the axes of the <br>
//! frame of reference of the view for which the origin is <br>
//! the eye of the projection with an angular value in <br>
//! RADIANS relative to the initial position expressed by <br>
//! Start = Standard_True <br>
Standard_EXPORT void Turn(const V3d_TypeOfAxe Axe,const Quantity_PlaneAngle Angle,const Standard_Boolean Start = Standard_True) ;
//! Rotation of the view point around the current axis an <br>
//! angular value in RADIANS relative to the initial <br>
//! position expressed by Start = Standard_True <br>
Standard_EXPORT void Turn(const Quantity_PlaneAngle Angle,const Standard_Boolean Start = Standard_True) ;
//! Defines the angular position of the high point of <br>
//! the reference frame of the view with respect to the <br>
//! Y screen axis with an absolute angular value in <br>
//! RADIANS. <br>
Standard_EXPORT void SetTwist(const Quantity_PlaneAngle Angle) ;
//! Defines the position of the eye.. <br>
Standard_EXPORT void SetEye(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z) ;
//! Defines the Depth of the eye from the view point <br>
//! without update the projection . <br>
Standard_EXPORT void SetDepth(const Quantity_Length Depth) ;
//! Defines the orientation of the projection. <br>
Standard_EXPORT void SetProj(const Quantity_Parameter Vx,const Quantity_Parameter Vy,const Quantity_Parameter Vz) ;
//! Defines the orientation of the projection . <br>
Standard_EXPORT void SetProj(const V3d_TypeOfOrientation Orientation) ;
//! Defines the position of the view point. <br>
Standard_EXPORT void SetAt(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z) ;
//! Defines the orientation of the high point. <br>
Standard_EXPORT void SetUp(const Quantity_Parameter Vx,const Quantity_Parameter Vy,const Quantity_Parameter Vz) ;
//! Defines the orientation(SO) of the high point. <br>
Standard_EXPORT void SetUp(const V3d_TypeOfOrientation Orientation) ;
//! Modifies the orientation of the view. <br>
Standard_EXPORT void SetViewOrientation(const Visual3d_ViewOrientation& VO) ;
//! Saves the current state of the orientation of the view <br>
//! which will be the return state at ResetViewOrientation. <br>
Standard_EXPORT void SetViewOrientationDefault() ;
//! Resets the orientation of the view. <br>
//! Updates the view <br>
Standard_EXPORT void ResetViewOrientation() ;
//! translates the center of the view and zooms the view. <br>
//! Updates the view. <br>
Standard_EXPORT void Panning(const Quantity_Length Dx,const Quantity_Length Dy,const Quantity_Factor aZoomFactor = 1,const Standard_Boolean Start = Standard_True) ;
//! Defines the centre of the view. <br>
//! Updates the view. <br>
Standard_EXPORT void SetCenter(const V3d_Coordinate Xc,const V3d_Coordinate Yc) ;
//! Defines the centre of the view from a pixel position. <br>
//! Updates the view. <br>
Standard_EXPORT void SetCenter(const Standard_Integer X,const Standard_Integer Y) ;
//! Defines the size of the view while preserving the <br>
//! center and height/width ratio of the window supporting <br>
//! the view. <br>
//! NOTE than the Depth of the View is NOT modified . <br>
Standard_EXPORT void SetSize(const Quantity_Length Size) ;
//! Defines the Depth size of the view <br>
//! Front Plane will be set to Size/2. <br>
//! Back Plane will be set to -Size/2. <br>
//! Any Object located Above the Front Plane or <br>
//! behind the Back Plane will be Clipped . <br>
//! NOTE than the XY Size of the View is NOT modified . <br>
Standard_EXPORT void SetZSize(const Quantity_Length Size) ;
//! Zooms the view by a factor relative to the initial <br>
//! value expressed by Start = Standard_True <br>
//! Updates the view. <br>
Standard_EXPORT void SetZoom(const Quantity_Factor Coef,const Standard_Boolean Start = Standard_True) ;
//! Zooms the view by a factor relative to the value <br>
//! initialised by SetViewMappingDefault(). <br>
//! Updates the view. <br>
Standard_EXPORT void SetScale(const Quantity_Factor Coef) ;
//! Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>. <br>
//! Anisotropic scaling operation is performed through multiplying <br>
//! the current view orientation matrix by a scaling matrix: <br>
//! || Sx 0 0 0 || <br>
//! || 0 Sy 0 0 || <br>
//! || 0 0 Sz 0 || <br>
//! || 0 0 0 1 || <br>
//! Updates the view. <br>
Standard_EXPORT void SetAxialScale(const Standard_Real Sx,const Standard_Real Sy,const Standard_Real Sz) ;
//! Automatic zoom/panning. Objects in the view are visualised <br>
//! so as to occupy the maximum space while respecting the <br>
//! margin coefficient and the initial height /width ratio. <br>
//! NOTE than the original Z size of the view is NOT modified . <br>
Standard_EXPORT void FitAll(const Quantity_Coefficient Coef = 0.01,const Standard_Boolean FitZ = Standard_False,const Standard_Boolean update = Standard_True) ;
//! Automatic Depth Panning. Objects visible in the view are <br>
//! visualised so as to occupy the maximum Z amount of space <br>
//! while respecting the margin coefficient . <br>
//! NOTE than the original XY size of the view is NOT modified . <br>
Standard_EXPORT void ZFitAll(const Quantity_Coefficient Coef = 1.0) ;
//! Adjusts the viewing volume so as not to clip the displayed objects by front and back <br>
//! and back clipping planes. Also sets depth value automatically depending on the <br>
//! calculated Z size and Aspect parameter. <br>
//! NOTE than the original XY size of the view is NOT modified . <br>
Standard_EXPORT void DepthFitAll(const Quantity_Coefficient Aspect = 0.01,const Quantity_Coefficient Margin = 0.01) ;
//! Centres the defined projection window so that it occupies <br>
//! the maximum space while respecting the initial <br>
//! height/width ratio. <br>
//! NOTE than the original Z size of the view is NOT modified . <br>
Standard_EXPORT void FitAll(const V3d_Coordinate Umin,const V3d_Coordinate Vmin,const V3d_Coordinate Umax,const V3d_Coordinate Vmax) ;
//! Centres the defined PIXEL window so that it occupies <br>
//! the maximum space while respecting the initial <br>
//! height/width ratio. <br>
//! NOTE than the original Z size of the view is NOT modified . <br>
Standard_EXPORT void WindowFit(const Standard_Integer Xmin,const Standard_Integer Ymin,const Standard_Integer Xmax,const Standard_Integer Ymax) ;
//! Sets Z and XY size of the view according to given values <br>
//! with respecting the initial view depth (eye position) <br>
Standard_EXPORT void SetViewingVolume(const Standard_Real Left,const Standard_Real Right,const Standard_Real Bottom,const Standard_Real Top,const Standard_Real ZNear,const Standard_Real ZFar) ;
//! Modifies the mapping of the view. <br>
Standard_EXPORT void SetViewMapping(const Visual3d_ViewMapping& VM) ;
//! Saves the current view mapping. This will be the <br>
//! state returned from ResetViewmapping. <br>
Standard_EXPORT void SetViewMappingDefault() ;
//! Resets the centring of the view. <br>
//! Updates the view <br>
Standard_EXPORT void ResetViewMapping() ;
//! Resets the centring and the orientation of the view <br>
//! Updates the view <br>
Standard_EXPORT void Reset(const Standard_Boolean update = Standard_True) ;
//! Converts the PIXEL value <br>
//! to a value in the projection plane. <br>
Standard_EXPORT Quantity_Length Convert(const Standard_Integer Vp) const;
//! Converts the point PIXEL into a point projected <br>
//! in the reference frame of the projection plane. <br>
Standard_EXPORT void Convert(const Standard_Integer Xp,const Standard_Integer Yp,V3d_Coordinate& Xv,V3d_Coordinate& Yv) const;
//! Converts tha value of the projection plane into <br>
//! a PIXEL value. <br>
Standard_EXPORT Standard_Integer Convert(const Quantity_Length Vv) const;
//! Converts the point defined in the reference frame <br>
//! of the projection plane into a point PIXEL. <br>
Standard_EXPORT void Convert(const V3d_Coordinate Xv,const V3d_Coordinate Yv,Standard_Integer& Xp,Standard_Integer& Yp) const;
//! Converts the projected point into a point <br>
//! in the reference frame of the view corresponding <br>
//! to the intersection with the projection plane <br>
//! of the eye/view point vector. <br>
Standard_EXPORT void Convert(const Standard_Integer Xp,const Standard_Integer Yp,V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z) const;
//! Converts the projected point into a point <br>
//! in the reference frame of the view corresponding <br>
//! to the intersection with the projection plane <br>
//! of the eye/view point vector and returns the <br>
//! projection ray for further computations. <br>
Standard_EXPORT void ConvertWithProj(const Standard_Integer Xp,const Standard_Integer Yp,V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z,Quantity_Parameter& Vx,Quantity_Parameter& Vy,Quantity_Parameter& Vz) const;
//! Converts the projected point into the nearest grid point <br>
//! in the reference frame of the view corresponding <br>
//! to the intersection with the projection plane <br>
//! of the eye/view point vector and display the grid marker. <br>
//! Warning: When the grid is not active the result is identical <br>
//! to the above Convert() method. <br>
//! How to use : <br>
//! 1) Enable the grid echo display <br>
//! myViewer->SetGridEcho(Standard_True); <br>
//! 2) When application receive a move event : <br>
//! 2.1) Check if any object is detected <br>
//! if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) { <br>
//! 2.2) Check if the grid is active <br>
//! if( myViewer->Grid()->IsActive() ) { <br>
//! 2.3) Display the grid echo and gets the grid point <br>
//! myView->ConvertToGrid(x,y,X,Y,Z); <br>
//! 2.4) Else this is the standard case <br>
//! } else myView->Convert(x,y,X,Y,Z); <br>
Standard_EXPORT void ConvertToGrid(const Standard_Integer Xp,const Standard_Integer Yp,V3d_Coordinate& Xg,V3d_Coordinate& Yg,V3d_Coordinate& Zg) const;
//! Converts the point into the nearest grid point <br>
//! and display the grid marker. <br>
Standard_EXPORT void ConvertToGrid(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,V3d_Coordinate& Xg,V3d_Coordinate& Yg,V3d_Coordinate& Zg) const;
//! Projects the point defined in the reference frame of <br>
//! the view into the projected point in the associated window. <br>
Standard_EXPORT void Convert(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,Standard_Integer& Xp,Standard_Integer& Yp) const;
//! Converts the point defined in the user space of <br>
//! the view to the projected view plane point at z 0. <br>
Standard_EXPORT void Project(const V3d_Coordinate X,const V3d_Coordinate Y,const V3d_Coordinate Z,V3d_Coordinate& Xp,V3d_Coordinate& Yp) const;
//! Returns the Background color values of the view <br>
//! depending of the color Type. <br>
Standard_EXPORT void BackgroundColor(const Quantity_TypeOfColor Type,Quantity_Parameter& V1,Quantity_Parameter& V2,Quantity_Parameter& V3) const;
//! Returns the Background color object of the view. <br>
Standard_EXPORT Quantity_Color BackgroundColor() const;
//! Returns the gradient background colour objects of the view. <br>
Standard_EXPORT void GradientBackgroundColors(Quantity_Color& Color1,Quantity_Color& Color2) const;
//! Returns the gradient background of the view. <br>
Standard_EXPORT Aspect_GradientBackground GradientBackground() const;
//! Returns the current value of the zoom expressed with <br>
//! respect to SetViewMappingDefault(). <br>
Standard_EXPORT Quantity_Factor Scale() const;
//! Returns the current values of the anisotropic (axial) scale factors. <br>
Standard_EXPORT void AxialScale(Standard_Real& Sx,Standard_Real& Sy,Standard_Real& Sz) const;
//! Returns the centre of the view. <br>
Standard_EXPORT void Center(V3d_Coordinate& Xc,V3d_Coordinate& Yc) const;
//! Returns the height and width of the view. <br>
Standard_EXPORT void Size(Quantity_Length& Width,Quantity_Length& Height) const;
//! Returns the Depth of the view . <br>
Standard_EXPORT Standard_Real ZSize() const;
//! Returns the position of the eye. <br>
Standard_EXPORT void Eye(V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z) const;
//! Returns the position of point which emanating the <br>
//! projections. <br>
Standard_EXPORT void FocalReferencePoint(V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z) const;
//! Returns the coordinate of the point (Xpix,Ypix) <br>
//! in the view (XP,YP,ZP), and the projection vector of the <br>
//! view passing by the point (for PerspectiveView). <br>
Standard_EXPORT void ProjReferenceAxe(const Standard_Integer Xpix,const Standard_Integer Ypix,V3d_Coordinate& XP,V3d_Coordinate& YP,V3d_Coordinate& ZP,V3d_Coordinate& VX,V3d_Coordinate& VY,V3d_Coordinate& VZ) const;
//! Returns the Distance between the Eye and View Point. <br>
Standard_EXPORT Quantity_Length Depth() const;
//! Returns the projection vector. <br>
Standard_EXPORT void Proj(Quantity_Parameter& Vx,Quantity_Parameter& Vy,Quantity_Parameter& Vz) const;
//! Returns the position of the view point. <br>
Standard_EXPORT void At(V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z) const;
//! Returns the vector giving the position of the high point. <br>
Standard_EXPORT void Up(Quantity_Parameter& Vx,Quantity_Parameter& Vy,Quantity_Parameter& Vz) const;
//! Returns in RADIANS the orientation of the view around <br>
//! the visual axis measured from the Y axis of the screen. <br>
Standard_EXPORT Quantity_PlaneAngle Twist() const;
//! Returns the current shading model. <br>
Standard_EXPORT V3d_TypeOfShadingModel ShadingModel() const;
Standard_EXPORT V3d_TypeOfSurfaceDetail SurfaceDetail() const;
Standard_EXPORT Handle_Graphic3d_TextureEnv TextureEnv() const;
//! Returns the transparency activity. <br>
Standard_EXPORT Standard_Boolean Transparency() const;
//! Returns the current visualisation mode. <br>
Standard_EXPORT V3d_TypeOfVisualization Visualization() const;
//! Indicates if the antialiasing is active (True) or <br>
//! inactive (False). <br>
Standard_EXPORT Standard_Boolean Antialiasing() const;
//! Returns activity and information on the Zcueing. <br>
//! <Depth> : Depth of plane. <br>
//! <Width> : Thickness around the plane. <br>
Standard_EXPORT Standard_Boolean ZCueing(Quantity_Length& Depth,Quantity_Length& Width) const;
//! Returns current information on the ZClipping. <br>
//! <Depth> : Depth of plane. <br>
//! <Width> : Thickness around the plane. <br>
//! <TypeOfZclipping> : "BACK" <br>
//! "FRONT" <br>
//! "SLICE" <br>
//! "OFF" <br>
Standard_EXPORT V3d_TypeOfZclipping ZClipping(Quantity_Length& Depth,Quantity_Length& Width) const;
//! Returns True if One light more can be <br>
//! activated in this View. <br>
Standard_EXPORT Standard_Boolean IfMoreLights() const;
//! initializes an iteration on the active Lights. <br>
Standard_EXPORT void InitActiveLights() ;
//! returns true if there are more active Light(s) to return. <br>
Standard_EXPORT Standard_Boolean MoreActiveLights() const;
//! Go to the next active Light <br>
//! (if there is not, ActiveLight will raise an exception) <br>
Standard_EXPORT void NextActiveLights() ;
Standard_EXPORT Handle_V3d_Light ActiveLight() const;
//! Returns True if One clipping plane more can be <br>
//! activated in this View. <br>
Standard_EXPORT Standard_Boolean IfMorePlanes() const;
//! initializes an iteration on the active Planes. <br>
Standard_EXPORT void InitActivePlanes() ;
//! returns true if there are more active Plane(s) to return. <br>
Standard_EXPORT Standard_Boolean MoreActivePlanes() const;
//! Go to the next active Plane <br>
//! (if there is not, ActivePlane will raise an exception) <br>
Standard_EXPORT void NextActivePlanes() ;
Standard_EXPORT Handle_V3d_Plane ActivePlane() const;
//! Returns the viewer in which the view has been created. <br>
Standard_EXPORT Handle_V3d_Viewer Viewer() const;
//! Returns True if MyView is associated with a window . <br>
Standard_EXPORT Standard_Boolean IfWindow() const;
//! Returns the Aspect Window associated with the view. <br>
Standard_EXPORT Handle_Aspect_Window Window() const;
//! Returns the Type of the View <br>
Standard_EXPORT V3d_TypeOfView Type() const;
//! translates the center of the view and zooms the view. <br>
//! and updates the view. <br>
Standard_EXPORT void Pan(const Standard_Integer Dx,const Standard_Integer Dy,const Quantity_Factor aZoomFactor = 1) ;
//! Zoom the view according to a zoom factor computed <br>
//! from the distance between the 2 mouse position <X1,Y1>,<X2,Y2> <br>
Standard_EXPORT void Zoom(const Standard_Integer X1,const Standard_Integer Y1,const Standard_Integer X2,const Standard_Integer Y2) ;
//! Zoom the view according to a zoom factor computed <br>
//! from the distance between the last and new mouse position <X,Y> <br>
Standard_EXPORT void Zoom(const Standard_Integer X,const Standard_Integer Y) ;
//! Defines the point (pixel) of zooming (for the method ZoomAtPoint()). <br>
Standard_EXPORT void StartZoomAtPoint(const Standard_Integer xpix,const Standard_Integer ypix) ;
//! Zooms the model at a pixel defined by the method StartZoomAtPoint(). <br>
Standard_EXPORT void ZoomAtPoint(const Standard_Integer mouseStartX,const Standard_Integer mouseStartY,const Standard_Integer mouseEndX,const Standard_Integer mouseEndY) ;
//! Performs anisotropic scaling of <me> view along the given <Axis>. <br>
//! The scale factor is calculated on a basis of <br>
//! the mouse pointer displacement <Dx,Dy>. <br>
//! The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method. <br>
Standard_EXPORT void AxialScale(const Standard_Integer Dx,const Standard_Integer Dy,const V3d_TypeOfAxe Axis) ;
//! Begin the rotation of the view arround the screen axis <br>
//! according to the mouse position <X,Y>. <br>
//! Warning: Enable rotation around the Z screen axis when <zRotationThreshold> <br>
//! factor is > 0 soon the distance from the start point and the center <br>
//! of the view is > (medium viewSize * <zRotationThreshold> ). <br>
//! Generally a value of 0.4 is usable to rotate around XY screen axis <br>
//! inside the circular treshold area and to rotate around Z screen axis <br>
//! outside this area. <br>
Standard_EXPORT void StartRotation(const Standard_Integer X,const Standard_Integer Y,const Quantity_Ratio zRotationThreshold = 0.0) ;
//! Continues the rotation of the view <br>
//! with an angle computed from the last and new mouse position <X,Y>. <br>
Standard_EXPORT void Rotation(const Standard_Integer X,const Standard_Integer Y) ;
//! Change View Plane Distance for Perspective Views <br>//! Warning! raises TypeMismatch from Standard if the view <br>
//! is not a perspective view. <br>
Standard_EXPORT void SetFocale(const Quantity_Length Focale) ;
//! Returns the View Plane Distance for Perspective Views <br>
Standard_EXPORT Quantity_Length Focale() const;
//! Returns the associated Visual3d view. <br>
Standard_EXPORT Handle_Visual3d_View View() const;
//! Returns the current mapping of the view. <br>
Standard_EXPORT Visual3d_ViewMapping ViewMapping() const;
//! Returns the current orientation of the view. <br>
Standard_EXPORT Visual3d_ViewOrientation ViewOrientation() const;
//! Begins any graphics in the view <aView> <br>
//! Redraw any structured graphics in the back buffer before <br>
//! if <DoubleBuffer> is TRUE. <br>
//! Restore the front buffer from the back before <br>
//! if <DoubleBuffer> is FALSE. <br>
//! if <RetainMode> is TRUE. <br>
//! the graphic managed itself exposure,resizing ... <br>
//! if <RetainMode> is FALSE. <br>
//! the application must managed itself exposure,resizing ... <br>
Standard_EXPORT Standard_Boolean TransientManagerBeginDraw(const Standard_Boolean DoubleBuffer = Standard_False,const Standard_Boolean RetainMode = Standard_False) const;
//! Clear all transient graphics in the view <aView> <br>
Standard_EXPORT void TransientManagerClearDraw() const;
//! Begins any add graphics in the view <aView> <br>
//! Redraw any structured graphics in the back buffer before <br>
//! the application must managed itself exposure,resizing ... <br>
//! Warning: Returns TRUE if transient drawing is enabled in <br>
//! the associated view. <br>
//! Returns FALSE ,if nothing works because something <br>
//! is wrong for the transient principle : <br>
Standard_EXPORT Standard_Boolean TransientManagerBeginAddDraw() const;
//! Activates animation mode. <br>
//! When the animation mode is activated in the view, <br>
//! all Graphic3d_Structure are stored in a graphic object. <br>
Standard_EXPORT void SetAnimationModeOn() ;
//! Deactivates the animation mode. <br>
Standard_EXPORT void SetAnimationModeOff() ;
//! Returns the activity of the animation mode. <br>
Standard_EXPORT Standard_Boolean AnimationModeIsOn() const;
//! Enable/Disable animation/degeneration mode <br>
Standard_EXPORT void SetAnimationMode(const Standard_Boolean anAnimationFlag = Standard_True,const Standard_Boolean aDegenerationFlag = Standard_False) ;
//! Returns the animation and degenerate status. <br>
Standard_EXPORT Standard_Boolean AnimationMode(Standard_Boolean& isDegenerate) const;
//! Activates degenerate mode. <br>
//! When the degenerate mode is activated in the view, <br>
//! all Graphic3d_Structure with the type TOS_COMPUTED <br>
//! displayed in this view are not computed. <br>
//! Warning: Obsolete method , use SetComputedMode() <br>
Standard_EXPORT void SetDegenerateModeOn() ;
//! Deactivates the degenerate mode. <br>
//! Category: Methods to modify the class definition <br>
//! Warning: if the computed mode has been disabled in the <br>
//! viewer the mode will remain degenerated. <br>
//! Warning: Obsolete method , use SetComputedMode() <br>
Standard_EXPORT void SetDegenerateModeOff() ;
//! Returns the activity of the degenerate mode. <br>
Standard_EXPORT Standard_Boolean DegenerateModeIsOn() const;
//! Switches computed HLR mode in the view <br>
Standard_EXPORT void SetComputedMode(const Standard_Boolean aMode) ;
//! Returns the computed HLR mode state <br>
Standard_EXPORT Standard_Boolean ComputedMode() const;
//! idem than WindowFit <br>
Standard_EXPORT void WindowFitAll(const Standard_Integer Xmin,const Standard_Integer Ymin,const Standard_Integer Xmax,const Standard_Integer Ymax) ;
//! Set a plotter for plotting the contents of the view <br>
//! field MyPlotter <br>
Standard_EXPORT virtual void SetPlotter(const Handle(Graphic3d_Plotter)& aPlotter) ;
//! Create a 2D View for plotting the contents of the view <br>
Standard_EXPORT void Plot() ;
//! Defines or Updates the definition of the <br>
//! grid in <me> <br>
Standard_EXPORT void SetGrid(const gp_Ax3& aPlane,const Handle(Aspect_Grid)& aGrid) ;
//! Defines or Updates the graphic definition of the <br>
//! grid in <me> <br>
Standard_EXPORT void SetGridGraphicValues(const Handle(Aspect_Grid)& aGrid) ;
//! Defines or Updates the activity of the <br>
//! grid in <me> <br>
Standard_EXPORT void SetGridActivity(const Standard_Boolean aFlag) ;
//! Animates the view <me> <br>
//! Returns the number of images per second <br>
//! if <AnimationMode> is Standard_True, the animation mode <br>
//! is activated. <br>
Standard_EXPORT Standard_Real Tumble(const Standard_Integer NbImages = 314,const Standard_Boolean AnimationMode = Standard_False) ;
//! dump the view <br>
Standard_EXPORT void ScreenCopy(const Handle(PlotMgt_PlotterDriver)& aPlotterDriver,const Standard_Boolean fWhiteBackground = Standard_True,const Quantity_Factor aScale = 1.0) ;
//! dump the full contents of the view at the same <br>
//! scale in the file <theFile>. The file name <br>
//! extension must be one of ".png",".bmp",".jpg",".gif". <br>
//! Returns FALSE when the dump has failed <br>
Standard_EXPORT Standard_Boolean Dump(const Standard_CString theFile,const Image_TypeOfImage theBufferType = Image_TOI_RGB) ;
//! dump the full contents of the view with a <br>
//! different scale according to the required sheet <br>
//! paper size (format) and the ratio <br>
//! width/height of the view. <br>
//! and returns FALSE when the dump has failed <br>
//! Warning : the file name extension must be one of <br>
//! ".png",".bmp",".jpg",".gif" <br>
//! but make becarefull about the time to dump and <br>
//! resulting file size especially for the A0 format. <br>
//! NOTE that you can use after any standard system utility <br>
//! for editing or sending the image file to a laser printer. <br>
//! (i.e: Microsoft Photo Editor on Windows system <br>
//! or Image Viewer on SUN system) <br>
Standard_EXPORT Standard_Boolean Dump(const Standard_CString theFile,const Aspect_FormatOfSheetPaper theFormat,const Image_TypeOfImage theBufferType = Image_TOI_RGB) ;
//! print the contents of the view to printer with preview. <br>
//! <hPrnDC> : If you have already an PrinterDeviceContext (HDC), <br>
//! then you can pass it to the print routines. <br>
//! If you don't have an PrinterDeviceContext, then this parameter should <br>
//! be NULL. <br>
//! <showDialog> : If hPrnDC == NULL, then you can force the print routines to <br>
//! open a Print Dialog box. <br>
//! If you want to do this, then set showDialog to TRUE <br>
//! If you don't want to see a dialog (only possible, if you have a hPrnDC <br>
//! or the dialog box was opened once before) then set <showDialog> to FALSE. <br>
//! <showBackground> : When set to FALSE then print the view without background color <br>
//! (background is white) <br>
//! else set to TRUE for printing with current background color. <br>
//! <filename>: If != NULL, then the view will be printed to a file. <br>
//! <printAlgorithm>: If you want to select the print algorithm, then you can <br>
//! specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE. <br>
//! Returns Standard_True if the data is passed to the printer, otherwise <br>
//! Standard_False if the print operation failed. This might be related to <br>
//! insufficient memory or some internal errors. All this errors are <br>
//! indicated by the message boxes (on level of OpenGl_GraphicDriver). <br>
//! Warning: This function can reuse FBO assigned to the <br>
//! view on level of OpenGl_GraphicDriver; Please take it into account if <br>
//! you use it for your purposes; <br>
//! Warning: Works only under Windows. <br>
Standard_EXPORT Standard_Boolean Print(const Aspect_Handle hPrnDC = NULL,const Standard_Boolean showDialog = Standard_True,const Standard_Boolean showBackground = Standard_True,const Standard_CString filename = NULL,const Aspect_PrintAlgo printAlgorithm = Aspect_PA_STRETCH) const;
//! dump the full contents of the view <br>
//! to a pixmap of pixel size <theWidth>*<theHeight> and <br>
//! buffer type <theBufferType>. If <theForceCentered> is true <br>
//! view scene will be centered. <br>
Standard_EXPORT Handle_Image_PixMap ToPixMap(const Standard_Integer theWidth,const Standard_Integer theHeight,const Image_TypeOfImage theBufferType = Image_TOI_RGB,const Standard_Boolean theForceCentered = Standard_True) ;
//! Manages projection model <br>
Standard_EXPORT void SetProjModel(const V3d_TypeOfProjectionModel amOdel = V3d_TPM_SCREEN) ;
//! Returns the current projection model <br>
Standard_EXPORT V3d_TypeOfProjectionModel ProjModel() const;
//! Manages display of the back faces <br>
//! When <aModel> is TOBM_AUTOMATIC the object backfaces <br>
//! are displayed only for surface objects and <br>
//! never displayed for solid objects. <br>
//! this was the previous mode. <br>
//! <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces <br>
//! are always displayed both for surfaces or solids. <br>
//! <aModel> is TOBM_NEVER_DISPLAYED the object backfaces <br>
//! are never displayed. <br>
Standard_EXPORT void SetBackFacingModel(const V3d_TypeOfBackfacingModel aModel = V3d_TOBM_AUTOMATIC) ;
//! Returns current state of the back faces display <br>
Standard_EXPORT V3d_TypeOfBackfacingModel BackFacingModel() const;
//! turns on/off opengl depth testing <br>
Standard_EXPORT void EnableDepthTest(const Standard_Boolean enable = Standard_True) const;
//! returns the current state of the depth testing <br>
Standard_EXPORT Standard_Boolean IsDepthTestEnabled() const;
//! turns on/off opengl lighting, currently used in triedron displaying <br>
Standard_EXPORT void EnableGLLight(const Standard_Boolean enable = Standard_True) const;
//! returns the current state of the gl lighting <br>
//! currently used in triedron displaying <br>
Standard_EXPORT Standard_Boolean IsGLLightEnabled() const;
friend //! Activates all of the views of a viewer attached <br>
//! to a window. <br>
Standard_EXPORT void V3d_Viewer::SetViewOn() ;
friend //! Activates a particular view in the Viewer . <br>
//! Must be call if the Window attached to the view <br>
//! has been Deiconified . <br>
Standard_EXPORT void V3d_Viewer::SetViewOn(const Handle(V3d_View)& View) ;
friend //! Deactivates all the views of a Viewer <br>
//! attached to a window. <br>
Standard_EXPORT void V3d_Viewer::SetViewOff() ;
friend //! Deactivates a particular view in the Viewer. <br>
//! Must be call if the Window attached to the view <br>
//! has been Iconified . <br>
Standard_EXPORT void V3d_Viewer::SetViewOff(const Handle(V3d_View)& View) ;
DEFINE_STANDARD_RTTI(V3d_View)
protected:
//! Initialises the view. <br>
Standard_EXPORT V3d_View(const Handle(V3d_Viewer)& VM,const V3d_TypeOfView Type = V3d_ORTHOGRAPHIC);
//! Initialises the view by copying. <br>
Standard_EXPORT V3d_View(const Handle(V3d_Viewer)& VM,const Handle(V3d_View)& V,const V3d_TypeOfView Type = V3d_ORTHOGRAPHIC);
V3d_TypeOfView MyType;
Handle_Visual3d_View MyView;
Visual3d_ViewMapping MyViewMapping;
V3d_TypeOfProjectionModel MyProjModel;
private:
//! Change the scale factor and position of the view <br>
//! such as the bounding box <Umin, Vmin, Umax, Vmax> is contains <br>
//! in the view. <br>
Standard_EXPORT void FitAll(const Handle(Aspect_Window)& aWindow,const V3d_Coordinate Umin,const V3d_Coordinate Vmin,const V3d_Coordinate Umax,const V3d_Coordinate Vmax) ;
//! Determines the screen axes in the reference <br>
//! framework of the view. <br>
Standard_EXPORT static Standard_Boolean ScreenAxis(const Graphic3d_Vector& Vpn,const Graphic3d_Vector& Vup,Graphic3d_Vector& Xaxe,Graphic3d_Vector& Yaxe,Graphic3d_Vector& Zaxe) ;
Standard_EXPORT static void InitMatrix(TColStd_Array2OfReal& Matrix) ;
Standard_EXPORT static Standard_Boolean Multiply(const TColStd_Array2OfReal& Left,const TColStd_Array2OfReal& Right,TColStd_Array2OfReal& Matrix) ;
//! Determines the rotation matrice around an axis <br>
//! for a given angle. <br>
Standard_EXPORT static void RotAxis(const Graphic3d_Vertex& Vrp,const Graphic3d_Vector& Axe,const Quantity_PlaneAngle Angle,TColStd_Array2OfReal& Matrix) ;
//! Transforms the point P according to the matrice Matrix . <br>
Standard_EXPORT static Graphic3d_Vertex TrsPoint(const Graphic3d_Vertex& P,const TColStd_Array2OfReal& Matrix) ;
//! Transforms the vector V according to the matrice Matrix . <br>
Standard_EXPORT static Graphic3d_Vector TrsPoint(const Graphic3d_Vector& V,const TColStd_Array2OfReal& Matrix) ;
//! Returns the objects number and the projection window <br>
//! of the objects contained in the view. <br>
Standard_EXPORT Standard_Integer MinMax(V3d_Coordinate& Umin,V3d_Coordinate& Vmin,V3d_Coordinate& Umax,V3d_Coordinate& Vmax) const;
//! Returns the objects number and the box encompassing <br>
//! the objects contained in the view <br>
Standard_EXPORT Standard_Integer MinMax(V3d_Coordinate& Xmin,V3d_Coordinate& Ymin,V3d_Coordinate& Zmin,V3d_Coordinate& Xmax,V3d_Coordinate& Ymax,V3d_Coordinate& Zmax) const;
//! Returns the Objects number and the gravity center <br>
//! of ALL viewable points in the view <br>
Standard_EXPORT Standard_Integer Gravity(V3d_Coordinate& X,V3d_Coordinate& Y,V3d_Coordinate& Z) const;
Standard_EXPORT void Init() ;
//! Returns a new vertex when the grid is activated. <br>
Standard_EXPORT Graphic3d_Vertex Compute(const Graphic3d_Vertex& AVertex) const;
V3d_ViewerPointer MyViewer;
V3d_ListOfTransient MyActiveLights;
V3d_ListOfTransient MyActivePlanes;
Visual3d_ViewOrientation MyViewOrientation;
Visual3d_ContextView MyViewContext;
Aspect_Background MyBackground;
Aspect_GradientBackground MyGradientBackground;
Graphic3d_Vector MyDefaultViewAxis;
Graphic3d_Vertex MyDefaultViewPoint;
Handle_Aspect_Window MyWindow;
Handle_Graphic3d_Plotter MyPlotter;
TColStd_ListIteratorOfListOfTransient myActiveLightsIterator;
TColStd_ListIteratorOfListOfTransient myActivePlanesIterator;
Standard_Integer sx;
Standard_Integer sy;
Standard_Real rx;
Standard_Real ry;
Standard_Real gx;
Standard_Real gy;
Standard_Real gz;
Standard_Boolean myComputedMode;
Standard_Boolean SwitchSetFront;
Standard_Integer MyZoomAtPointX;
Standard_Integer MyZoomAtPointY;
Handle_Aspect_Grid MyGrid;
gp_Ax3 MyPlane;
Handle_V3d_LayerMgr MyLayerMgr;
TColStd_Array2OfReal MyTrsf;
Handle_Graphic3d_Structure MyGridEchoStructure;
Handle_Graphic3d_Group MyGridEchoGroup;
Standard_Integer MyAnimationFlags;
Standard_Boolean MyTransparencyFlag;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|