2 -- File: Graphic3d_GraphicDriver.cdl
3 -- Created: Mardi 28 janvier 1997
5 -- Modified: 01/08/97 ; PCT : ajout texture mapping
6 -- 07/08/97 ; PCT : ajout texture environnante
7 -- 27/08/97 ; PCT : ajout coordonnee texture
8 -- 00/11/97 ; CAL : retrait de la dependance avec math
9 -- 00/11/97 ; CAL : ajout polyline par 2 points
10 -- 16-09-98 ; BGN : Points d'entree du Triedre (S3819, Phase 1)
11 -- 22-09-98 ; BGN : S3989 (anciennement S3819)
12 -- TypeOfTriedron* from Aspect(et pas Graphic3d)
13 -- 03-11-98 ; CAL : Introduction de Visual3d_LayerManager.
14 -- 07-10-99 : EUG : Degeneration support (G003)
15 -- Add DegenerateStructure() and
16 -- SetBackFacingModel() methods.
17 -- 10-11-99 ; GG : PRO19603 Change Redraw( ) method
18 -- 16-06-2000 : ATS,GG : G005 - method PrimitiveArray, which are interface of OpenGl
19 -- package, and used to initialize internal fields
20 -- of primitives (Convert high level data to internal presentation).
21 -- 17/08/00 ; THA ; Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
22 -- -> Add Print methods (works only under Windows).
23 -- 27/03/02 ; GG ; RIC120302 Add new method Begin(Aspect_Display)
24 -- 28/05/02 ; VSV : New trihedron
25 -- 23/12/02 ; SAV : Added methods to set background image and its
27 -- 20/01/09 ; ABD : Integration support of system fonts (using FTGL and FreeType)
29 -- Copyright: MatraDatavision 1997
32 deferred class GraphicDriver from Graphic3d inherits GraphicDriver from Aspect
36 ---Purpose: This class allows the definition of a graphic driver
37 -- (currently only OpenGl driver is used).
46 SharedLibrary from OSD,
48 Array1OfInteger from TColStd,
49 Array1OfReal from TColStd,
50 Array2OfReal from TColStd,
52 ExtendedString from TCollection,
54 NameOfColor from Quantity,
57 PlaneAngle from Quantity,
59 AlienImage from AlienImage,
61 Array1OfEdge from Aspect,
63 GraphicDriver from Aspect,
64 TypeOfTriedronEcho from Aspect,
65 TypeOfTriedronPosition from Aspect,
68 PrintAlgo from Aspect,
70 AspectLine3d from Graphic3d,
71 AspectMarker3d from Graphic3d,
72 AspectText3d from Graphic3d,
73 AspectFillArea3d from Graphic3d,
74 HorizontalTextAlignment from Graphic3d,
75 CBitFields20 from Graphic3d,
76 CGroup from Graphic3d,
77 CLight from Graphic3d,
79 CPlane from Graphic3d,
80 CStructure from Graphic3d,
82 CRawBufferData from Image,
83 Structure from Graphic3d,
84 TextPath from Graphic3d,
85 TypeOfComposition from Graphic3d,
86 TypeOfPolygon from Graphic3d,
87 TypeOfPrimitive from Graphic3d,
88 Vector from Graphic3d,
89 Array1OfVertex from Graphic3d,
90 Array2OfVertex from Graphic3d,
91 Vertex from Graphic3d,
92 Array1OfVertexC from Graphic3d,
93 Array2OfVertexC from Graphic3d,
94 VertexC from Graphic3d,
95 Array1OfVertexN from Graphic3d,
96 Array2OfVertexN from Graphic3d,
97 VertexN from Graphic3d,
98 Array1OfVertexNC from Graphic3d,
99 Array2OfVertexNC from Graphic3d,
100 VertexNC from Graphic3d,
101 VerticalTextAlignment from Graphic3d,
102 CInitTexture from Graphic3d,
103 TypeOfTexture from Graphic3d,
104 VertexNT from Graphic3d,
105 Array1OfVertexNT from Graphic3d,
106 Array2OfVertexNT from Graphic3d,
107 PrimitiveArray from Graphic3d,
108 PtrFrameBuffer from Graphic3d,
109 HArray1OfByte from TColStd,
110 FillMethod from Aspect,
111 GradientFillMethod from Aspect,
112 ExportFormat from Graphic3d,
113 SortType from Graphic3d,
114 HArray1OfReal from TColStd,
115 CUserDraw from Graphic3d,
116 NListOfHAsciiString from Graphic3d,
118 CGraduatedTrihedron from Graphic3d
122 TransformError from Graphic3d
125 Initialize ( AShrName : CString from Standard )
126 returns mutable GraphicDriver from Graphic3d;
128 ---Purpose: Initialises the Driver
130 -------------------------
131 -- Category: Init methods
132 -------------------------
134 Begin ( me : mutable;
135 ADisplay : CString from Standard )
136 returns Boolean from Standard
138 ---Purpose: call_togl_begin
140 Begin ( me : mutable;
141 ADisplay : Display from Aspect )
142 returns Boolean from Standard
144 ---Purpose: call_togl_begin_display
148 ---Purpose: call_togl_end
150 ----------------------------
151 -- Category: Inquire methods
152 ----------------------------
154 InquireLightLimit ( me : mutable )
155 returns Integer from Standard
157 ---Purpose: call_togl_inquirelight
159 InquireMat ( me : mutable;
160 ACView : CView from Graphic3d;
161 AMatO : out Array2OfReal from TColStd;
162 AMatM : out Array2OfReal from TColStd )
164 ---Purpose: call_togl_inquiremat
166 InquirePlaneLimit ( me : mutable )
167 returns Integer from Standard
169 ---Purpose: call_togl_inquireplane
171 InquireViewLimit ( me : mutable )
172 returns Integer from Standard
174 ---Purpose: call_togl_inquireview
176 InquireTextureAvailable ( me : mutable )
177 returns Boolean from Standard
179 ---Purpose: Returns Standard_True if texture is
180 -- supported by the graphic driver
182 ------------------------------
183 -- Category: Highlight methods
184 ------------------------------
186 Blink ( me : mutable;
187 ACStructure : CStructure from Graphic3d;
188 Create : Boolean from Standard )
190 ---Purpose: call_togl_blink
192 BoundaryBox ( me : mutable;
193 ACStructure : CStructure from Graphic3d;
194 Create : Boolean from Standard )
196 ---Purpose: call_togl_boundarybox
198 HighlightColor ( me : mutable;
199 ACStructure : CStructure from Graphic3d;
200 R : ShortReal from Standard;
201 G : ShortReal from Standard;
202 B : ShortReal from Standard;
203 Create : Boolean from Standard )
205 ---Purpose: call_togl_highlightcolor
207 NameSetStructure ( me : mutable;
208 ACStructure : CStructure from Graphic3d )
210 ---Purpose: call_togl_namesetstructure
212 -------------------------------------
213 -- Category: Group management methods
214 -------------------------------------
216 ClearGroup ( me : mutable;
217 ACGroup : CGroup from Graphic3d )
219 ---Purpose: call_togl_cleargroup
221 CloseGroup ( me : mutable;
222 ACGroup : CGroup from Graphic3d )
224 ---Purpose: call_togl_closegroup
226 FaceContextGroup ( me : mutable;
227 ACGroup : CGroup from Graphic3d;
228 NoInsert : Integer from Standard )
230 ---Purpose: call_togl_facecontextgroup
232 Group ( me : mutable;
233 ACGroup : in out CGroup from Graphic3d )
235 ---Purpose: call_togl_group
237 LineContextGroup ( me : mutable;
238 ACGroup : CGroup from Graphic3d;
239 NoInsert : Integer from Standard )
241 ---Purpose: call_togl_linecontextgroup
243 MarkerContextGroup ( me : mutable;
244 ACGroup : CGroup from Graphic3d;
245 NoInsert : Integer from Standard )
247 ---Purpose: call_togl_markercontextgroup
249 MarkerContextGroup ( me : mutable;
250 ACGroup : CGroup from Graphic3d;
251 NoInsert : Integer from Standard;
252 AMarkWidth : Integer from Standard;
253 AMarkHeight: Integer from Standard;
254 ATexture : HArray1OfByte from TColStd )
256 ---Purpose: call_togl_markercontextgroup
258 OpenGroup ( me : mutable;
259 ACGroup : CGroup from Graphic3d )
261 ---Purpose: call_togl_opengroup
263 RemoveGroup ( me : mutable;
264 ACGroup : CGroup from Graphic3d )
266 ---Purpose: call_togl_removegroup
268 TextContextGroup ( me : mutable;
269 ACGroup : CGroup from Graphic3d;
270 NoInsert : Integer from Standard )
272 ---Purpose: call_togl_textcontextgroup
274 -----------------------------------------
275 -- Category: Structure management methods
276 -----------------------------------------
278 ClearStructure ( me : mutable;
279 ACStructure : CStructure from Graphic3d )
281 ---Purpose: call_togl_clearstructure
283 Connect ( me : mutable;
284 AFather : CStructure from Graphic3d;
285 ASon : CStructure from Graphic3d )
287 ---Purpose: call_togl_connect
289 ContextStructure ( me : mutable;
290 ACStructure : CStructure from Graphic3d )
292 ---Purpose: call_togl_contextstructure
294 Disconnect ( me : mutable;
295 AFather : CStructure from Graphic3d;
296 ASon : CStructure from Graphic3d )
298 ---Purpose: call_togl_disconnect
300 DisplayStructure ( me : mutable;
301 ACView : CView from Graphic3d;
302 ACStructure : CStructure from Graphic3d;
303 APriority : Integer from Standard )
305 ---Purpose: call_togl_displaystructure
307 EraseStructure ( me : mutable;
308 ACView : CView from Graphic3d;
309 ACStructure : CStructure from Graphic3d )
311 ---Purpose: call_togl_erasestructure
313 RemoveStructure ( me : mutable;
314 ACStructure : CStructure from Graphic3d )
316 ---Purpose: call_togl_removestructure
318 Structure ( me : mutable;
319 ACStructure : in out CStructure from Graphic3d )
321 ---Purpose: call_togl_structure
323 ------------------------------------
324 -- Category: Structured mode methods
325 ------------------------------------
327 ActivateView ( me : mutable;
328 ACView : CView from Graphic3d )
330 ---Purpose: call_togl_activateview
332 AntiAliasing ( me : mutable;
333 ACView : CView from Graphic3d;
334 AFlag : Boolean from Standard )
336 ---Purpose: call_togl_antialiasing
338 Background ( me : mutable;
339 ACView : CView from Graphic3d )
341 ---Purpose: call_togl_background
343 GradientBackground ( me : mutable;
344 ACView : CView from Graphic3d;
345 AColor1: Color from Quantity;
346 AColor2: Color from Quantity;
347 FillStyle : GradientFillMethod from Aspect
350 ---Purpose: call_togl_gradient_background
353 BackgroundImage( me : mutable;
354 FileName : CString from Standard;
355 ACView : CView from Graphic3d;
356 FillStyle : FillMethod from Aspect )
359 SetBgImageStyle( me : mutable;
360 ACView : CView from Graphic3d;
361 FillStyle : FillMethod from Aspect )
364 SetBgGradientStyle( me : mutable;
365 ACView : CView from Graphic3d;
366 FillStyle : GradientFillMethod from Aspect )
369 ClipLimit ( me : mutable;
370 ACView : CView from Graphic3d;
371 AWait : Boolean from Standard )
373 ---Purpose: call_togl_cliplimit
375 DeactivateView ( me : mutable;
376 ACView : CView from Graphic3d )
378 ---Purpose: call_togl_deactivateview
380 DepthCueing ( me : mutable;
381 ACView : CView from Graphic3d;
382 AFlag : Boolean from Standard )
384 ---Purpose: call_togl_cliplimit
386 ProjectRaster ( me : mutable;
387 ACView : CView from Graphic3d;
388 AX : ShortReal from Standard;
389 AY : ShortReal from Standard;
390 AZ : ShortReal from Standard;
391 AU : out Integer from Standard;
392 AV : out Integer from Standard )
393 returns Boolean from Standard
395 ---Purpose: call_togl_unproject_raster
397 UnProjectRaster ( me : mutable;
398 ACView : CView from Graphic3d;
399 Axm : Integer from Standard;
400 Aym : Integer from Standard;
401 AXM : Integer from Standard;
402 AYM : Integer from Standard;
403 AU : Integer from Standard;
404 AV : Integer from Standard;
405 AX : out ShortReal from Standard;
406 AY : out ShortReal from Standard;
407 AZ : out ShortReal from Standard )
408 returns Boolean from Standard
410 ---Purpose: call_togl_unproject_raster
412 UnProjectRasterWithRay ( me : mutable;
413 ACView : CView from Graphic3d;
414 Axm : Integer from Standard;
415 Aym : Integer from Standard;
416 AXM : Integer from Standard;
417 AYM : Integer from Standard;
418 AU : Integer from Standard;
419 AV : Integer from Standard;
420 AX : out ShortReal from Standard;
421 AY : out ShortReal from Standard;
422 AZ : out ShortReal from Standard;
423 DX : out ShortReal from Standard;
424 DY : out ShortReal from Standard;
425 DZ : out ShortReal from Standard )
426 returns Boolean from Standard
428 ---Purpose: call_togl_unproject_raster_with_ray
430 RatioWindow ( me : mutable;
431 ACView : CView from Graphic3d )
433 ---Purpose: call_togl_ratio_window
435 Redraw ( me : mutable;
436 ACView : CView from Graphic3d;
437 ACUnderLayer : CLayer2d from Aspect;
438 ACOverLayer : CLayer2d from Aspect;
442 height : Integer = 0 )
444 ---Purpose: call_togl_redraw
445 -- Warning: when the redraw area has a null size, the full view is redrawn
447 RemoveView ( me : mutable;
448 ACView : CView from Graphic3d )
450 ---Purpose: call_togl_removeview
452 SetLight ( me : mutable;
453 ACView : CView from Graphic3d )
455 ---Purpose: call_togl_setlight
457 SetPlane ( me : mutable;
458 ACView : CView from Graphic3d )
460 ---Purpose: call_togl_setplane
462 SetVisualisation ( me : mutable;
463 ACView : CView from Graphic3d )
465 ---Purpose: call_togl_setvisualisation
467 TransformStructure ( me : mutable;
468 ACStructure : CStructure from Graphic3d )
470 ---Purpose: call_togl_transformstructure
472 DegenerateStructure ( me : mutable;
473 ACStructure : CStructure from Graphic3d )
475 ---Purpose: call_togl_degeneratestructure
477 Transparency ( me : mutable;
478 ACView : CView from Graphic3d;
479 AFlag : Boolean from Standard )
481 ---Purpose: call_togl_transparency
483 Update ( me : mutable;
484 ACView : CView from Graphic3d;
485 ACUnderLayer : CLayer2d from Aspect;
486 ACOverLayer : CLayer2d from Aspect )
488 ---Purpose: call_togl_update
491 ACView : in out CView from Graphic3d )
492 returns Boolean from Standard
494 ---Purpose: call_togl_view
496 ViewMapping ( me : mutable;
497 ACView : CView from Graphic3d;
498 AWait : Boolean from Standard )
500 ---Purpose: call_togl_viewmapping
502 ViewOrientation ( me : mutable;
503 ACView : CView from Graphic3d;
504 AWait : Boolean from Standard )
506 ---Purpose: call_togl_vieworientation
508 Environment ( me : mutable;
509 ACView : CView from Graphic3d )
513 ----------------------------------------
514 -- Category: Methods to create Marker
515 -- for Purpose : see Graphic3d_Group.cdl
516 ----------------------------------------
518 Marker ( me : mutable;
519 ACGroup : CGroup from Graphic3d;
520 APoint : Vertex from Graphic3d;
521 EvalMinMax : Boolean from Standard = Standard_True )
524 MarkerSet ( me : mutable;
525 ACGroup : CGroup from Graphic3d;
526 ListVertex : Array1OfVertex from Graphic3d;
527 EvalMinMax : Boolean from Standard = Standard_True )
530 ----------------------------------------
531 -- Category: Methods to create Polygon
532 -- for Purpose : see Graphic3d_Group.cdl
533 ----------------------------------------
535 Polygon ( me : mutable;
536 ACGroup : CGroup from Graphic3d;
537 ListVertex : Array1OfVertex from Graphic3d;
538 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
539 EvalMinMax : Boolean from Standard = Standard_True )
541 ---Purpose: call_togl_polygon
543 Polygon ( me : mutable;
544 ACGroup : CGroup from Graphic3d;
545 ListVertex : Array1OfVertex from Graphic3d;
546 Normal : Vector from Graphic3d;
547 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
548 EvalMinMax : Boolean from Standard = Standard_True )
550 ---Purpose: call_togl_polygon
552 Polygon ( me : mutable;
553 ACGroup : CGroup from Graphic3d;
554 ListVertex : Array1OfVertexN from Graphic3d;
555 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
556 EvalMinMax : Boolean from Standard = Standard_True )
558 ---Purpose: call_togl_polygon
560 Polygon ( me : mutable;
561 ACGroup : CGroup from Graphic3d;
562 ListVertex : Array1OfVertexN from Graphic3d;
563 Normal : Vector from Graphic3d;
564 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
565 EvalMinMax : Boolean from Standard = Standard_True )
567 ---Purpose: call_togl_polygon
569 Polygon ( me : mutable;
570 ACGroup : CGroup from Graphic3d;
571 ListVertex : Array1OfVertexNT from Graphic3d;
572 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
573 EvalMinMax : Boolean from Standard = Standard_True )
575 ---Purpose: call_togl_polygon
577 PolygonHoles ( me : mutable;
578 ACGroup : CGroup from Graphic3d;
579 Bounds : Array1OfInteger from TColStd;
580 ListVertex : Array1OfVertex from Graphic3d;
581 EvalMinMax : Boolean from Standard = Standard_True )
583 ---Purpose: call_togl_polygon_holes
585 PolygonHoles ( me : mutable;
586 ACGroup : CGroup from Graphic3d;
587 Bounds : Array1OfInteger from TColStd;
588 ListVertex : Array1OfVertex from Graphic3d;
589 Normal : Vector from Graphic3d;
590 EvalMinMax : Boolean from Standard = Standard_True )
592 ---Purpose: call_togl_polygon_holes
594 PolygonHoles ( me : mutable;
595 ACGroup : CGroup from Graphic3d;
596 Bounds : Array1OfInteger from TColStd;
597 ListVertex : Array1OfVertexN from Graphic3d;
598 EvalMinMax : Boolean from Standard = Standard_True )
600 ---Purpose: call_togl_polygon_holes
602 PolygonHoles ( me : mutable;
603 ACGroup : CGroup from Graphic3d;
604 Bounds : Array1OfInteger from TColStd;
605 ListVertex : Array1OfVertexN from Graphic3d;
606 Normal : Vector from Graphic3d;
607 EvalMinMax : Boolean from Standard = Standard_True )
609 ---Purpose: call_togl_polygon_holes
611 ----------------------------------------
612 -- Category: Methods to create Polyline
613 -- for Purpose : see Graphic3d_Group.cdl
614 ----------------------------------------
616 Polyline ( me : mutable;
617 ACGroup : CGroup from Graphic3d;
618 X1, Y1, Z1, X2, Y2, Z2 : Real from Standard;
619 EvalMinMax : Boolean from Standard = Standard_True )
621 ---Purpose: call_togl_polyline
623 Polyline ( me : mutable;
624 ACGroup : CGroup from Graphic3d;
625 ListVertex : Array1OfVertex from Graphic3d;
626 EvalMinMax : Boolean from Standard = Standard_True )
628 ---Purpose: call_togl_polyline
630 Polyline ( me : mutable;
631 ACGroup : CGroup from Graphic3d;
632 ListVertex : Array1OfVertexC from Graphic3d;
633 EvalMinMax : Boolean from Standard = Standard_True )
635 ---Purpose: call_togl_polyline
637 -----------------------------------------
638 -- Category: Methods to create Quadrangle
639 -- for Purpose : see Graphic3d_Group.cdl
640 -----------------------------------------
642 QuadrangleMesh ( me : mutable;
643 ACGroup : CGroup from Graphic3d;
644 ListVertex : Array2OfVertex from Graphic3d;
645 EvalMinMax : Boolean from Standard = Standard_True )
647 ---Purpose: call_togl_quadrangle
649 QuadrangleMesh ( me : mutable;
650 ACGroup : CGroup from Graphic3d;
651 ListVertex : Array2OfVertexN from Graphic3d;
652 EvalMinMax : Boolean from Standard = Standard_True )
654 ---Purpose: call_togl_quadrangle
656 QuadrangleMesh ( me : mutable;
657 ACGroup : CGroup from Graphic3d;
658 ListVertex : Array2OfVertexNT from Graphic3d;
659 EvalMinMax : Boolean from Standard = Standard_True )
661 ---Purpose: call_togl_quadrangle
663 ----------------------------------------
664 -- Category: Methods to create Text
665 -- for Purpose : see Graphic3d_Group.cdl
666 ----------------------------------------
669 ACGroup : CGroup from Graphic3d;
670 AText : CString from Standard;
671 APoint : Vertex from Graphic3d;
672 AHeight : Real from Standard;
673 AAngle : PlaneAngle from Quantity;
674 ATp : TextPath from Graphic3d;
675 AHta : HorizontalTextAlignment from Graphic3d;
676 AVta : VerticalTextAlignment from Graphic3d;
677 EvalMinMax : Boolean from Standard = Standard_True )
679 ---Purpose: call_togl_text
682 ACGroup : CGroup from Graphic3d;
683 AText : CString from Standard;
684 APoint : Vertex from Graphic3d;
685 AHeight : Real from Standard;
686 EvalMinMax : Boolean from Standard = Standard_True )
688 ---Purpose: call_togl_text
691 ACGroup : CGroup from Graphic3d;
692 AText : ExtendedString from TCollection;
693 APoint : Vertex from Graphic3d;
694 AHeight : Real from Standard;
695 AAngle : PlaneAngle from Quantity;
696 ATp : TextPath from Graphic3d;
697 AHta : HorizontalTextAlignment from Graphic3d;
698 AVta : VerticalTextAlignment from Graphic3d;
699 EvalMinMax : Boolean from Standard = Standard_True )
701 ---Purpose: call_togl_text
704 ACGroup : CGroup from Graphic3d;
705 AText : ExtendedString from TCollection;
706 APoint : Vertex from Graphic3d;
707 AHeight : Real from Standard;
708 EvalMinMax : Boolean from Standard = Standard_True )
710 ---Purpose: call_togl_text
712 ----------------------------------------
713 ---Category: Methods to create Triangle
714 -- for Purpose : see Graphic3d_Group.cdl
715 ----------------------------------------
717 TriangleMesh ( me : mutable;
718 ACGroup : CGroup from Graphic3d;
719 ListVertex : Array1OfVertex from Graphic3d;
720 EvalMinMax : Boolean from Standard = Standard_True )
722 ---Purpose: call_togl_triangle
724 TriangleMesh ( me : mutable;
725 ACGroup : CGroup from Graphic3d;
726 ListVertex : Array1OfVertexN from Graphic3d;
727 EvalMinMax : Boolean from Standard = Standard_True )
729 ---Purpose: call_togl_triangle
731 TriangleMesh ( me : mutable;
732 ACGroup : CGroup from Graphic3d;
733 ListVertex : Array1OfVertexNT from Graphic3d;
734 EvalMinMax : Boolean from Standard = Standard_True )
736 ---Purpose: call_togl_triangle
738 TriangleSet ( me : mutable;
739 ACGroup : CGroup from Graphic3d;
740 ListVertex : Array1OfVertex from Graphic3d;
741 ListEdge : Array1OfEdge from Aspect;
742 EvalMinMax : Boolean from Standard = Standard_True )
744 ---Purpose: call_togl_polygon_indices
746 TriangleSet ( me : mutable;
747 ACGroup : CGroup from Graphic3d;
748 ListVertex : Array1OfVertexN from Graphic3d;
749 ListEdge : Array1OfEdge from Aspect;
750 EvalMinMax : Boolean from Standard = Standard_True )
752 ---Purpose: call_togl_polygon_indices
754 TriangleSet ( me : mutable;
755 ACGroup : CGroup from Graphic3d;
756 ListVertex : Array1OfVertexNT from Graphic3d;
757 ListEdge : Array1OfEdge from Aspect;
758 EvalMinMax : Boolean from Standard = Standard_True )
760 ---Purpose: call_togl_polygon_indices
762 TriangleSet ( me : mutable;
763 ACGroup : CGroup from Graphic3d;
764 ListVertex : Array1OfVertexC from Graphic3d;
765 ListEdge : Array1OfEdge from Aspect;
766 EvalMinMax : Boolean from Standard = Standard_True )
768 ---Purpose: call_togl_polygon_indices
770 TriangleSet ( me : mutable;
771 ACGroup : CGroup from Graphic3d;
772 ListVertex : Array1OfVertexNC from Graphic3d;
773 ListEdge : Array1OfEdge from Aspect;
774 EvalMinMax : Boolean from Standard = Standard_True )
776 ---Purpose: call_togl_polygon_indices
778 PrimitiveArray( me : mutable;
779 ACGroup : CGroup from Graphic3d;
780 parray : PrimitiveArray from Graphic3d;
781 EvalMinMax : Boolean from Standard = Standard_True )
783 ---Purpose: call_togl_parray
785 UserDraw( me : mutable;
786 ACGroup : CGroup from Graphic3d;
787 AUserDraw : CUserDraw from Graphic3d )
789 ---Purpose: call_togl_userdraw
791 EnableVBO( me : mutable;
792 status : Boolean from Standard )
794 ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
796 ----------------------------------------
797 ---Category: Methods to create Triedron
798 -- for Purpose : see Graphic3d_Group.cdl
799 ----------------------------------------
801 ZBufferTriedronSetup ( me : mutable;
802 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
803 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
804 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
805 SizeRatio : Real from Standard = 0.8;
806 AxisDiametr : Real from Standard = 0.05;
807 NbFacettes : Integer from Standard = 12)
809 ---Purpose: call_togl_ztriedron_setup
811 TriedronDisplay ( me : mutable;
812 ACView : CView from Graphic3d;
813 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
814 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
815 AScale : Real from Standard = 0.02;
816 AsWireframe : Boolean from Standard = Standard_True )
818 ---Purpose: call_togl_triedron_display
821 TriedronErase ( me : mutable;
822 ACView : CView from Graphic3d)
824 ---Purpose: call_togl_triedron_erase
827 TriedronEcho ( me : mutable;
828 ACView : CView from Graphic3d;
829 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
831 ---Purpose: call_togl_triedron_echo
833 ---------------------------------
834 ---Category: Graduated trihedron
835 ---------------------------------
837 GraduatedTrihedronDisplay(me : mutable;
838 view : CView from Graphic3d;
839 cubic : CGraduatedTrihedron from Graphic3d)
840 ---Purpose: call_togl_graduatedtrihedron_display
843 GraduatedTrihedronErase(me : mutable;
844 view : CView from Graphic3d)
845 ---Purpose: call_togl_graduatedtrihedron_erase
848 GraduatedTrihedronMinMaxValues(me : mutable;
849 xmin : ShortReal from Standard;
850 ymin : ShortReal from Standard;
851 zmin : ShortReal from Standard;
852 xmax : ShortReal from Standard;
853 ymax : ShortReal from Standard;
854 zmax : ShortReal from Standard)
855 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
858 ---------------------------
859 -- Category: Animation mode
860 ---------------------------
862 BeginAnimation ( me : mutable;
863 ACView : CView from Graphic3d)
865 ---Purpose: call_togl_begin_animation
867 EndAnimation ( me : mutable;
868 ACView : CView from Graphic3d)
870 ---Purpose: call_togl_end_animation
872 ----------------------------------
873 -- Category: Ajout mode methods
874 ----------------------------------
876 BeginAddMode ( me : mutable;
877 ACView : CView from Graphic3d)
878 returns Boolean from Standard
880 ---Purpose: call_togl_begin_ajout_mode
882 EndAddMode ( me : mutable)
884 ---Purpose: call_togl_end_ajout_mode
886 ----------------------------------
887 -- Category: Immediat mode methods
888 ----------------------------------
890 BeginImmediatMode ( me : mutable;
891 ACView : CView from Graphic3d;
892 ACUnderLayer : CLayer2d from Aspect;
893 ACOverLayer : CLayer2d from Aspect;
894 DoubleBuffer : Boolean from Standard;
895 RetainMode : Boolean from Standard)
896 returns Boolean from Standard
898 ---Purpose: call_togl_begin_immediat_mode
900 BeginPolyline ( me : mutable )
902 ---Purpose: call_togl_begin_polyline
904 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
905 aFlush : Boolean from Standard = Standard_True)
907 ---Purpose: call_togl_clear_immediat_mode
910 X : ShortReal from Standard;
911 Y : ShortReal from Standard;
912 Z : ShortReal from Standard )
914 ---Purpose: call_togl_draw
916 DrawStructure ( me : mutable;
917 ACStructure : CStructure from Graphic3d )
919 ---Purpose: call_togl_draw_structure
921 EndImmediatMode ( me : mutable;
922 Synchronize : Integer from Standard )
924 ---Purpose: call_togl_end_immediat_mode
926 EndPolyline ( me : mutable )
928 ---Purpose: call_togl_end_polyline
931 X : ShortReal from Standard;
932 Y : ShortReal from Standard;
933 Z : ShortReal from Standard )
935 ---Purpose: call_togl_move
937 SetLineColor ( me : mutable;
938 R : ShortReal from Standard;
939 G : ShortReal from Standard;
940 B : ShortReal from Standard )
942 ---Purpose: call_togl_set_linecolor
944 SetLineType ( me : mutable;
945 Type : Integer from Standard )
947 ---Purpose: call_togl_set_linetype
949 SetLineWidth ( me : mutable;
950 Width : ShortReal from Standard )
952 ---Purpose: call_togl_set_linewidth
954 SetMinMax ( me : mutable;
955 X1 : ShortReal from Standard;
956 Y1 : ShortReal from Standard;
957 Z1 : ShortReal from Standard;
958 X2 : ShortReal from Standard;
959 Y2 : ShortReal from Standard;
960 Z2 : ShortReal from Standard )
962 ---Purpose: call_togl_set_minmax
964 Transform ( me : mutable;
965 AMatrix : Array2OfReal from TColStd;
966 AType : TypeOfComposition from Graphic3d )
968 ---Purpose: call_togl_transform
970 -----------------------------
971 -- Category: Textures methods
972 -----------------------------
975 Type : TypeOfTexture from Graphic3d;
976 Image : AlienImage from AlienImage;
977 FileName : CString from Standard;
978 TexUpperBounds : HArray1OfReal from TColStd )
979 returns Integer from Standard
984 TexId : Integer from Standard )
989 TexId : Integer from Standard;
990 AValue : CInitTexture from Graphic3d )
994 -------------------------------
995 -- Category: Layer mode methods
996 -------------------------------
998 Layer ( me : mutable;
999 ACLayer : in out CLayer2d from Aspect )
1001 ---Purpose: call_togl_layer2d
1003 RemoveLayer ( me : mutable;
1004 ACLayer : CLayer2d from Aspect )
1006 ---Purpose: call_togl_removelayer2d
1008 BeginLayer ( me : mutable;
1009 ACLayer : CLayer2d from Aspect )
1011 ---Purpose: call_togl_begin_layer2d
1013 BeginPolygon2d ( me : mutable )
1015 ---Purpose: call_togl_begin_polygon2d
1017 BeginPolyline2d ( me : mutable )
1019 ---Purpose: call_togl_begin_polyline2d
1021 ClearLayer ( me : mutable;
1022 ACLayer : CLayer2d from Aspect )
1024 ---Purpose: call_togl_clear_layer2d
1026 Draw ( me : mutable;
1027 X : ShortReal from Standard;
1028 Y : ShortReal from Standard )
1030 ---Purpose: call_togl_draw2d
1032 Edge ( me : mutable;
1033 X : ShortReal from Standard;
1034 Y : ShortReal from Standard )
1036 ---Purpose: call_togl_edge2d
1038 EndLayer ( me : mutable )
1040 ---Purpose: call_togl_end_layer2d
1042 EndPolygon2d ( me : mutable )
1044 ---Purpose: call_togl_end_polygon2d
1046 EndPolyline2d ( me : mutable )
1048 ---Purpose: call_togl_end_polyline2d
1050 Move ( me : mutable;
1051 X : ShortReal from Standard;
1052 Y : ShortReal from Standard )
1054 ---Purpose: call_togl_move2d
1056 Rectangle ( me : mutable;
1057 X, Y : ShortReal from Standard;
1058 Width, Height : ShortReal from Standard )
1060 ---Purpose: call_togl_rectangle2d
1062 SetColor ( me : mutable;
1063 R : ShortReal from Standard;
1064 G : ShortReal from Standard;
1065 B : ShortReal from Standard )
1067 ---Purpose: call_togl_set_color
1069 SetTransparency ( me : mutable;
1070 ATransparency : ShortReal from Standard )
1072 ---Purpose: call_togl_set_transparency
1074 UnsetTransparency ( me : mutable )
1076 ---Purpose: call_togl_unset_transparency
1078 SetLineAttributes ( me : mutable;
1079 Type : Integer from Standard;
1080 Width : ShortReal from Standard )
1082 ---Purpose: call_togl_set_line_attributes
1085 SetTextAttributes ( me : mutable;
1086 Font : CString from Standard;
1087 Type : Integer from Standard;
1088 R : ShortReal from Standard;
1089 G : ShortReal from Standard;
1090 B : ShortReal from Standard )
1092 ---Purpose: call_togl_set_text_attributes
1094 Text ( me : mutable;
1095 AText : CString from Standard;
1096 X, Y : ShortReal from Standard;
1097 AHeight : ShortReal from Standard )
1099 ---Purpose: call_togl_text2d
1100 -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
1102 DefaultTextHeight( me )
1103 returns ShortReal from Standard
1108 AText : CString from Standard;
1109 AHeight : ShortReal from Standard;
1110 AWidth : in out ShortReal from Standard;
1111 AnAscent : in out ShortReal from Standard;
1112 ADescent : in out ShortReal from Standard )
1114 ---Purpose: call_togl_textsize2d
1116 SetBackFacingModel ( me : mutable;
1117 aView : CView from Graphic3d )
1119 ---Purpose: call_togl_backfacing
1121 SetDepthTestEnabled( me; view : CView from Graphic3d;
1122 isEnabled : Boolean from Standard )
1124 ---Purpose: call_togl_depthtest
1126 IsDepthTestEnabled( me; view : CView from Graphic3d )
1127 returns Boolean from Standard is deferred;
1128 ---Purpose: call_togl_isdepthtest
1131 view : CView from Graphic3d;
1133 width, height : Integer;
1136 ---Purpose: Reads depths of shown pixels of the given
1137 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
1139 FBOCreate( me : mutable;
1140 view : CView from Graphic3d;
1141 width, height : Integer from Standard )
1142 returns PtrFrameBuffer from Graphic3d
1144 ---Purpose: Generate offscreen FBO in the graphic library.
1145 -- If not supported on hardware returns NULL.
1147 FBORelease( me : mutable;
1148 view : CView from Graphic3d;
1149 fboPtr : in out PtrFrameBuffer from Graphic3d )
1151 ---Purpose: Remove offscreen FBO from the graphic library
1153 FBOGetDimensions( me : mutable;
1154 view : CView from Graphic3d;
1155 fboPtr : PtrFrameBuffer from Graphic3d;
1156 width, height : out Integer from Standard;
1157 widthMax, heightMax : out Integer from Standard )
1159 ---Purpose: Read offscreen FBO configuration.
1161 FBOChangeViewport( me : mutable;
1162 view : CView from Graphic3d;
1163 fboPtr : in out PtrFrameBuffer from Graphic3d;
1164 width, height : Integer from Standard )
1166 ---Purpose: Change offscreen FBO viewport.
1168 BufferDump( me : mutable;
1169 view : CView from Graphic3d;
1170 buffer : in out CRawBufferData from Image )
1171 returns Boolean from Standard
1173 ---Purpose: Dump active rendering buffer into specified memory buffer.
1175 SetGLLightEnabled( me; view : CView from Graphic3d;
1176 isEnabled : Boolean from Standard )
1178 ---Purpose: call_togl_gllight
1180 IsGLLightEnabled( me; view : CView from Graphic3d )
1181 returns Boolean from Standard is deferred;
1182 ---Purpose: call_togl_isgllight
1185 ACView : CView from Graphic3d;
1186 ACUnderLayer : CLayer2d from Aspect;
1187 ACOverLayer : CLayer2d from Aspect;
1188 hPrnDC : Handle from Aspect;
1189 showBackground : Boolean;
1191 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH;
1192 theScaleFactor : Real from Standard = 1.0 )
1193 returns Boolean from Standard is deferred;
1195 ---Purpose: print the contents of all layers of the view to the printer.
1196 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
1197 -- <showBackground> : When set to FALSE then print the view without background color
1198 -- (background is white)
1199 -- else set to TRUE for printing with current background color.
1200 -- <filename>: If != NULL, then the view will be printed to a file.
1201 -- <printAlgorithm>: Select print algorithm: stretch, tile.
1202 -- <theScaleFactor>: Scaling coefficient, used internally to scale the
1203 -- printings accordingly to the scale factor selected in the printer
1204 -- properties dialog.
1205 -- Returns Standard_True if the data is passed to the printer, otherwise
1206 -- Standard_False if the print operation failed due to the printer errors,
1207 -- or insufficient system memory available.
1208 ---Warning: Works only under Windows.
1210 Export( me: mutable;
1211 theFileName : CString from Standard;
1212 theFormat : ExportFormat from Graphic3d;
1213 theSortType : SortType from Graphic3d;
1214 theWidth, theHeight : Integer from Standard;
1215 theView : CView from Graphic3d;
1216 theLayerUnder : CLayer2d from Aspect;
1217 theLayerOver : CLayer2d from Aspect;
1218 thePrecision : Real from Standard = 0.005;
1219 theProgressBarFunc : Address from Standard = NULL;
1220 theProgressObject : Address from Standard = NULL )
1221 returns Boolean from Standard
1224 -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
1225 -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
1226 -- Notice however that results may differ a lot and do not contain some elements.
1228 RemovePrimitiveArray( me : mutable;
1229 theCGroup : CGroup from Graphic3d;
1230 thePArray : PrimitiveArray from Graphic3d )
1232 ---Purpose: Clear visualization data in graphical driver and
1233 -- stop displaying the primitives array of the graphical group
1234 -- <theCGroup>. This method is internal and should be used
1235 -- by Graphic3d_Group only.
1237 AddZLayer( me : mutable;
1238 theCView : CView from Graphic3d;
1239 theLayerId : Integer from Standard )
1241 ---Purpose: Add a new top-level z layer with ID <theLayerId> for
1242 -- the view. Z layers allow drawing structures in higher layers
1243 -- in foreground of structures in lower layers. To add a structure
1244 -- to desired layer on display it is necessary to set the layer
1245 -- ID for the structure.
1247 RemoveZLayer( me : mutable;
1248 theCView : CView from Graphic3d;
1249 theLayerId : Integer from Standard )
1251 ---Purpose: Remove Z layer from the specified view. All structures
1252 -- displayed at the moment in layer will be displayed in default layer
1253 -- ( the bottom-level z layer ). To unset layer ID from associated
1254 -- structures use method UnsetZLayer (...).
1256 UnsetZLayer( me : mutable;
1257 theLayerId : Integer from Standard )
1259 ---Purpose: Unset Z layer ID for all structures. The structure
1260 -- indexes will be set to default layer ( the bottom-level z layer
1263 ChangeZLayer( me : mutable;
1264 theCStructure : CStructure from Graphic3d;
1265 theLayerId : Integer from Standard )
1267 ---Purpose: Change Z layer of a structure. The new z layer ID will
1268 -- be used to define the associated layer for structure on display.
1270 ChangeZLayer( me : mutable;
1271 theCStructure : CStructure from Graphic3d;
1272 theCView : CView from Graphic3d;
1273 theNewLayerId : Integer from Standard )
1275 ---Purpose: Change Z layer of a structure already presented in view.
1278 theCStructure : CStructure from Graphic3d )
1279 returns Integer from Standard is deferred;
1280 ---Purpose: Get Z layer ID of structure. If the structure doesn't
1281 -- exists in graphic driver, the method returns -1.
1283 --------------------------
1284 -- Category: Class methods
1285 --------------------------
1288 ACLight : CLight from Graphic3d;
1289 Update : Boolean from Standard )
1290 returns Integer from Standard;
1291 ---Purpose: call_togl_light
1294 ACPlane : CPlane from Graphic3d;
1295 Update : Boolean from Standard )
1296 returns Integer from Standard;
1297 ---Purpose: call_togl_plane
1299 -----------------------------
1300 -- Category: Internal methods
1301 -----------------------------
1304 AComment : CString from Standard;
1305 AValue : Boolean from Standard );
1308 ACGroup : CGroup from Graphic3d;
1309 AField : Integer from Standard );
1312 ACLight : CLight from Graphic3d;
1313 AField : Integer from Standard );
1316 ACPick : CPick from Graphic3d;
1317 AField : Integer from Standard );
1320 ACPlane : CPlane from Graphic3d;
1321 AField : Integer from Standard );
1323 PrintCStructure ( me;
1324 ACStructure : CStructure from Graphic3d;
1325 AField : Integer from Standard );
1328 ACView : CView from Graphic3d;
1329 AField : Integer from Standard );
1332 AFunc : CString from Standard );
1335 AComment : CString from Standard;
1336 AValue : Integer from Standard );
1339 AFunc : CString from Standard;
1340 AResult : Integer from Standard );
1342 PrintShortReal ( me;
1343 AComment : CString from Standard;
1344 AValue : ShortReal from Standard );
1347 AComment : CString from Standard;
1348 AMatrix : Array2OfReal from TColStd )
1349 raises TransformError from Graphic3d;
1352 AComment : CString from Standard;
1353 AString : CString from Standard );
1355 SetTrace ( me : mutable;
1356 ALevel : Integer from Standard )
1360 returns Integer from Standard
1363 --ListOfAvalableFontNames( me;
1364 -- lst: out NListOfHAsciiString from Graphic3d )
1365 -- returns Boolean from Standard
1367 -- Purpose: Initialize list of names of avalable system fonts
1368 -- returns Standard_False if fails
1369 -- ABD Integration support of system fonts (using FTGL and FreeType)
1373 MyTraceLevel : Integer from Standard is protected;
1374 MySharedLibrary : SharedLibrary from OSD is protected;
1376 end GraphicDriver from Graphic3d;