2 -- File: OpenGl_GraphicDriver.cdl
3 -- Created: Mardi 28 janvier 1997
6 -- 07-10-99 : EUG : Degeneration support (G003)
7 -- Add DegenerateStructure() and
8 -- SetBackFacingModel() methods.
9 -- 16-06-2000 : ATS,SPK : G005 : PARRAY method
10 -- 17/08/00 ; THA ; Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
11 -- -> Add Print methods (works only under Windows).
12 -- 27/03/02 ; GG ; RIC120302 Add new method Begin(Aspect_Display)
13 -- 23/12/02 ; SAV Added methods to set background image
14 -- 20/01/09 ; ABD : Integration support of system fonts (using FTGL and FreeType)
17 ---Copyright: MatraDatavision 1997
20 class GraphicDriver from OpenGl inherits GraphicDriver from Graphic3d
24 ---Purpose: This class allows the definition of an opengl graphic
34 Array1OfInteger from TColStd,
35 Array1OfReal from TColStd,
36 Array2OfReal from TColStd,
38 ExtendedString from TCollection,
40 NameOfColor from Quantity,
42 PlaneAngle from Quantity,
44 AlienImage from AlienImage,
46 Array1OfEdge from Aspect,
48 TypeOfTriedronEcho from Aspect,
49 TypeOfTriedronPosition from Aspect,
52 PrintAlgo from Aspect,
54 AspectLine3d from Graphic3d,
55 AspectMarker3d from Graphic3d,
56 AspectText3d from Graphic3d,
57 AspectFillArea3d from Graphic3d,
58 HorizontalTextAlignment from Graphic3d,
59 CBitFields20 from Graphic3d,
60 CGroup from Graphic3d,
62 CStructure from Graphic3d,
64 CRawBufferData from Image,
65 Structure from Graphic3d,
66 TextPath from Graphic3d,
67 TypeOfComposition from Graphic3d,
68 TypeOfPolygon from Graphic3d,
69 TypeOfPrimitive from Graphic3d,
70 Vector from Graphic3d,
71 Array1OfVertex from Graphic3d,
72 Array2OfVertex from Graphic3d,
73 Vertex from Graphic3d,
74 Array1OfVertexC from Graphic3d,
75 Array2OfVertexC from Graphic3d,
76 VertexC from Graphic3d,
77 Array1OfVertexN from Graphic3d,
78 Array2OfVertexN from Graphic3d,
79 VertexN from Graphic3d,
80 Array1OfVertexNC from Graphic3d,
81 Array2OfVertexNC from Graphic3d,
82 VertexNC from Graphic3d,
83 VerticalTextAlignment from Graphic3d,
84 CInitTexture from Graphic3d,
85 TypeOfTexture from Graphic3d,
86 VertexNT from Graphic3d,
87 Array1OfVertexNT from Graphic3d,
88 Array2OfVertexNT from Graphic3d,
89 PrimitiveArray from Graphic3d,
90 PtrFrameBuffer from Graphic3d,
91 FillMethod from Aspect,
92 GradientFillMethod from Aspect,
93 HArray1OfByte from TColStd,
94 ExportFormat from Graphic3d,
95 SortType from Graphic3d,
96 HArray1OfReal from TColStd,
97 CUserDraw from Graphic3d,
98 NListOfHAsciiString from Graphic3d,
100 CGraduatedTrihedron from Graphic3d
103 Create ( AShrName : CString from Standard )
104 returns mutable GraphicDriver from OpenGl;
106 -------------------------
107 -- Category: Init methods
108 -------------------------
109 DefaultTextHeight( me )
110 returns ShortReal from Standard
113 Begin ( me : mutable;
114 ADisplay : CString from Standard )
115 returns Boolean from Standard
117 ---Purpose: call_togl_begin
119 Begin ( me : mutable;
120 ADisplay : Display from Aspect )
121 returns Boolean from Standard
123 ---Purpose: call_togl_begin_display
127 ---Purpose: call_togl_end
129 ----------------------------
130 -- Category: Inquire methods
131 ----------------------------
133 InquireLightLimit ( me : mutable )
134 returns Integer from Standard
136 ---Purpose: call_togl_inquirelight
138 InquireMat ( me : mutable;
139 ACView : CView from Graphic3d;
140 AMatO : out Array2OfReal from TColStd;
141 AMatM : out Array2OfReal from TColStd )
143 ---Purpose: call_togl_inquiremat
145 InquirePlaneLimit ( me : mutable )
146 returns Integer from Standard
148 ---Purpose: call_togl_inquireplane
150 InquireViewLimit ( me : mutable )
151 returns Integer from Standard
153 ---Purpose: call_togl_inquireview
155 InquireTextureAvailable ( me : mutable )
156 returns Boolean from Standard
158 ---Purpose: Returns Standard_True if texture is
159 -- supported by the graphic driver
161 ------------------------------
162 -- Category: Highlight methods
163 ------------------------------
165 Blink ( me : mutable;
166 ACStructure : CStructure from Graphic3d;
167 Create : Boolean from Standard )
169 ---Purpose: call_togl_blink
171 BoundaryBox ( me : mutable;
172 ACStructure : CStructure from Graphic3d;
173 Create : Boolean from Standard )
175 ---Purpose: call_togl_boundarybox
177 HighlightColor ( me : mutable;
178 ACStructure : CStructure from Graphic3d;
179 R : ShortReal from Standard;
180 G : ShortReal from Standard;
181 B : ShortReal from Standard;
182 Create : Boolean from Standard )
184 ---Purpose: call_togl_highlightcolor
186 NameSetStructure ( me : mutable;
187 ACStructure : CStructure from Graphic3d )
189 ---Purpose: call_togl_namesetstructure
191 -------------------------------------
192 -- Category: Group management methods
193 -------------------------------------
195 ClearGroup ( me : mutable;
196 ACGroup : CGroup from Graphic3d )
198 ---Purpose: call_togl_cleargroup
200 CloseGroup ( me : mutable;
201 ACGroup : CGroup from Graphic3d )
203 ---Purpose: call_togl_closegroup
205 FaceContextGroup ( me : mutable;
206 ACGroup : CGroup from Graphic3d;
207 NoInsert : Integer from Standard )
209 ---Purpose: call_togl_facecontextgroup
211 Group ( me : mutable;
212 ACGroup : in out CGroup from Graphic3d )
214 ---Purpose: call_togl_group
216 LineContextGroup ( me : mutable;
217 ACGroup : CGroup from Graphic3d;
218 NoInsert : Integer from Standard )
220 ---Purpose: call_togl_linecontextgroup
222 MarkerContextGroup ( me : mutable;
223 ACGroup : CGroup from Graphic3d;
224 NoInsert : Integer from Standard )
226 ---Purpose: call_togl_markercontextgroup
228 MarkerContextGroup ( me : mutable;
229 ACGroup : CGroup from Graphic3d;
230 NoInsert : Integer from Standard;
231 AMarkWidth : Integer from Standard;
232 AMarkHeight : Integer from Standard;
233 ATexture : HArray1OfByte from TColStd )
235 ---Purpose: call_togl_markercontextgroup
238 OpenGroup ( me : mutable;
239 ACGroup : CGroup from Graphic3d )
241 ---Purpose: call_togl_opengroup
243 RemoveGroup ( me : mutable;
244 ACGroup : CGroup from Graphic3d )
246 ---Purpose: call_togl_removegroup
248 TextContextGroup ( me : mutable;
249 ACGroup : CGroup from Graphic3d;
250 NoInsert : Integer from Standard )
252 ---Purpose: call_togl_textcontextgroup
254 -----------------------------------------
255 -- Category: Structure management methods
256 -----------------------------------------
258 ClearStructure ( me : mutable;
259 ACStructure : CStructure from Graphic3d )
261 ---Purpose: call_togl_clearstructure
263 Connect ( me : mutable;
264 AFather : CStructure from Graphic3d;
265 ASon : CStructure from Graphic3d )
267 ---Purpose: call_togl_connect
269 ContextStructure ( me : mutable;
270 ACStructure : CStructure from Graphic3d )
272 ---Purpose: call_togl_contextstructure
274 Disconnect ( me : mutable;
275 AFather : CStructure from Graphic3d;
276 ASon : CStructure from Graphic3d )
278 ---Purpose: call_togl_disconnect
280 DisplayStructure ( me : mutable;
281 ACView : CView from Graphic3d;
282 ACStructure : CStructure from Graphic3d;
283 APriority : Integer from Standard )
285 ---Purpose: call_togl_displaystructure
287 EraseStructure ( me : mutable;
288 ACView : CView from Graphic3d;
289 ACStructure : CStructure from Graphic3d )
291 ---Purpose: call_togl_erasestructure
293 RemoveStructure ( me : mutable;
294 ACStructure : CStructure from Graphic3d )
296 ---Purpose: call_togl_removestructure
298 Structure ( me : mutable;
299 ACStructure : in out CStructure from Graphic3d )
301 ---Purpose: call_togl_structure
303 --------------------------------
304 -- Category: Exploration methods
305 --------------------------------
307 DumpGroup ( me : mutable;
308 ACGroup : CGroup from Graphic3d )
310 ---Purpose: call_togl_structure_exploration
312 DumpStructure ( me : mutable;
313 ACStructure : CStructure from Graphic3d )
315 ---Purpose: call_togl_structure_exploration
317 DumpView ( me : mutable;
318 ACView : CView from Graphic3d )
320 ---Purpose: call_togl_view_exploration
322 ElementExploration ( me : mutable;
323 ACStructure : CStructure from Graphic3d;
324 ElementNumber : Integer from Standard;
325 AVertex : out VertexNC from Graphic3d;
326 AVector : out Vector from Graphic3d )
327 returns Boolean from Standard
329 ---Purpose: call_togl_element_exploration
331 ElementType ( me : mutable;
332 ACStructure : CStructure from Graphic3d;
333 ElementNumber : Integer from Standard )
334 returns TypeOfPrimitive from Graphic3d
336 ---Purpose: call_togl_element_type
338 ------------------------------------
339 -- Category: Pick management methods
340 ------------------------------------
342 InitPick ( me : mutable )
344 ---Purpose: call_togl_init_pick
347 ACPick : out CPick from Graphic3d )
349 ---Purpose: call_togl_pick
351 PickId ( me : mutable;
352 ACGroup : CGroup from Graphic3d )
354 ---Purpose: call_togl_pickid
356 ------------------------------------
357 -- Category: Structured mode methods
358 ------------------------------------
360 ActivateView ( me : mutable;
361 ACView : CView from Graphic3d )
363 ---Purpose: call_togl_activateview
365 AntiAliasing ( me : mutable;
366 ACView : CView from Graphic3d;
367 AFlag : Boolean from Standard )
369 ---Purpose: call_togl_antialiasing
371 Background ( me : mutable;
372 ACView : CView from Graphic3d )
374 ---Purpose: call_togl_background
376 GradientBackground ( me : mutable;
377 ACView : CView from Graphic3d;
378 AColor1: Color from Quantity;
379 AColor2: Color from Quantity;
380 FillStyle : GradientFillMethod from Aspect
383 ---Purpose: call_togl_gradient_background
385 BackgroundImage( me : mutable;
386 FileName : CString from Standard;
387 ACView : CView from Graphic3d;
388 FillStyle : FillMethod from Aspect )
391 SetBgImageStyle( me : mutable; ACView : CView from Graphic3d;
392 FillStyle : FillMethod from Aspect )
395 SetBgGradientStyle( me : mutable;
396 ACView : CView from Graphic3d;
397 FillStyle : GradientFillMethod from Aspect )
400 ClipLimit ( me : mutable;
401 ACView : CView from Graphic3d;
402 AWait : Boolean from Standard )
404 ---Purpose: call_togl_cliplimit
406 DeactivateView ( me : mutable;
407 ACView : CView from Graphic3d )
409 ---Purpose: call_togl_deactivateview
411 DepthCueing ( me : mutable;
412 ACView : CView from Graphic3d;
413 AFlag : Boolean from Standard )
415 ---Purpose: call_togl_cliplimit
417 ProjectRaster ( me : mutable;
418 ACView : CView from Graphic3d;
419 AX : ShortReal from Standard;
420 AY : ShortReal from Standard;
421 AZ : ShortReal from Standard;
422 AU : out Integer from Standard;
423 AV : out Integer from Standard )
424 returns Boolean from Standard
426 ---Purpose: call_togl_unproject_raster
428 UnProjectRaster ( me : mutable;
429 ACView : CView from Graphic3d;
430 Axm : Integer from Standard;
431 Aym : Integer from Standard;
432 AXM : Integer from Standard;
433 AYM : Integer from Standard;
434 AU : Integer from Standard;
435 AV : Integer from Standard;
436 AX : out ShortReal from Standard;
437 AY : out ShortReal from Standard;
438 AZ : out ShortReal from Standard )
439 returns Boolean from Standard
441 ---Purpose: call_togl_unproject_raster
443 UnProjectRasterWithRay ( me : mutable;
444 ACView : CView from Graphic3d;
445 Axm : Integer from Standard;
446 Aym : Integer from Standard;
447 AXM : Integer from Standard;
448 AYM : Integer from Standard;
449 AU : Integer from Standard;
450 AV : Integer from Standard;
451 AX : out ShortReal from Standard;
452 AY : out ShortReal from Standard;
453 AZ : out ShortReal from Standard;
454 DX : out ShortReal from Standard;
455 DY : out ShortReal from Standard;
456 DZ : out ShortReal from Standard )
457 returns Boolean from Standard
459 ---Purpose: call_togl_unproject_raster_with_ray
461 RatioWindow ( me : mutable;
462 ACView : CView from Graphic3d )
464 ---Purpose: call_togl_ratio_window
466 Redraw ( me : mutable;
467 ACView : CView from Graphic3d;
468 ACUnderLayer : CLayer2d from Aspect;
469 ACOverLayer : CLayer2d from Aspect;
473 height : Integer = 0 )
475 ---Purpose: call_togl_redraw
477 RemoveView ( me : mutable;
478 ACView : CView from Graphic3d )
480 ---Purpose: call_togl_removeview
482 SetLight ( me : mutable;
483 ACView : CView from Graphic3d )
485 ---Purpose: call_togl_setlight
487 SetPlane ( me : mutable;
488 ACView : CView from Graphic3d )
490 ---Purpose: call_togl_setplane
492 SetVisualisation ( me : mutable;
493 ACView : CView from Graphic3d )
495 ---Purpose: call_togl_setvisualisation
497 TransformStructure ( me : mutable;
498 ACStructure : CStructure from Graphic3d )
500 ---Purpose: call_togl_transformstructure
502 DegenerateStructure ( me : mutable;
503 ACStructure : CStructure from Graphic3d )
505 ---Purpose: call_togl_degeneratestructure
507 Transparency ( me : mutable;
508 ACView : CView from Graphic3d;
509 AFlag : Boolean from Standard )
511 ---Purpose: call_togl_transparency
513 Update ( me : mutable;
514 ACView : CView from Graphic3d;
515 ACUnderLayer : CLayer2d from Aspect;
516 ACOverLayer : CLayer2d from Aspect )
518 ---Purpose: call_togl_update
521 ACView : in out CView from Graphic3d )
522 returns Boolean from Standard
524 ---Purpose: call_togl_view
526 ViewMapping ( me : mutable;
527 ACView : CView from Graphic3d;
528 AWait : Boolean from Standard )
530 ---Purpose: call_togl_viewmapping
532 ViewOrientation ( me : mutable;
533 ACView : CView from Graphic3d;
534 AWait : Boolean from Standard )
536 ---Purpose: call_togl_vieworientation
538 Environment ( me : mutable;
539 ACView : CView from Graphic3d )
543 ----------------------------------------
544 -- Category: Methods to create Marker
545 -- for Purpose : see Graphic3d_Group.cdl
546 ----------------------------------------
548 Marker ( me : mutable;
549 ACGroup : CGroup from Graphic3d;
550 APoint : Vertex from Graphic3d;
551 EvalMinMax : Boolean from Standard = Standard_True )
554 MarkerSet ( me : mutable;
555 ACGroup : CGroup from Graphic3d;
556 ListVertex : Array1OfVertex from Graphic3d;
557 EvalMinMax : Boolean from Standard = Standard_True )
560 ----------------------------------------
561 -- Category: Methods to create Polygon
562 -- for Purpose : see Graphic3d_Group.cdl
563 ----------------------------------------
565 Polygon ( me : mutable;
566 ACGroup : CGroup from Graphic3d;
567 ListVertex : Array1OfVertex from Graphic3d;
568 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
569 EvalMinMax : Boolean from Standard = Standard_True )
571 ---Purpose: call_togl_polygon
573 Polygon ( me : mutable;
574 ACGroup : CGroup from Graphic3d;
575 ListVertex : Array1OfVertex from Graphic3d;
576 Normal : Vector from Graphic3d;
577 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
578 EvalMinMax : Boolean from Standard = Standard_True )
580 ---Purpose: call_togl_polygon
582 Polygon ( me : mutable;
583 ACGroup : CGroup from Graphic3d;
584 ListVertex : Array1OfVertexN from Graphic3d;
585 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
586 EvalMinMax : Boolean from Standard = Standard_True )
588 ---Purpose: call_togl_polygon
590 Polygon ( me : mutable;
591 ACGroup : CGroup from Graphic3d;
592 ListVertex : Array1OfVertexN from Graphic3d;
593 Normal : Vector from Graphic3d;
594 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
595 EvalMinMax : Boolean from Standard = Standard_True )
597 ---Purpose: call_togl_polygon
599 Polygon ( me : mutable;
600 ACGroup : CGroup from Graphic3d;
601 ListVertex : Array1OfVertexNT from Graphic3d;
602 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
603 EvalMinMax : Boolean from Standard = Standard_True )
605 ---Purpose: call_togl_polygon
607 PolygonHoles ( me : mutable;
608 ACGroup : CGroup from Graphic3d;
609 Bounds : Array1OfInteger from TColStd;
610 ListVertex : Array1OfVertex from Graphic3d;
611 EvalMinMax : Boolean from Standard = Standard_True )
613 ---Purpose: call_togl_polygon_holes
615 PolygonHoles ( me : mutable;
616 ACGroup : CGroup from Graphic3d;
617 Bounds : Array1OfInteger from TColStd;
618 ListVertex : Array1OfVertex from Graphic3d;
619 Normal : Vector from Graphic3d;
620 EvalMinMax : Boolean from Standard = Standard_True )
622 ---Purpose: call_togl_polygon_holes
624 PolygonHoles ( me : mutable;
625 ACGroup : CGroup from Graphic3d;
626 Bounds : Array1OfInteger from TColStd;
627 ListVertex : Array1OfVertexN from Graphic3d;
628 EvalMinMax : Boolean from Standard = Standard_True )
630 ---Purpose: call_togl_polygon_holes
632 PolygonHoles ( me : mutable;
633 ACGroup : CGroup from Graphic3d;
634 Bounds : Array1OfInteger from TColStd;
635 ListVertex : Array1OfVertexN from Graphic3d;
636 Normal : Vector from Graphic3d;
637 EvalMinMax : Boolean from Standard = Standard_True )
639 ---Purpose: call_togl_polygon_holes
641 ----------------------------------------
642 -- Category: Methods to create Polyline
643 -- for Purpose : see Graphic3d_Group.cdl
644 ----------------------------------------
646 Polyline ( me : mutable;
647 ACGroup : CGroup from Graphic3d;
648 X1, Y1, Z1, X2, Y2, Z2 : Real from Standard;
649 EvalMinMax : Boolean from Standard = Standard_True )
651 ---Purpose: call_togl_polyline
653 Polyline ( me : mutable;
654 ACGroup : CGroup from Graphic3d;
655 ListVertex : Array1OfVertex from Graphic3d;
656 EvalMinMax : Boolean from Standard = Standard_True )
658 ---Purpose: call_togl_polyline
660 Polyline ( me : mutable;
661 ACGroup : CGroup from Graphic3d;
662 ListVertex : Array1OfVertexC from Graphic3d;
663 EvalMinMax : Boolean from Standard = Standard_True )
665 ---Purpose: call_togl_polyline
667 -----------------------------------------
668 -- Category: Methods to create Quadrangle
669 -- for Purpose : see Graphic3d_Group.cdl
670 -----------------------------------------
672 QuadrangleMesh ( me : mutable;
673 ACGroup : CGroup from Graphic3d;
674 ListVertex : Array2OfVertex from Graphic3d;
675 EvalMinMax : Boolean from Standard = Standard_True )
677 ---Purpose: call_togl_quadrangle
679 QuadrangleMesh ( me : mutable;
680 ACGroup : CGroup from Graphic3d;
681 ListVertex : Array2OfVertexN from Graphic3d;
682 EvalMinMax : Boolean from Standard = Standard_True )
684 ---Purpose: call_togl_quadrangle
686 QuadrangleMesh ( me : mutable;
687 ACGroup : CGroup from Graphic3d;
688 ListVertex : Array2OfVertexNT from Graphic3d;
689 EvalMinMax : Boolean from Standard = Standard_True )
691 ---Purpose: call_togl_quadrangle
693 QuadrangleSet ( me : mutable;
694 ACGroup : CGroup from Graphic3d;
695 ListVertex : Array1OfVertex from Graphic3d;
696 ListEdge : Array1OfEdge from Aspect;
697 EvalMinMax : Boolean from Standard = Standard_True )
699 ---Purpose: call_togl_polygon_indices
701 QuadrangleSet ( me : mutable;
702 ACGroup : CGroup from Graphic3d;
703 ListVertex : Array1OfVertexN from Graphic3d;
704 ListEdge : Array1OfEdge from Aspect;
705 EvalMinMax : Boolean from Standard = Standard_True )
707 ---Purpose: call_togl_polygon_indices
709 QuadrangleSet ( me : mutable;
710 ACGroup : CGroup from Graphic3d;
711 ListVertex : Array1OfVertexNT from Graphic3d;
712 ListEdge : Array1OfEdge from Aspect;
713 EvalMinMax : Boolean from Standard = Standard_True )
715 ---Purpose: call_togl_polygon_indices
717 QuadrangleSet ( me : mutable;
718 ACGroup : CGroup from Graphic3d;
719 ListVertex : Array1OfVertexC from Graphic3d;
720 ListEdge : Array1OfEdge from Aspect;
721 EvalMinMax : Boolean from Standard = Standard_True )
723 ---Purpose: call_togl_polygon_indices
725 QuadrangleSet ( me : mutable;
726 ACGroup : CGroup from Graphic3d;
727 ListVertex : Array1OfVertexNC from Graphic3d;
728 ListEdge : Array1OfEdge from Aspect;
729 EvalMinMax : Boolean from Standard = Standard_True )
731 ---Purpose: call_togl_polygon_indices
733 ----------------------------------------
734 -- Category: Methods to create Text
735 -- for Purpose : see Graphic3d_Group.cdl
736 ----------------------------------------
739 ACGroup : CGroup from Graphic3d;
740 AText : CString from Standard;
741 APoint : Vertex from Graphic3d;
742 AHeight : Real from Standard;
743 AAngle : PlaneAngle from Quantity;
744 ATp : TextPath from Graphic3d;
745 AHta : HorizontalTextAlignment from Graphic3d;
746 AVta : VerticalTextAlignment from Graphic3d;
747 EvalMinMax : Boolean from Standard = Standard_True )
749 ---Purpose: call_togl_text
752 ACGroup : CGroup from Graphic3d;
753 AText : CString from Standard;
754 APoint : Vertex from Graphic3d;
755 AHeight : Real from Standard;
756 EvalMinMax : Boolean from Standard = Standard_True )
758 ---Purpose: call_togl_text
761 ACGroup : CGroup from Graphic3d;
762 AText : ExtendedString from TCollection;
763 APoint : Vertex from Graphic3d;
764 AHeight : Real from Standard;
765 AAngle : PlaneAngle from Quantity;
766 ATp : TextPath from Graphic3d;
767 AHta : HorizontalTextAlignment from Graphic3d;
768 AVta : VerticalTextAlignment from Graphic3d;
769 EvalMinMax : Boolean from Standard = Standard_True )
771 ---Purpose: call_togl_text
774 ACGroup : CGroup from Graphic3d;
775 AText : ExtendedString from TCollection;
776 APoint : Vertex from Graphic3d;
777 AHeight : Real from Standard;
778 EvalMinMax : Boolean from Standard = Standard_True )
780 ---Purpose: call_togl_text
782 ----------------------------------------
783 ---Category: Methods to create Triangle
784 -- for Purpose : see Graphic3d_Group.cdl
785 ----------------------------------------
787 TriangleMesh ( me : mutable;
788 ACGroup : CGroup from Graphic3d;
789 ListVertex : Array1OfVertex from Graphic3d;
790 EvalMinMax : Boolean from Standard = Standard_True )
792 ---Purpose: call_togl_triangle
794 TriangleMesh ( me : mutable;
795 ACGroup : CGroup from Graphic3d;
796 ListVertex : Array1OfVertexN from Graphic3d;
797 EvalMinMax : Boolean from Standard = Standard_True )
799 ---Purpose: call_togl_triangle
801 TriangleMesh ( me : mutable;
802 ACGroup : CGroup from Graphic3d;
803 ListVertex : Array1OfVertexNT from Graphic3d;
804 EvalMinMax : Boolean from Standard = Standard_True )
806 ---Purpose: call_togl_triangle
808 TriangleSet ( me : mutable;
809 ACGroup : CGroup from Graphic3d;
810 ListVertex : Array1OfVertex from Graphic3d;
811 ListEdge : Array1OfEdge from Aspect;
812 EvalMinMax : Boolean from Standard = Standard_True )
814 ---Purpose: call_togl_polygon_indices
816 TriangleSet ( me : mutable;
817 ACGroup : CGroup from Graphic3d;
818 ListVertex : Array1OfVertexN from Graphic3d;
819 ListEdge : Array1OfEdge from Aspect;
820 EvalMinMax : Boolean from Standard = Standard_True )
822 ---Purpose: call_togl_polygon_indices
824 TriangleSet ( me : mutable;
825 ACGroup : CGroup from Graphic3d;
826 ListVertex : Array1OfVertexNT from Graphic3d;
827 ListEdge : Array1OfEdge from Aspect;
828 EvalMinMax : Boolean from Standard = Standard_True )
830 ---Purpose: call_togl_polygon_indices
832 TriangleSet ( me : mutable;
833 ACGroup : CGroup from Graphic3d;
834 ListVertex : Array1OfVertexC from Graphic3d;
835 ListEdge : Array1OfEdge from Aspect;
836 EvalMinMax : Boolean from Standard = Standard_True )
838 ---Purpose: call_togl_polygon_indices
840 TriangleSet ( me : mutable;
841 ACGroup : CGroup from Graphic3d;
842 ListVertex : Array1OfVertexNC from Graphic3d;
843 ListEdge : Array1OfEdge from Aspect;
844 EvalMinMax : Boolean from Standard = Standard_True )
846 ---Purpose: call_togl_polygon_indices
848 PrimitiveArray( me : mutable;
849 ACGroup : CGroup from Graphic3d;
850 parray : PrimitiveArray from Graphic3d;
851 EvalMinMax : Boolean from Standard = Standard_True )
853 ---Purpose: call_togl_parray
855 UserDraw( me : mutable;
856 ACGroup : CGroup from Graphic3d;
857 AUserDraw : CUserDraw from Graphic3d )
859 ---Purpose: call_togl_userdraw
861 EnableVBO( me : mutable;
862 status : Boolean from Standard )
864 ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
867 ----------------------------------------
868 ---Category: Methods to create Triedron
869 -- for Purpose : see Graphic3d_Group.cdl
870 ----------------------------------------
872 ZBufferTriedronSetup ( me : mutable;
873 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
874 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
875 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
876 SizeRatio : Real from Standard = 0.8;
877 AxisDiametr : Real from Standard = 0.05;
878 NbFacettes : Integer from Standard = 12)
880 ---Purpose: call_togl_ztriedron_setup
882 TriedronDisplay ( me : mutable;
883 ACView : CView from Graphic3d;
884 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
885 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
886 AScale : Real from Standard = 0.02;
887 AsWireframe : Boolean from Standard = Standard_True )
889 ---Purpose: call_togl_triedron_display
892 TriedronErase ( me : mutable;
893 ACView : CView from Graphic3d)
895 ---Purpose: call_togl_triedron_erase
898 TriedronEcho ( me : mutable;
899 ACView : CView from Graphic3d;
900 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
902 ---Purpose: call_togl_triedron_echo
904 ---------------------------------
905 ---Category: Graduated trihedron
906 --------------------------------
908 GraduatedTrihedronDisplay(me : mutable;
909 view : CView from Graphic3d;
910 cubic : CGraduatedTrihedron from Graphic3d)
911 ---Purpose: call_togl_graduatedtrihedron_display
914 GraduatedTrihedronErase(me : mutable;
915 view : CView from Graphic3d)
916 ---Purpose: call_togl_graduatedtrihedron_erase
919 GraduatedTrihedronMinMaxValues(me : mutable;
920 xmin : ShortReal from Standard;
921 ymin : ShortReal from Standard;
922 zmin : ShortReal from Standard;
923 xmax : ShortReal from Standard;
924 ymax : ShortReal from Standard;
925 zmax : ShortReal from Standard)
926 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
929 ----------------------------------------
930 -- Category: Internal methods
931 -- for Purpose : see Graphic3d_Group.cdl
932 ----------------------------------------
934 Bezier ( me : mutable;
935 ACGroup : CGroup from Graphic3d;
936 ListVertex : Array1OfVertex from Graphic3d;
937 EvalMinMax : Boolean from Standard = Standard_True )
939 ---Purpose: call_togl_bezier
941 Bezier ( me : mutable;
942 ACGroup : CGroup from Graphic3d;
943 ListVertex : Array1OfVertex from Graphic3d;
944 ListWeight : Array1OfReal from TColStd;
945 EvalMinMax : Boolean from Standard = Standard_True )
947 ---Purpose: call_togl_bezier_weight
949 ---------------------------
950 -- Category: Animation mode
951 ---------------------------
953 BeginAnimation ( me : mutable;
954 ACView : CView from Graphic3d)
956 ---Purpose: call_togl_begin_animation
958 EndAnimation ( me : mutable;
959 ACView : CView from Graphic3d)
961 ---Purpose: call_togl_end_animation
963 ----------------------------------
964 -- Category: Ajout mode methods
965 ----------------------------------
967 BeginAddMode ( me : mutable;
968 ACView : CView from Graphic3d)
969 returns Boolean from Standard
971 ---Purpose: call_togl_begin_ajout_mode
973 EndAddMode ( me : mutable)
975 ---Purpose: call_togl_end_ajout_mode
977 ----------------------------------
978 -- Category: Immediat mode methods
979 ----------------------------------
981 BeginImmediatMode ( me : mutable;
982 ACView : CView from Graphic3d;
983 ACUnderLayer : CLayer2d from Aspect;
984 ACOverLayer : CLayer2d from Aspect;
985 DoubleBuffer : Boolean from Standard;
986 RetainMode : Boolean from Standard)
987 returns Boolean from Standard
989 ---Purpose: call_togl_begin_immediat_mode
991 BeginPolyline ( me : mutable )
993 ---Purpose: call_togl_begin_polyline
995 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
996 aFlush : Boolean from Standard = Standard_True)
998 ---Purpose: call_togl_clear_immediat_mode
1000 Draw ( me : mutable;
1001 X : ShortReal from Standard;
1002 Y : ShortReal from Standard;
1003 Z : ShortReal from Standard )
1004 is redefined static;
1005 ---Purpose: call_togl_draw
1007 DrawStructure ( me : mutable;
1008 ACStructure : CStructure from Graphic3d )
1009 is redefined static;
1010 ---Purpose: call_togl_draw_structure
1012 EndImmediatMode ( me : mutable;
1013 Synchronize : Integer from Standard )
1014 is redefined static;
1015 ---Purpose: call_togl_end_immediat_mode
1017 EndPolyline ( me : mutable )
1018 is redefined static;
1019 ---Purpose: call_togl_end_polyline
1021 Move ( me : mutable;
1022 X : ShortReal from Standard;
1023 Y : ShortReal from Standard;
1024 Z : ShortReal from Standard )
1025 is redefined static;
1026 ---Purpose: call_togl_move
1028 SetLineColor ( me : mutable;
1029 R : ShortReal from Standard;
1030 G : ShortReal from Standard;
1031 B : ShortReal from Standard )
1032 is redefined static;
1033 ---Purpose: call_togl_set_linecolor
1035 SetLineType ( me : mutable;
1036 Type : Integer from Standard )
1037 is redefined static;
1038 ---Purpose: call_togl_set_linetype
1040 SetLineWidth ( me : mutable;
1041 Width : ShortReal from Standard )
1042 is redefined static;
1043 ---Purpose: call_togl_set_linewidth
1045 SetMinMax ( me : mutable;
1046 X1 : ShortReal from Standard;
1047 Y1 : ShortReal from Standard;
1048 Z1 : ShortReal from Standard;
1049 X2 : ShortReal from Standard;
1050 Y2 : ShortReal from Standard;
1051 Z2 : ShortReal from Standard )
1052 is redefined static;
1053 ---Purpose: call_togl_set_minmax
1055 Transform ( me : mutable;
1056 AMatrix : Array2OfReal from TColStd;
1057 AType : TypeOfComposition from Graphic3d )
1058 is redefined static;
1059 ---Purpose: call_togl_transform
1061 -----------------------------
1062 -- Category: Textures methods
1063 -----------------------------
1066 Type : TypeOfTexture from Graphic3d;
1067 Image : AlienImage from AlienImage;
1068 FileName : CString from Standard;
1069 TexUpperBounds : HArray1OfReal from TColStd )
1070 returns Integer from Standard
1071 is redefined static;
1074 DestroyTexture ( me;
1075 TexId : Integer from Standard )
1076 is redefined static;
1080 TexId : Integer from Standard;
1081 AValue : CInitTexture from Graphic3d )
1082 is redefined static;
1085 -------------------------------
1086 -- Category: Layer mode methods
1087 -------------------------------
1089 Layer ( me : mutable;
1090 ACLayer : in out CLayer2d from Aspect )
1091 is redefined static;
1092 ---Purpose: call_togl_layer2d
1094 RemoveLayer ( me : mutable;
1095 ACLayer : CLayer2d from Aspect )
1096 is redefined static;
1097 ---Purpose: call_togl_removelayer2d
1099 BeginLayer ( me : mutable;
1100 ACLayer : CLayer2d from Aspect )
1101 is redefined static;
1102 ---Purpose: call_togl_begin_layer2d
1104 BeginPolygon2d ( me : mutable )
1105 is redefined static;
1106 ---Purpose: call_togl_begin_polygon2d
1108 BeginPolyline2d ( me : mutable )
1109 is redefined static;
1110 ---Purpose: call_togl_begin_polyline2d
1112 ClearLayer ( me : mutable;
1113 ACLayer : CLayer2d from Aspect )
1114 is redefined static;
1115 ---Purpose: call_togl_clear_layer2d
1117 Draw ( me : mutable;
1118 X : ShortReal from Standard;
1119 Y : ShortReal from Standard )
1120 is redefined static;
1121 ---Purpose: call_togl_draw2d
1123 Edge ( me : mutable;
1124 X : ShortReal from Standard;
1125 Y : ShortReal from Standard )
1126 is redefined static;
1127 ---Purpose: call_togl_edge2d
1129 EndLayer ( me : mutable )
1130 is redefined static;
1131 ---Purpose: call_togl_end_layer2d
1133 EndPolygon2d ( me : mutable )
1134 is redefined static;
1135 ---Purpose: call_togl_end_polygon2d
1137 EndPolyline2d ( me : mutable )
1138 is redefined static;
1139 ---Purpose: call_togl_end_polyline2d
1141 Move ( me : mutable;
1142 X : ShortReal from Standard;
1143 Y : ShortReal from Standard )
1144 is redefined static;
1145 ---Purpose: call_togl_move2d
1147 Rectangle ( me : mutable;
1148 X, Y : ShortReal from Standard;
1149 Width, Height : ShortReal from Standard )
1150 is redefined static;
1151 ---Purpose: call_togl_rectangle2d
1153 SetColor ( me : mutable;
1154 R : ShortReal from Standard;
1155 G : ShortReal from Standard;
1156 B : ShortReal from Standard )
1157 is redefined static;
1158 ---Purpose: call_togl_set_color
1160 SetTransparency ( me : mutable;
1161 ATransparency : ShortReal from Standard )
1162 is redefined static;
1163 ---Purpose: call_togl_set_transparency
1165 UnsetTransparency ( me : mutable )
1166 is redefined static;
1167 ---Purpose: call_togl_unset_transparency
1169 SetLineAttributes ( me : mutable;
1170 Type : Integer from Standard;
1171 Width : ShortReal from Standard )
1172 is redefined static;
1173 ---Purpose: call_togl_set_line_attributes
1175 SetTextAttributes ( me : mutable;
1176 FontName : CString from Standard;
1177 Type : Integer from Standard;
1178 R : ShortReal from Standard;
1179 G : ShortReal from Standard;
1180 B : ShortReal from Standard )
1181 is redefined static;
1182 ---Purpose: call_togl_set_text_attributes
1185 Text ( me : mutable;
1186 AText : CString from Standard;
1187 X, Y : ShortReal from Standard;
1188 AHeight : ShortReal from Standard )
1189 is redefined static;
1190 ---Purpose: call_togl_text2d
1193 AText : CString from Standard;
1194 AHeight : ShortReal from Standard;
1195 AWidth : in out ShortReal from Standard;
1196 AnAscent : in out ShortReal from Standard;
1197 ADescent : in out ShortReal from Standard )
1198 is redefined static;
1199 ---Purpose: call_togl_textsize2d
1201 SetBackFacingModel ( me : mutable;
1202 aView : CView from Graphic3d )
1203 is redefined static;
1204 ---Purpose: call_togl_backfacing
1207 ACView : CView from Graphic3d;
1208 ACUnderLayer : CLayer2d from Aspect;
1209 ACOverLayer : CLayer2d from Aspect;
1210 hPrnDC : Handle from Aspect;
1211 showBackground : Boolean;
1213 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH;
1214 theScaleFactor : Real from Standard = 1.0 )
1215 returns Boolean from Standard is redefined static;
1217 ---Purpose: print the contents of all layers of the view to the printer.
1218 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
1219 -- <showBackground> : When set to FALSE then print the view without background color
1220 -- (background is white)
1221 -- else set to TRUE for printing with current background color.
1222 -- <filename>: If != NULL, then the view will be printed to a file.
1223 -- <printAlgorithm>: Select print algorithm: stretch, tile.
1224 -- <theScaleFactor>: Scaling coefficient, used internally to scale the
1225 -- printings accordingly to the scale factor selected in the printer
1226 -- properties dialog.
1227 -- Returns Standard_True if the data is passed to the printer, otherwise
1228 -- Standard_False if the print operation failed due to the printer errors,
1229 -- or lack of system memory. This might be related to insufficient memory
1230 -- or some internal errors. All this errors are indicated by the message
1231 -- boxes (on level of OpenGl_GraphicDriver).
1232 -- Warning: This function can reuse FBO assigned to the view
1233 -- Please take it into account if you use it for your purposes;
1234 ---Warning: Works only under Windows.
1237 Export( me: mutable;
1238 theFileName : CString from Standard;
1239 theFormat : ExportFormat from Graphic3d;
1240 theSortType : SortType from Graphic3d;
1241 theWidth, theHeight : Integer from Standard;
1242 theView : CView from Graphic3d;
1243 theLayerUnder : CLayer2d from Aspect;
1244 theLayerOver : CLayer2d from Aspect;
1245 thePrecision : Real from Standard = 0.005;
1246 theProgressBarFunc : Address from Standard = NULL;
1247 theProgressObject : Address from Standard = NULL )
1248 returns Boolean from Standard
1249 is redefined virtual;
1251 -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
1252 -- Requires gl2ps library.
1253 -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
1254 -- Notice however that results may differ a lot and do not contain some elements.
1255 -- EMF export format requiers modified gl2ps library and available only on Windows platform.
1258 SetDepthTestEnabled( me; view : CView from Graphic3d;
1259 isEnabled : Boolean from Standard )
1260 is redefined static;
1261 ---Purpose: call_togl_depthtest()
1263 IsDepthTestEnabled( me; view : CView from Graphic3d )
1264 returns Boolean from Standard is redefined static;
1265 ---Purpose: call_togl_isdepthtest()
1267 ReadDepths( me; view : CView from Graphic3d;
1269 width, height : Integer;
1271 is redefined static;
1272 ---Purpose: Reads depths of shown pixels of the given
1273 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
1275 FBOCreate( me : mutable;
1276 view : CView from Graphic3d;
1277 width, height : Integer from Standard )
1278 returns PtrFrameBuffer from Graphic3d
1279 is redefined static;
1280 ---Purpose: Generate offscreen FBO (needs OpenGL2+ hardware)
1281 -- If not supported on hardware returns NULL.
1283 FBORelease( me : mutable;
1284 view : CView from Graphic3d;
1285 fboPtr : in out PtrFrameBuffer from Graphic3d )
1286 is redefined static;
1287 ---Purpose: Remove offscreen FBO
1289 FBOGetDimensions( me : mutable;
1290 view : CView from Graphic3d;
1291 fboPtr : PtrFrameBuffer from Graphic3d;
1292 width, height : out Integer from Standard;
1293 widthMax, heightMax : out Integer from Standard )
1294 is redefined static;
1295 ---Purpose: Read offscreen FBO configuration.
1297 FBOChangeViewport( me : mutable;
1298 view : CView from Graphic3d;
1299 fboPtr : in out PtrFrameBuffer from Graphic3d;
1300 width, height : Integer from Standard )
1301 is redefined static;
1302 ---Purpose: Change offscreen FBO viewport.
1304 BufferDump( me : mutable;
1305 view : CView from Graphic3d;
1306 buffer : in out CRawBufferData from Image )
1307 returns Boolean from Standard
1308 is redefined static;
1309 ---Purpose: Dump active rendering buffer into specified memory buffer.
1311 SetGLLightEnabled( me; view : CView from Graphic3d;
1312 isEnabled : Boolean from Standard )
1313 is redefined static;
1314 ---Purpose: call_togl_gllight()
1316 IsGLLightEnabled( me; view : CView from Graphic3d )
1317 returns Boolean from Standard is redefined static;
1318 ---Purpose: call_togl_isgllight()
1320 --ListOfAvalableFontNames( me;
1321 -- lst: out NListOfHAsciiString from Graphic3d )
1322 -- returns Boolean from Standard
1324 -- Purpose: Initialize list of names of avalable system fonts
1325 -- returns Standard_False if fails
1326 -- ABD Integration support of system fonts (using FTGL and FreeType)
1328 RemovePrimitiveArray( me : mutable;
1329 theCGroup : CGroup from Graphic3d;
1330 thePArray : PrimitiveArray from Graphic3d )
1331 is redefined static;
1332 ---Purpose: Clear visualization data in graphical driver and
1333 -- stop displaying the primitives array of the graphical group
1334 -- <theCGroup>. This method is internal and should be used
1335 -- by Graphic3d_Group only.
1337 end GraphicDriver from OpenGl;