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,
53 AspectLine3d from Graphic3d,
54 AspectMarker3d from Graphic3d,
55 AspectText3d from Graphic3d,
56 AspectFillArea3d from Graphic3d,
57 HorizontalTextAlignment from Graphic3d,
58 CBitFields20 from Graphic3d,
59 CGroup from Graphic3d,
61 CStructure from Graphic3d,
63 CRawBufferData from Image,
64 Structure from Graphic3d,
65 TextPath from Graphic3d,
66 TypeOfComposition from Graphic3d,
67 TypeOfPolygon from Graphic3d,
68 TypeOfPrimitive from Graphic3d,
69 Vector from Graphic3d,
70 Array1OfVertex from Graphic3d,
71 Array2OfVertex from Graphic3d,
72 Vertex from Graphic3d,
73 Array1OfVertexC from Graphic3d,
74 Array2OfVertexC from Graphic3d,
75 VertexC from Graphic3d,
76 Array1OfVertexN from Graphic3d,
77 Array2OfVertexN from Graphic3d,
78 VertexN from Graphic3d,
79 Array1OfVertexNC from Graphic3d,
80 Array2OfVertexNC from Graphic3d,
81 VertexNC from Graphic3d,
82 VerticalTextAlignment from Graphic3d,
83 CInitTexture from Graphic3d,
84 TypeOfTexture from Graphic3d,
85 VertexNT from Graphic3d,
86 Array1OfVertexNT from Graphic3d,
87 Array2OfVertexNT from Graphic3d,
88 PrimitiveArray from Graphic3d,
89 PtrFrameBuffer from Graphic3d,
90 FillMethod from Aspect,
91 GradientFillMethod from Aspect,
92 HArray1OfByte from TColStd,
93 ExportFormat from Graphic3d,
94 SortType from Graphic3d,
95 HArray1OfReal from TColStd,
96 CUserDraw from Graphic3d,
97 NListOfHAsciiString from Graphic3d,
99 CGraduatedTrihedron from Graphic3d
102 Create ( AShrName : CString from Standard )
103 returns mutable GraphicDriver from OpenGl;
105 -------------------------
106 -- Category: Init methods
107 -------------------------
108 DefaultTextHeight( me )
109 returns ShortReal from Standard
112 Begin ( me : mutable;
113 ADisplay : CString from Standard )
114 returns Boolean from Standard
116 ---Purpose: call_togl_begin
118 Begin ( me : mutable;
119 ADisplay : Display from Aspect )
120 returns Boolean from Standard
122 ---Purpose: call_togl_begin_display
126 ---Purpose: call_togl_end
128 ----------------------------
129 -- Category: Inquire methods
130 ----------------------------
132 InquireLightLimit ( me : mutable )
133 returns Integer from Standard
135 ---Purpose: call_togl_inquirelight
137 InquireMat ( me : mutable;
138 ACView : CView from Graphic3d;
139 AMatO : out Array2OfReal from TColStd;
140 AMatM : out Array2OfReal from TColStd )
142 ---Purpose: call_togl_inquiremat
144 InquirePlaneLimit ( me : mutable )
145 returns Integer from Standard
147 ---Purpose: call_togl_inquireplane
149 InquireViewLimit ( me : mutable )
150 returns Integer from Standard
152 ---Purpose: call_togl_inquireview
154 InquireTextureAvailable ( me : mutable )
155 returns Boolean from Standard
157 ---Purpose: Returns Standard_True if texture is
158 -- supported by the graphic driver
160 ------------------------------
161 -- Category: Highlight methods
162 ------------------------------
164 Blink ( me : mutable;
165 ACStructure : CStructure from Graphic3d;
166 Create : Boolean from Standard )
168 ---Purpose: call_togl_blink
170 BoundaryBox ( me : mutable;
171 ACStructure : CStructure from Graphic3d;
172 Create : Boolean from Standard )
174 ---Purpose: call_togl_boundarybox
176 HighlightColor ( me : mutable;
177 ACStructure : CStructure from Graphic3d;
178 R : ShortReal from Standard;
179 G : ShortReal from Standard;
180 B : ShortReal from Standard;
181 Create : Boolean from Standard )
183 ---Purpose: call_togl_highlightcolor
185 NameSetStructure ( me : mutable;
186 ACStructure : CStructure from Graphic3d )
188 ---Purpose: call_togl_namesetstructure
190 -------------------------------------
191 -- Category: Group management methods
192 -------------------------------------
194 ClearGroup ( me : mutable;
195 ACGroup : CGroup from Graphic3d )
197 ---Purpose: call_togl_cleargroup
199 CloseGroup ( me : mutable;
200 ACGroup : CGroup from Graphic3d )
202 ---Purpose: call_togl_closegroup
204 FaceContextGroup ( me : mutable;
205 ACGroup : CGroup from Graphic3d;
206 NoInsert : Integer from Standard )
208 ---Purpose: call_togl_facecontextgroup
210 Group ( me : mutable;
211 ACGroup : in out CGroup from Graphic3d )
213 ---Purpose: call_togl_group
215 LineContextGroup ( me : mutable;
216 ACGroup : CGroup from Graphic3d;
217 NoInsert : Integer from Standard )
219 ---Purpose: call_togl_linecontextgroup
221 MarkerContextGroup ( me : mutable;
222 ACGroup : CGroup from Graphic3d;
223 NoInsert : Integer from Standard )
225 ---Purpose: call_togl_markercontextgroup
227 MarkerContextGroup ( me : mutable;
228 ACGroup : CGroup from Graphic3d;
229 NoInsert : Integer from Standard;
230 AMarkWidth : Integer from Standard;
231 AMarkHeight : Integer from Standard;
232 ATexture : HArray1OfByte from TColStd )
234 ---Purpose: call_togl_markercontextgroup
237 OpenGroup ( me : mutable;
238 ACGroup : CGroup from Graphic3d )
240 ---Purpose: call_togl_opengroup
242 RemoveGroup ( me : mutable;
243 ACGroup : CGroup from Graphic3d )
245 ---Purpose: call_togl_removegroup
247 TextContextGroup ( me : mutable;
248 ACGroup : CGroup from Graphic3d;
249 NoInsert : Integer from Standard )
251 ---Purpose: call_togl_textcontextgroup
253 -----------------------------------------
254 -- Category: Structure management methods
255 -----------------------------------------
257 ClearStructure ( me : mutable;
258 ACStructure : CStructure from Graphic3d )
260 ---Purpose: call_togl_clearstructure
262 Connect ( me : mutable;
263 AFather : CStructure from Graphic3d;
264 ASon : CStructure from Graphic3d )
266 ---Purpose: call_togl_connect
268 ContextStructure ( me : mutable;
269 ACStructure : CStructure from Graphic3d )
271 ---Purpose: call_togl_contextstructure
273 Disconnect ( me : mutable;
274 AFather : CStructure from Graphic3d;
275 ASon : CStructure from Graphic3d )
277 ---Purpose: call_togl_disconnect
279 DisplayStructure ( me : mutable;
280 ACView : CView from Graphic3d;
281 ACStructure : CStructure from Graphic3d;
282 APriority : Integer from Standard )
284 ---Purpose: call_togl_displaystructure
286 EraseStructure ( me : mutable;
287 ACView : CView from Graphic3d;
288 ACStructure : CStructure from Graphic3d )
290 ---Purpose: call_togl_erasestructure
292 RemoveStructure ( me : mutable;
293 ACStructure : CStructure from Graphic3d )
295 ---Purpose: call_togl_removestructure
297 Structure ( me : mutable;
298 ACStructure : in out CStructure from Graphic3d )
300 ---Purpose: call_togl_structure
302 --------------------------------
303 -- Category: Exploration methods
304 --------------------------------
306 DumpGroup ( me : mutable;
307 ACGroup : CGroup from Graphic3d )
309 ---Purpose: call_togl_structure_exploration
311 DumpStructure ( me : mutable;
312 ACStructure : CStructure from Graphic3d )
314 ---Purpose: call_togl_structure_exploration
316 DumpView ( me : mutable;
317 ACView : CView from Graphic3d )
319 ---Purpose: call_togl_view_exploration
321 ElementExploration ( me : mutable;
322 ACStructure : CStructure from Graphic3d;
323 ElementNumber : Integer from Standard;
324 AVertex : out VertexNC from Graphic3d;
325 AVector : out Vector from Graphic3d )
326 returns Boolean from Standard
328 ---Purpose: call_togl_element_exploration
330 ElementType ( me : mutable;
331 ACStructure : CStructure from Graphic3d;
332 ElementNumber : Integer from Standard )
333 returns TypeOfPrimitive from Graphic3d
335 ---Purpose: call_togl_element_type
337 ------------------------------------
338 -- Category: Pick management methods
339 ------------------------------------
341 InitPick ( me : mutable )
343 ---Purpose: call_togl_init_pick
346 ACPick : out CPick from Graphic3d )
348 ---Purpose: call_togl_pick
350 PickId ( me : mutable;
351 ACGroup : CGroup from Graphic3d )
353 ---Purpose: call_togl_pickid
355 ------------------------------------
356 -- Category: Structured mode methods
357 ------------------------------------
359 ActivateView ( me : mutable;
360 ACView : CView from Graphic3d )
362 ---Purpose: call_togl_activateview
364 AntiAliasing ( me : mutable;
365 ACView : CView from Graphic3d;
366 AFlag : Boolean from Standard )
368 ---Purpose: call_togl_antialiasing
370 Background ( me : mutable;
371 ACView : CView from Graphic3d )
373 ---Purpose: call_togl_background
375 GradientBackground ( me : mutable;
376 ACView : CView from Graphic3d;
377 AColor1: Color from Quantity;
378 AColor2: Color from Quantity;
379 FillStyle : GradientFillMethod from Aspect
382 ---Purpose: call_togl_gradient_background
384 BackgroundImage( me : mutable;
385 FileName : CString from Standard;
386 ACView : CView from Graphic3d;
387 FillStyle : FillMethod from Aspect )
390 SetBgImageStyle( me : mutable; ACView : CView from Graphic3d;
391 FillStyle : FillMethod from Aspect )
394 SetBgGradientStyle( me : mutable;
395 ACView : CView from Graphic3d;
396 FillStyle : GradientFillMethod from Aspect )
399 ClipLimit ( me : mutable;
400 ACView : CView from Graphic3d;
401 AWait : Boolean from Standard )
403 ---Purpose: call_togl_cliplimit
405 DeactivateView ( me : mutable;
406 ACView : CView from Graphic3d )
408 ---Purpose: call_togl_deactivateview
410 DepthCueing ( me : mutable;
411 ACView : CView from Graphic3d;
412 AFlag : Boolean from Standard )
414 ---Purpose: call_togl_cliplimit
416 ProjectRaster ( me : mutable;
417 ACView : CView from Graphic3d;
418 AX : ShortReal from Standard;
419 AY : ShortReal from Standard;
420 AZ : ShortReal from Standard;
421 AU : out Integer from Standard;
422 AV : out Integer from Standard )
423 returns Boolean from Standard
425 ---Purpose: call_togl_unproject_raster
427 UnProjectRaster ( me : mutable;
428 ACView : CView from Graphic3d;
429 Axm : Integer from Standard;
430 Aym : Integer from Standard;
431 AXM : Integer from Standard;
432 AYM : Integer from Standard;
433 AU : Integer from Standard;
434 AV : Integer from Standard;
435 AX : out ShortReal from Standard;
436 AY : out ShortReal from Standard;
437 AZ : out ShortReal from Standard )
438 returns Boolean from Standard
440 ---Purpose: call_togl_unproject_raster
442 UnProjectRasterWithRay ( me : mutable;
443 ACView : CView from Graphic3d;
444 Axm : Integer from Standard;
445 Aym : Integer from Standard;
446 AXM : Integer from Standard;
447 AYM : Integer from Standard;
448 AU : Integer from Standard;
449 AV : Integer from Standard;
450 AX : out ShortReal from Standard;
451 AY : out ShortReal from Standard;
452 AZ : out ShortReal from Standard;
453 DX : out ShortReal from Standard;
454 DY : out ShortReal from Standard;
455 DZ : out ShortReal from Standard )
456 returns Boolean from Standard
458 ---Purpose: call_togl_unproject_raster_with_ray
460 RatioWindow ( me : mutable;
461 ACView : CView from Graphic3d )
463 ---Purpose: call_togl_ratio_window
465 Redraw ( me : mutable;
466 ACView : CView from Graphic3d;
467 ACUnderLayer : CLayer2d from Aspect;
468 ACOverLayer : CLayer2d from Aspect;
472 height : Integer = 0 )
474 ---Purpose: call_togl_redraw
476 RemoveView ( me : mutable;
477 ACView : CView from Graphic3d )
479 ---Purpose: call_togl_removeview
481 SetLight ( me : mutable;
482 ACView : CView from Graphic3d )
484 ---Purpose: call_togl_setlight
486 SetPlane ( me : mutable;
487 ACView : CView from Graphic3d )
489 ---Purpose: call_togl_setplane
491 SetVisualisation ( me : mutable;
492 ACView : CView from Graphic3d )
494 ---Purpose: call_togl_setvisualisation
496 TransformStructure ( me : mutable;
497 ACStructure : CStructure from Graphic3d )
499 ---Purpose: call_togl_transformstructure
501 DegenerateStructure ( me : mutable;
502 ACStructure : CStructure from Graphic3d )
504 ---Purpose: call_togl_degeneratestructure
506 Transparency ( me : mutable;
507 ACView : CView from Graphic3d;
508 AFlag : Boolean from Standard )
510 ---Purpose: call_togl_transparency
512 Update ( me : mutable;
513 ACView : CView from Graphic3d;
514 ACUnderLayer : CLayer2d from Aspect;
515 ACOverLayer : CLayer2d from Aspect )
517 ---Purpose: call_togl_update
520 ACView : in out CView from Graphic3d )
521 returns Boolean from Standard
523 ---Purpose: call_togl_view
525 ViewMapping ( me : mutable;
526 ACView : CView from Graphic3d;
527 AWait : Boolean from Standard )
529 ---Purpose: call_togl_viewmapping
531 ViewOrientation ( me : mutable;
532 ACView : CView from Graphic3d;
533 AWait : Boolean from Standard )
535 ---Purpose: call_togl_vieworientation
537 Environment ( me : mutable;
538 ACView : CView from Graphic3d )
542 ----------------------------------------
543 -- Category: Methods to create Marker
544 -- for Purpose : see Graphic3d_Group.cdl
545 ----------------------------------------
547 Marker ( me : mutable;
548 ACGroup : CGroup from Graphic3d;
549 APoint : Vertex from Graphic3d;
550 EvalMinMax : Boolean from Standard = Standard_True )
553 MarkerSet ( me : mutable;
554 ACGroup : CGroup from Graphic3d;
555 ListVertex : Array1OfVertex from Graphic3d;
556 EvalMinMax : Boolean from Standard = Standard_True )
559 ----------------------------------------
560 -- Category: Methods to create Polygon
561 -- for Purpose : see Graphic3d_Group.cdl
562 ----------------------------------------
564 Polygon ( me : mutable;
565 ACGroup : CGroup from Graphic3d;
566 ListVertex : Array1OfVertex from Graphic3d;
567 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
568 EvalMinMax : Boolean from Standard = Standard_True )
570 ---Purpose: call_togl_polygon
572 Polygon ( me : mutable;
573 ACGroup : CGroup from Graphic3d;
574 ListVertex : Array1OfVertex from Graphic3d;
575 Normal : Vector from Graphic3d;
576 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
577 EvalMinMax : Boolean from Standard = Standard_True )
579 ---Purpose: call_togl_polygon
581 Polygon ( me : mutable;
582 ACGroup : CGroup from Graphic3d;
583 ListVertex : Array1OfVertexN from Graphic3d;
584 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
585 EvalMinMax : Boolean from Standard = Standard_True )
587 ---Purpose: call_togl_polygon
589 Polygon ( me : mutable;
590 ACGroup : CGroup from Graphic3d;
591 ListVertex : Array1OfVertexN from Graphic3d;
592 Normal : Vector from Graphic3d;
593 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
594 EvalMinMax : Boolean from Standard = Standard_True )
596 ---Purpose: call_togl_polygon
598 Polygon ( me : mutable;
599 ACGroup : CGroup from Graphic3d;
600 ListVertex : Array1OfVertexNT from Graphic3d;
601 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
602 EvalMinMax : Boolean from Standard = Standard_True )
604 ---Purpose: call_togl_polygon
606 PolygonHoles ( me : mutable;
607 ACGroup : CGroup from Graphic3d;
608 Bounds : Array1OfInteger from TColStd;
609 ListVertex : Array1OfVertex from Graphic3d;
610 EvalMinMax : Boolean from Standard = Standard_True )
612 ---Purpose: call_togl_polygon_holes
614 PolygonHoles ( me : mutable;
615 ACGroup : CGroup from Graphic3d;
616 Bounds : Array1OfInteger from TColStd;
617 ListVertex : Array1OfVertex from Graphic3d;
618 Normal : Vector from Graphic3d;
619 EvalMinMax : Boolean from Standard = Standard_True )
621 ---Purpose: call_togl_polygon_holes
623 PolygonHoles ( me : mutable;
624 ACGroup : CGroup from Graphic3d;
625 Bounds : Array1OfInteger from TColStd;
626 ListVertex : Array1OfVertexN from Graphic3d;
627 EvalMinMax : Boolean from Standard = Standard_True )
629 ---Purpose: call_togl_polygon_holes
631 PolygonHoles ( me : mutable;
632 ACGroup : CGroup from Graphic3d;
633 Bounds : Array1OfInteger from TColStd;
634 ListVertex : Array1OfVertexN from Graphic3d;
635 Normal : Vector from Graphic3d;
636 EvalMinMax : Boolean from Standard = Standard_True )
638 ---Purpose: call_togl_polygon_holes
640 ----------------------------------------
641 -- Category: Methods to create Polyline
642 -- for Purpose : see Graphic3d_Group.cdl
643 ----------------------------------------
645 Polyline ( me : mutable;
646 ACGroup : CGroup from Graphic3d;
647 X1, Y1, Z1, X2, Y2, Z2 : Real from Standard;
648 EvalMinMax : Boolean from Standard = Standard_True )
650 ---Purpose: call_togl_polyline
652 Polyline ( me : mutable;
653 ACGroup : CGroup from Graphic3d;
654 ListVertex : Array1OfVertex from Graphic3d;
655 EvalMinMax : Boolean from Standard = Standard_True )
657 ---Purpose: call_togl_polyline
659 Polyline ( me : mutable;
660 ACGroup : CGroup from Graphic3d;
661 ListVertex : Array1OfVertexC from Graphic3d;
662 EvalMinMax : Boolean from Standard = Standard_True )
664 ---Purpose: call_togl_polyline
666 -----------------------------------------
667 -- Category: Methods to create Quadrangle
668 -- for Purpose : see Graphic3d_Group.cdl
669 -----------------------------------------
671 QuadrangleMesh ( me : mutable;
672 ACGroup : CGroup from Graphic3d;
673 ListVertex : Array2OfVertex from Graphic3d;
674 EvalMinMax : Boolean from Standard = Standard_True )
676 ---Purpose: call_togl_quadrangle
678 QuadrangleMesh ( me : mutable;
679 ACGroup : CGroup from Graphic3d;
680 ListVertex : Array2OfVertexN from Graphic3d;
681 EvalMinMax : Boolean from Standard = Standard_True )
683 ---Purpose: call_togl_quadrangle
685 QuadrangleMesh ( me : mutable;
686 ACGroup : CGroup from Graphic3d;
687 ListVertex : Array2OfVertexNT from Graphic3d;
688 EvalMinMax : Boolean from Standard = Standard_True )
690 ---Purpose: call_togl_quadrangle
692 QuadrangleSet ( me : mutable;
693 ACGroup : CGroup from Graphic3d;
694 ListVertex : Array1OfVertex from Graphic3d;
695 ListEdge : Array1OfEdge from Aspect;
696 EvalMinMax : Boolean from Standard = Standard_True )
698 ---Purpose: call_togl_polygon_indices
700 QuadrangleSet ( me : mutable;
701 ACGroup : CGroup from Graphic3d;
702 ListVertex : Array1OfVertexN from Graphic3d;
703 ListEdge : Array1OfEdge from Aspect;
704 EvalMinMax : Boolean from Standard = Standard_True )
706 ---Purpose: call_togl_polygon_indices
708 QuadrangleSet ( me : mutable;
709 ACGroup : CGroup from Graphic3d;
710 ListVertex : Array1OfVertexNT from Graphic3d;
711 ListEdge : Array1OfEdge from Aspect;
712 EvalMinMax : Boolean from Standard = Standard_True )
714 ---Purpose: call_togl_polygon_indices
716 QuadrangleSet ( me : mutable;
717 ACGroup : CGroup from Graphic3d;
718 ListVertex : Array1OfVertexC from Graphic3d;
719 ListEdge : Array1OfEdge from Aspect;
720 EvalMinMax : Boolean from Standard = Standard_True )
722 ---Purpose: call_togl_polygon_indices
724 QuadrangleSet ( me : mutable;
725 ACGroup : CGroup from Graphic3d;
726 ListVertex : Array1OfVertexNC from Graphic3d;
727 ListEdge : Array1OfEdge from Aspect;
728 EvalMinMax : Boolean from Standard = Standard_True )
730 ---Purpose: call_togl_polygon_indices
732 ----------------------------------------
733 -- Category: Methods to create Text
734 -- for Purpose : see Graphic3d_Group.cdl
735 ----------------------------------------
738 ACGroup : CGroup from Graphic3d;
739 AText : CString from Standard;
740 APoint : Vertex from Graphic3d;
741 AHeight : Real from Standard;
742 AAngle : PlaneAngle from Quantity;
743 ATp : TextPath from Graphic3d;
744 AHta : HorizontalTextAlignment from Graphic3d;
745 AVta : VerticalTextAlignment from Graphic3d;
746 EvalMinMax : Boolean from Standard = Standard_True )
748 ---Purpose: call_togl_text
751 ACGroup : CGroup from Graphic3d;
752 AText : CString from Standard;
753 APoint : Vertex from Graphic3d;
754 AHeight : Real from Standard;
755 EvalMinMax : Boolean from Standard = Standard_True )
757 ---Purpose: call_togl_text
760 ACGroup : CGroup from Graphic3d;
761 AText : ExtendedString from TCollection;
762 APoint : Vertex from Graphic3d;
763 AHeight : Real from Standard;
764 AAngle : PlaneAngle from Quantity;
765 ATp : TextPath from Graphic3d;
766 AHta : HorizontalTextAlignment from Graphic3d;
767 AVta : VerticalTextAlignment from Graphic3d;
768 EvalMinMax : Boolean from Standard = Standard_True )
770 ---Purpose: call_togl_text
773 ACGroup : CGroup from Graphic3d;
774 AText : ExtendedString from TCollection;
775 APoint : Vertex from Graphic3d;
776 AHeight : Real from Standard;
777 EvalMinMax : Boolean from Standard = Standard_True )
779 ---Purpose: call_togl_text
781 ----------------------------------------
782 ---Category: Methods to create Triangle
783 -- for Purpose : see Graphic3d_Group.cdl
784 ----------------------------------------
786 TriangleMesh ( me : mutable;
787 ACGroup : CGroup from Graphic3d;
788 ListVertex : Array1OfVertex from Graphic3d;
789 EvalMinMax : Boolean from Standard = Standard_True )
791 ---Purpose: call_togl_triangle
793 TriangleMesh ( me : mutable;
794 ACGroup : CGroup from Graphic3d;
795 ListVertex : Array1OfVertexN from Graphic3d;
796 EvalMinMax : Boolean from Standard = Standard_True )
798 ---Purpose: call_togl_triangle
800 TriangleMesh ( me : mutable;
801 ACGroup : CGroup from Graphic3d;
802 ListVertex : Array1OfVertexNT from Graphic3d;
803 EvalMinMax : Boolean from Standard = Standard_True )
805 ---Purpose: call_togl_triangle
807 TriangleSet ( me : mutable;
808 ACGroup : CGroup from Graphic3d;
809 ListVertex : Array1OfVertex from Graphic3d;
810 ListEdge : Array1OfEdge from Aspect;
811 EvalMinMax : Boolean from Standard = Standard_True )
813 ---Purpose: call_togl_polygon_indices
815 TriangleSet ( me : mutable;
816 ACGroup : CGroup from Graphic3d;
817 ListVertex : Array1OfVertexN from Graphic3d;
818 ListEdge : Array1OfEdge from Aspect;
819 EvalMinMax : Boolean from Standard = Standard_True )
821 ---Purpose: call_togl_polygon_indices
823 TriangleSet ( me : mutable;
824 ACGroup : CGroup from Graphic3d;
825 ListVertex : Array1OfVertexNT from Graphic3d;
826 ListEdge : Array1OfEdge from Aspect;
827 EvalMinMax : Boolean from Standard = Standard_True )
829 ---Purpose: call_togl_polygon_indices
831 TriangleSet ( me : mutable;
832 ACGroup : CGroup from Graphic3d;
833 ListVertex : Array1OfVertexC from Graphic3d;
834 ListEdge : Array1OfEdge from Aspect;
835 EvalMinMax : Boolean from Standard = Standard_True )
837 ---Purpose: call_togl_polygon_indices
839 TriangleSet ( me : mutable;
840 ACGroup : CGroup from Graphic3d;
841 ListVertex : Array1OfVertexNC from Graphic3d;
842 ListEdge : Array1OfEdge from Aspect;
843 EvalMinMax : Boolean from Standard = Standard_True )
845 ---Purpose: call_togl_polygon_indices
847 PrimitiveArray( me : mutable;
848 ACGroup : CGroup from Graphic3d;
849 parray : PrimitiveArray from Graphic3d;
850 EvalMinMax : Boolean from Standard = Standard_True )
852 ---Purpose: call_togl_parray
854 UserDraw( me : mutable;
855 ACGroup : CGroup from Graphic3d;
856 AUserDraw : CUserDraw from Graphic3d )
858 ---Purpose: call_togl_userdraw
860 EnableVBO( me : mutable;
861 status : Boolean from Standard )
863 ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
866 ----------------------------------------
867 ---Category: Methods to create Triedron
868 -- for Purpose : see Graphic3d_Group.cdl
869 ----------------------------------------
871 ZBufferTriedronSetup ( me : mutable;
872 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
873 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
874 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
875 SizeRatio : Real from Standard = 0.8;
876 AxisDiametr : Real from Standard = 0.05;
877 NbFacettes : Integer from Standard = 12)
879 ---Purpose: call_togl_ztriedron_setup
881 TriedronDisplay ( me : mutable;
882 ACView : CView from Graphic3d;
883 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
884 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
885 AScale : Real from Standard = 0.02;
886 AsWireframe : Boolean from Standard = Standard_True )
888 ---Purpose: call_togl_triedron_display
891 TriedronErase ( me : mutable;
892 ACView : CView from Graphic3d)
894 ---Purpose: call_togl_triedron_erase
897 TriedronEcho ( me : mutable;
898 ACView : CView from Graphic3d;
899 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
901 ---Purpose: call_togl_triedron_echo
903 ---------------------------------
904 ---Category: Graduated trihedron
905 --------------------------------
907 GraduatedTrihedronDisplay(me : mutable;
908 view : CView from Graphic3d;
909 cubic : CGraduatedTrihedron from Graphic3d)
910 ---Purpose: call_togl_graduatedtrihedron_display
913 GraduatedTrihedronErase(me : mutable;
914 view : CView from Graphic3d)
915 ---Purpose: call_togl_graduatedtrihedron_erase
918 GraduatedTrihedronMinMaxValues(me : mutable;
919 xmin : ShortReal from Standard;
920 ymin : ShortReal from Standard;
921 zmin : ShortReal from Standard;
922 xmax : ShortReal from Standard;
923 ymax : ShortReal from Standard;
924 zmax : ShortReal from Standard)
925 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
928 ----------------------------------------
929 -- Category: Internal methods
930 -- for Purpose : see Graphic3d_Group.cdl
931 ----------------------------------------
933 Bezier ( me : mutable;
934 ACGroup : CGroup from Graphic3d;
935 ListVertex : Array1OfVertex from Graphic3d;
936 EvalMinMax : Boolean from Standard = Standard_True )
938 ---Purpose: call_togl_bezier
940 Bezier ( me : mutable;
941 ACGroup : CGroup from Graphic3d;
942 ListVertex : Array1OfVertex from Graphic3d;
943 ListWeight : Array1OfReal from TColStd;
944 EvalMinMax : Boolean from Standard = Standard_True )
946 ---Purpose: call_togl_bezier_weight
948 ---------------------------
949 -- Category: Animation mode
950 ---------------------------
952 BeginAnimation ( me : mutable;
953 ACView : CView from Graphic3d)
955 ---Purpose: call_togl_begin_animation
957 EndAnimation ( me : mutable;
958 ACView : CView from Graphic3d)
960 ---Purpose: call_togl_end_animation
962 ----------------------------------
963 -- Category: Ajout mode methods
964 ----------------------------------
966 BeginAddMode ( me : mutable;
967 ACView : CView from Graphic3d)
968 returns Boolean from Standard
970 ---Purpose: call_togl_begin_ajout_mode
972 EndAddMode ( me : mutable)
974 ---Purpose: call_togl_end_ajout_mode
976 ----------------------------------
977 -- Category: Immediat mode methods
978 ----------------------------------
980 BeginImmediatMode ( me : mutable;
981 ACView : CView from Graphic3d;
982 ACUnderLayer : CLayer2d from Aspect;
983 ACOverLayer : CLayer2d from Aspect;
984 DoubleBuffer : Boolean from Standard;
985 RetainMode : Boolean from Standard)
986 returns Boolean from Standard
988 ---Purpose: call_togl_begin_immediat_mode
990 BeginPolyline ( me : mutable )
992 ---Purpose: call_togl_begin_polyline
994 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
995 aFlush : Boolean from Standard = Standard_True)
997 ---Purpose: call_togl_clear_immediat_mode
1000 X : ShortReal from Standard;
1001 Y : ShortReal from Standard;
1002 Z : ShortReal from Standard )
1003 is redefined static;
1004 ---Purpose: call_togl_draw
1006 DrawStructure ( me : mutable;
1007 ACStructure : CStructure from Graphic3d )
1008 is redefined static;
1009 ---Purpose: call_togl_draw_structure
1011 EndImmediatMode ( me : mutable;
1012 Synchronize : Integer from Standard )
1013 is redefined static;
1014 ---Purpose: call_togl_end_immediat_mode
1016 EndPolyline ( me : mutable )
1017 is redefined static;
1018 ---Purpose: call_togl_end_polyline
1020 Move ( me : mutable;
1021 X : ShortReal from Standard;
1022 Y : ShortReal from Standard;
1023 Z : ShortReal from Standard )
1024 is redefined static;
1025 ---Purpose: call_togl_move
1027 SetLineColor ( me : mutable;
1028 R : ShortReal from Standard;
1029 G : ShortReal from Standard;
1030 B : ShortReal from Standard )
1031 is redefined static;
1032 ---Purpose: call_togl_set_linecolor
1034 SetLineType ( me : mutable;
1035 Type : Integer from Standard )
1036 is redefined static;
1037 ---Purpose: call_togl_set_linetype
1039 SetLineWidth ( me : mutable;
1040 Width : ShortReal from Standard )
1041 is redefined static;
1042 ---Purpose: call_togl_set_linewidth
1044 SetMinMax ( me : mutable;
1045 X1 : ShortReal from Standard;
1046 Y1 : ShortReal from Standard;
1047 Z1 : ShortReal from Standard;
1048 X2 : ShortReal from Standard;
1049 Y2 : ShortReal from Standard;
1050 Z2 : ShortReal from Standard )
1051 is redefined static;
1052 ---Purpose: call_togl_set_minmax
1054 Transform ( me : mutable;
1055 AMatrix : Array2OfReal from TColStd;
1056 AType : TypeOfComposition from Graphic3d )
1057 is redefined static;
1058 ---Purpose: call_togl_transform
1060 -----------------------------
1061 -- Category: Textures methods
1062 -----------------------------
1065 Type : TypeOfTexture from Graphic3d;
1066 Image : AlienImage from AlienImage;
1067 FileName : CString from Standard;
1068 TexUpperBounds : HArray1OfReal from TColStd )
1069 returns Integer from Standard
1070 is redefined static;
1073 DestroyTexture ( me;
1074 TexId : Integer from Standard )
1075 is redefined static;
1079 TexId : Integer from Standard;
1080 AValue : CInitTexture from Graphic3d )
1081 is redefined static;
1084 -------------------------------
1085 -- Category: Layer mode methods
1086 -------------------------------
1088 Layer ( me : mutable;
1089 ACLayer : in out CLayer2d from Aspect )
1090 is redefined static;
1091 ---Purpose: call_togl_layer2d
1093 RemoveLayer ( me : mutable;
1094 ACLayer : CLayer2d from Aspect )
1095 is redefined static;
1096 ---Purpose: call_togl_removelayer2d
1098 BeginLayer ( me : mutable;
1099 ACLayer : CLayer2d from Aspect )
1100 is redefined static;
1101 ---Purpose: call_togl_begin_layer2d
1103 BeginPolygon2d ( me : mutable )
1104 is redefined static;
1105 ---Purpose: call_togl_begin_polygon2d
1107 BeginPolyline2d ( me : mutable )
1108 is redefined static;
1109 ---Purpose: call_togl_begin_polyline2d
1111 ClearLayer ( me : mutable;
1112 ACLayer : CLayer2d from Aspect )
1113 is redefined static;
1114 ---Purpose: call_togl_clear_layer2d
1116 Draw ( me : mutable;
1117 X : ShortReal from Standard;
1118 Y : ShortReal from Standard )
1119 is redefined static;
1120 ---Purpose: call_togl_draw2d
1122 Edge ( me : mutable;
1123 X : ShortReal from Standard;
1124 Y : ShortReal from Standard )
1125 is redefined static;
1126 ---Purpose: call_togl_edge2d
1128 EndLayer ( me : mutable )
1129 is redefined static;
1130 ---Purpose: call_togl_end_layer2d
1132 EndPolygon2d ( me : mutable )
1133 is redefined static;
1134 ---Purpose: call_togl_end_polygon2d
1136 EndPolyline2d ( me : mutable )
1137 is redefined static;
1138 ---Purpose: call_togl_end_polyline2d
1140 Move ( me : mutable;
1141 X : ShortReal from Standard;
1142 Y : ShortReal from Standard )
1143 is redefined static;
1144 ---Purpose: call_togl_move2d
1146 Rectangle ( me : mutable;
1147 X, Y : ShortReal from Standard;
1148 Width, Height : ShortReal from Standard )
1149 is redefined static;
1150 ---Purpose: call_togl_rectangle2d
1152 SetColor ( me : mutable;
1153 R : ShortReal from Standard;
1154 G : ShortReal from Standard;
1155 B : ShortReal from Standard )
1156 is redefined static;
1157 ---Purpose: call_togl_set_color
1159 SetTransparency ( me : mutable;
1160 ATransparency : ShortReal from Standard )
1161 is redefined static;
1162 ---Purpose: call_togl_set_transparency
1164 UnsetTransparency ( me : mutable )
1165 is redefined static;
1166 ---Purpose: call_togl_unset_transparency
1168 SetLineAttributes ( me : mutable;
1169 Type : Integer from Standard;
1170 Width : ShortReal from Standard )
1171 is redefined static;
1172 ---Purpose: call_togl_set_line_attributes
1174 SetTextAttributes ( me : mutable;
1175 FontName : CString from Standard;
1176 Type : Integer from Standard;
1177 R : ShortReal from Standard;
1178 G : ShortReal from Standard;
1179 B : ShortReal from Standard )
1180 is redefined static;
1181 ---Purpose: call_togl_set_text_attributes
1184 Text ( me : mutable;
1185 AText : CString from Standard;
1186 X, Y : ShortReal from Standard;
1187 AHeight : ShortReal from Standard )
1188 is redefined static;
1189 ---Purpose: call_togl_text2d
1192 AText : CString from Standard;
1193 AHeight : ShortReal from Standard;
1194 AWidth : in out ShortReal from Standard;
1195 AnAscent : in out ShortReal from Standard;
1196 ADescent : in out ShortReal from Standard )
1197 is redefined static;
1198 ---Purpose: call_togl_textsize2d
1200 SetBackFacingModel ( me : mutable;
1201 aView : CView from Graphic3d )
1202 is redefined static;
1203 ---Purpose: call_togl_backfacing
1206 ACView : CView from Graphic3d;
1207 ACUnderLayer : CLayer2d from Aspect;
1208 ACOverLayer : CLayer2d from Aspect;
1209 hPrnDC : Handle from Aspect;
1210 showBackground : Boolean;
1212 is redefined static;
1214 ---Purpose: print the contents of all layers of the view to the printer.
1215 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
1216 -- <showBackground> : When set to FALSE then print the view without background color
1217 -- (background is white)
1218 -- else set to TRUE for printing with current background color.
1219 -- <filename>: If != NULL, then the view will be printed to a file.
1220 ---Warning: Works only under Windows.
1223 Export( me: mutable;
1224 FileName : CString from Standard;
1225 Format : ExportFormat from Graphic3d;
1226 SortType : SortType from Graphic3d;
1227 W, H : Integer from Standard;
1228 View : CView from Graphic3d;
1229 Under, Over : CLayer2d from Aspect;
1230 Precision : Real from Standard = 0.005;
1231 ProgressBarFunc : Address from Standard = NULL;
1232 ProgressObject : Address from Standard = NULL ) is redefined virtual;
1235 SetDepthTestEnabled( me; view : CView from Graphic3d;
1236 isEnabled : Boolean from Standard )
1237 is redefined static;
1238 ---Purpose: call_togl_depthtest()
1240 IsDepthTestEnabled( me; view : CView from Graphic3d )
1241 returns Boolean from Standard is redefined static;
1242 ---Purpose: call_togl_isdepthtest()
1244 ReadDepths( me; view : CView from Graphic3d;
1246 width, height : Integer;
1248 is redefined static;
1249 ---Purpose: Reads depths of shown pixels of the given
1250 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
1252 FBOCreate( me : mutable;
1253 view : CView from Graphic3d;
1254 width, height : Integer from Standard )
1255 returns PtrFrameBuffer from Graphic3d
1256 is redefined static;
1257 ---Purpose: Generate offscreen FBO (needs OpenGL2+ hardware)
1258 -- If not supported on hardware returns NULL.
1260 FBORelease( me : mutable;
1261 view : CView from Graphic3d;
1262 fboPtr : in out PtrFrameBuffer from Graphic3d )
1263 is redefined static;
1264 ---Purpose: Remove offscreen FBO
1266 FBOGetDimensions( me : mutable;
1267 view : CView from Graphic3d;
1268 fboPtr : PtrFrameBuffer from Graphic3d;
1269 width, height : out Integer from Standard;
1270 widthMax, heightMax : out Integer from Standard )
1271 is redefined static;
1272 ---Purpose: Read offscreen FBO configuration.
1274 FBOChangeViewport( me : mutable;
1275 view : CView from Graphic3d;
1276 fboPtr : in out PtrFrameBuffer from Graphic3d;
1277 width, height : Integer from Standard )
1278 is redefined static;
1279 ---Purpose: Change offscreen FBO viewport.
1281 BufferDump( me : mutable;
1282 view : CView from Graphic3d;
1283 buffer : in out CRawBufferData from Image )
1284 returns Boolean from Standard
1285 is redefined static;
1286 ---Purpose: Dump active rendering buffer into specified memory buffer.
1288 SetGLLightEnabled( me; view : CView from Graphic3d;
1289 isEnabled : Boolean from Standard )
1290 is redefined static;
1291 ---Purpose: call_togl_gllight()
1293 IsGLLightEnabled( me; view : CView from Graphic3d )
1294 returns Boolean from Standard is redefined static;
1295 ---Purpose: call_togl_isgllight()
1297 --ListOfAvalableFontNames( me;
1298 -- lst: out NListOfHAsciiString from Graphic3d )
1299 -- returns Boolean from Standard
1301 -- Purpose: Initialize list of names of avalable system fonts
1302 -- returns Standard_False if fails
1303 -- ABD Integration support of system fonts (using FTGL and FreeType)
1305 end GraphicDriver from OpenGl;