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 GetGraduatedTrihedron(me;
908 view : CView from Graphic3d;
910 xname : out CString from Standard;
911 yname : out CString from Standard;
912 zname : out CString from Standard;
914 xdrawname : out Boolean from Standard;
915 ydrawname : out Boolean from Standard;
916 zdrawname : out Boolean from Standard;
918 xdrawvalues : out Boolean from Standard;
919 ydrawvalues : out Boolean from Standard;
920 zdrawvalues : out Boolean from Standard;
922 drawgrid : out Boolean from Standard;
924 drawaxes : out Boolean from Standard;
925 -- Number of splits along axes --
926 nbx : out Integer from Standard;
927 nby : out Integer from Standard;
928 nbz : out Integer from Standard;
929 -- Offset for drawing values --
930 xoffset : out Integer from Standard;
931 yoffset : out Integer from Standard;
932 zoffset : out Integer from Standard;
933 -- Offset for drawing names of axes --
934 xaxisoffset : out Integer from Standard;
935 yaxisoffset : out Integer from Standard;
936 zaxisoffset : out Integer from Standard;
938 xdrawtickmarks : out Boolean from Standard;
939 ydrawtickmarks : out Boolean from Standard;
940 zdrawtickmarks : out Boolean from Standard;
941 -- Length of tickmarks --
942 xtickmarklength : out Integer from Standard;
943 ytickmarklength : out Integer from Standard;
944 ztickmarklength : out Integer from Standard;
946 gridcolor : out Color from Quantity;
948 xnamecolor : out Color from Quantity;
950 ynamecolor : out Color from Quantity;
952 znamecolor : out Color from Quantity;
953 -- X color of axis and values --
954 xcolor : out Color from Quantity;
955 -- Y color of axis and values --
956 ycolor : out Color from Quantity;
957 -- Z color of axis and values --
958 zcolor : out Color from Quantity;
959 -- Name of font for names of axes --
960 fontOfNames : out CString from Standard;
961 -- Style of names of axes --
962 styleOfNames : out FontAspect from OSD;
963 -- Size of names of axes --
964 sizeOfNames : out Integer from Standard;
965 -- Name of font for values --
966 fontOfValues : out CString from Standard;
967 -- Style of values --
968 styleOfValues : out FontAspect from OSD;
970 sizeOfValues : out Integer from Standard)
971 ---Purpose: call_togl_graduatedtrihedron_get
974 GraduatedTrihedronDisplay(me : mutable;
975 view : CView from Graphic3d;
976 cubic : in out CGraduatedTrihedron from Graphic3d;
978 xname : CString from Standard;
979 yname : CString from Standard;
980 zname : CString from Standard;
982 xdrawname : Boolean from Standard;
983 ydrawname : Boolean from Standard;
984 zdrawname : Boolean from Standard;
986 xdrawvalues : Boolean from Standard;
987 ydrawvalues : Boolean from Standard;
988 zdrawvalues : Boolean from Standard;
990 drawgrid : Boolean from Standard;
992 drawaxes : Boolean from Standard;
993 -- Number of splits along axes --
994 nbx : Integer from Standard;
995 nby : Integer from Standard;
996 nbz : Integer from Standard;
997 -- Offset for drawing values --
998 xoffset : Integer from Standard;
999 yoffset : Integer from Standard;
1000 zoffset : Integer from Standard;
1001 -- Offset for drawing names of axes --
1002 xaxisoffset : Integer from Standard;
1003 yaxisoffset : Integer from Standard;
1004 zaxisoffset : Integer from Standard;
1005 -- Draw tickmarks --
1006 xdrawtickmarks : Boolean from Standard;
1007 ydrawtickmarks : Boolean from Standard;
1008 zdrawtickmarks : Boolean from Standard;
1009 -- Length of tickmarks --
1010 xtickmarklength : Integer from Standard;
1011 ytickmarklength : Integer from Standard;
1012 ztickmarklength : Integer from Standard;
1014 gridcolor : Color from Quantity;
1016 xnamecolor : Color from Quantity;
1018 ynamecolor : Color from Quantity;
1020 znamecolor : Color from Quantity;
1021 -- X color of axis and values --
1022 xcolor : Color from Quantity;
1023 -- Y color of axis and values --
1024 ycolor : Color from Quantity;
1025 -- Z color of axis and values --
1026 zcolor : Color from Quantity;
1027 -- Name of font for names of axes --
1028 fontOfNames : CString from Standard;
1029 -- Style of names of axes --
1030 styleOfNames : FontAspect from OSD;
1031 -- Size of names of axes --
1032 sizeOfNames : Integer from Standard;
1033 -- Name of font for values --
1034 fontOfValues : CString from Standard;
1035 -- Style of values --
1036 styleOfValues : FontAspect from OSD;
1037 -- Size of values --
1038 sizeOfValues : Integer from Standard)
1039 ---Purpose: call_togl_graduatedtrihedron_display
1040 is redefined static;
1042 GraduatedTrihedronErase(me : mutable;
1043 view : CView from Graphic3d)
1044 ---Purpose: call_togl_graduatedtrihedron_erase
1045 is redefined static;
1047 GraduatedTrihedronMinMaxValues(me : mutable;
1048 xmin : ShortReal from Standard;
1049 ymin : ShortReal from Standard;
1050 zmin : ShortReal from Standard;
1051 xmax : ShortReal from Standard;
1052 ymax : ShortReal from Standard;
1053 zmax : ShortReal from Standard)
1054 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
1055 is redefined static;
1057 ----------------------------------------
1058 -- Category: Internal methods
1059 -- for Purpose : see Graphic3d_Group.cdl
1060 ----------------------------------------
1062 Bezier ( me : mutable;
1063 ACGroup : CGroup from Graphic3d;
1064 ListVertex : Array1OfVertex from Graphic3d;
1065 EvalMinMax : Boolean from Standard = Standard_True )
1066 is redefined static;
1067 ---Purpose: call_togl_bezier
1069 Bezier ( me : mutable;
1070 ACGroup : CGroup from Graphic3d;
1071 ListVertex : Array1OfVertex from Graphic3d;
1072 ListWeight : Array1OfReal from TColStd;
1073 EvalMinMax : Boolean from Standard = Standard_True )
1074 is redefined static;
1075 ---Purpose: call_togl_bezier_weight
1077 ---------------------------
1078 -- Category: Animation mode
1079 ---------------------------
1081 BeginAnimation ( me : mutable;
1082 ACView : CView from Graphic3d)
1083 is redefined static;
1084 ---Purpose: call_togl_begin_animation
1086 EndAnimation ( me : mutable;
1087 ACView : CView from Graphic3d)
1088 is redefined static;
1089 ---Purpose: call_togl_end_animation
1091 ----------------------------------
1092 -- Category: Ajout mode methods
1093 ----------------------------------
1095 BeginAddMode ( me : mutable;
1096 ACView : CView from Graphic3d)
1097 returns Boolean from Standard
1098 is redefined static;
1099 ---Purpose: call_togl_begin_ajout_mode
1101 EndAddMode ( me : mutable)
1102 is redefined static;
1103 ---Purpose: call_togl_end_ajout_mode
1105 ----------------------------------
1106 -- Category: Immediat mode methods
1107 ----------------------------------
1109 BeginImmediatMode ( me : mutable;
1110 ACView : CView from Graphic3d;
1111 ACUnderLayer : CLayer2d from Aspect;
1112 ACOverLayer : CLayer2d from Aspect;
1113 DoubleBuffer : Boolean from Standard;
1114 RetainMode : Boolean from Standard)
1115 returns Boolean from Standard
1116 is redefined static;
1117 ---Purpose: call_togl_begin_immediat_mode
1119 BeginPolyline ( me : mutable )
1120 is redefined static;
1121 ---Purpose: call_togl_begin_polyline
1123 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
1124 aFlush : Boolean from Standard = Standard_True)
1125 is redefined static;
1126 ---Purpose: call_togl_clear_immediat_mode
1128 Draw ( me : mutable;
1129 X : ShortReal from Standard;
1130 Y : ShortReal from Standard;
1131 Z : ShortReal from Standard )
1132 is redefined static;
1133 ---Purpose: call_togl_draw
1135 DrawStructure ( me : mutable;
1136 ACStructure : CStructure from Graphic3d )
1137 is redefined static;
1138 ---Purpose: call_togl_draw_structure
1140 EndImmediatMode ( me : mutable;
1141 Synchronize : Integer from Standard )
1142 is redefined static;
1143 ---Purpose: call_togl_end_immediat_mode
1145 EndPolyline ( me : mutable )
1146 is redefined static;
1147 ---Purpose: call_togl_end_polyline
1149 Move ( me : mutable;
1150 X : ShortReal from Standard;
1151 Y : ShortReal from Standard;
1152 Z : ShortReal from Standard )
1153 is redefined static;
1154 ---Purpose: call_togl_move
1156 SetLineColor ( me : mutable;
1157 R : ShortReal from Standard;
1158 G : ShortReal from Standard;
1159 B : ShortReal from Standard )
1160 is redefined static;
1161 ---Purpose: call_togl_set_linecolor
1163 SetLineType ( me : mutable;
1164 Type : Integer from Standard )
1165 is redefined static;
1166 ---Purpose: call_togl_set_linetype
1168 SetLineWidth ( me : mutable;
1169 Width : ShortReal from Standard )
1170 is redefined static;
1171 ---Purpose: call_togl_set_linewidth
1173 SetMinMax ( me : mutable;
1174 X1 : ShortReal from Standard;
1175 Y1 : ShortReal from Standard;
1176 Z1 : ShortReal from Standard;
1177 X2 : ShortReal from Standard;
1178 Y2 : ShortReal from Standard;
1179 Z2 : ShortReal from Standard )
1180 is redefined static;
1181 ---Purpose: call_togl_set_minmax
1183 Transform ( me : mutable;
1184 AMatrix : Array2OfReal from TColStd;
1185 AType : TypeOfComposition from Graphic3d )
1186 is redefined static;
1187 ---Purpose: call_togl_transform
1189 -----------------------------
1190 -- Category: Textures methods
1191 -----------------------------
1194 Type : TypeOfTexture from Graphic3d;
1195 Image : AlienImage from AlienImage;
1196 FileName : CString from Standard;
1197 TexUpperBounds : HArray1OfReal from TColStd )
1198 returns Integer from Standard
1199 is redefined static;
1202 DestroyTexture ( me;
1203 TexId : Integer from Standard )
1204 is redefined static;
1208 TexId : Integer from Standard;
1209 AValue : CInitTexture from Graphic3d )
1210 is redefined static;
1213 -------------------------------
1214 -- Category: Layer mode methods
1215 -------------------------------
1217 Layer ( me : mutable;
1218 ACLayer : in out CLayer2d from Aspect )
1219 is redefined static;
1220 ---Purpose: call_togl_layer2d
1222 RemoveLayer ( me : mutable;
1223 ACLayer : CLayer2d from Aspect )
1224 is redefined static;
1225 ---Purpose: call_togl_removelayer2d
1227 BeginLayer ( me : mutable;
1228 ACLayer : CLayer2d from Aspect )
1229 is redefined static;
1230 ---Purpose: call_togl_begin_layer2d
1232 BeginPolygon2d ( me : mutable )
1233 is redefined static;
1234 ---Purpose: call_togl_begin_polygon2d
1236 BeginPolyline2d ( me : mutable )
1237 is redefined static;
1238 ---Purpose: call_togl_begin_polyline2d
1240 ClearLayer ( me : mutable;
1241 ACLayer : CLayer2d from Aspect )
1242 is redefined static;
1243 ---Purpose: call_togl_clear_layer2d
1245 Draw ( me : mutable;
1246 X : ShortReal from Standard;
1247 Y : ShortReal from Standard )
1248 is redefined static;
1249 ---Purpose: call_togl_draw2d
1251 Edge ( me : mutable;
1252 X : ShortReal from Standard;
1253 Y : ShortReal from Standard )
1254 is redefined static;
1255 ---Purpose: call_togl_edge2d
1257 EndLayer ( me : mutable )
1258 is redefined static;
1259 ---Purpose: call_togl_end_layer2d
1261 EndPolygon2d ( me : mutable )
1262 is redefined static;
1263 ---Purpose: call_togl_end_polygon2d
1265 EndPolyline2d ( me : mutable )
1266 is redefined static;
1267 ---Purpose: call_togl_end_polyline2d
1269 Move ( me : mutable;
1270 X : ShortReal from Standard;
1271 Y : ShortReal from Standard )
1272 is redefined static;
1273 ---Purpose: call_togl_move2d
1275 Rectangle ( me : mutable;
1276 X, Y : ShortReal from Standard;
1277 Width, Height : ShortReal from Standard )
1278 is redefined static;
1279 ---Purpose: call_togl_rectangle2d
1281 SetColor ( me : mutable;
1282 R : ShortReal from Standard;
1283 G : ShortReal from Standard;
1284 B : ShortReal from Standard )
1285 is redefined static;
1286 ---Purpose: call_togl_set_color
1288 SetTransparency ( me : mutable;
1289 ATransparency : ShortReal from Standard )
1290 is redefined static;
1291 ---Purpose: call_togl_set_transparency
1293 UnsetTransparency ( me : mutable )
1294 is redefined static;
1295 ---Purpose: call_togl_unset_transparency
1297 SetLineAttributes ( me : mutable;
1298 Type : Integer from Standard;
1299 Width : ShortReal from Standard )
1300 is redefined static;
1301 ---Purpose: call_togl_set_line_attributes
1303 SetTextAttributes ( me : mutable;
1304 FontName : CString from Standard;
1305 Type : Integer from Standard;
1306 R : ShortReal from Standard;
1307 G : ShortReal from Standard;
1308 B : ShortReal from Standard )
1309 is redefined static;
1310 ---Purpose: call_togl_set_text_attributes
1313 Text ( me : mutable;
1314 AText : CString from Standard;
1315 X, Y : ShortReal from Standard;
1316 AHeight : ShortReal from Standard )
1317 is redefined static;
1318 ---Purpose: call_togl_text2d
1321 AText : CString from Standard;
1322 AHeight : ShortReal from Standard;
1323 AWidth : in out ShortReal from Standard;
1324 AnAscent : in out ShortReal from Standard;
1325 ADescent : in out ShortReal from Standard )
1326 is redefined static;
1327 ---Purpose: call_togl_textsize2d
1329 SetBackFacingModel ( me : mutable;
1330 aView : CView from Graphic3d )
1331 is redefined static;
1332 ---Purpose: call_togl_backfacing
1335 ACView : CView from Graphic3d;
1336 ACUnderLayer : CLayer2d from Aspect;
1337 ACOverLayer : CLayer2d from Aspect;
1338 hPrnDC : Handle from Aspect;
1339 showBackground : Boolean;
1341 is redefined static;
1343 ---Purpose: print the contents of all layers of the view to the printer.
1344 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
1345 -- <showBackground> : When set to FALSE then print the view without background color
1346 -- (background is white)
1347 -- else set to TRUE for printing with current background color.
1348 -- <filename>: If != NULL, then the view will be printed to a file.
1349 ---Warning: Works only under Windows.
1352 Export( me: mutable;
1353 FileName : CString from Standard;
1354 Format : ExportFormat from Graphic3d;
1355 SortType : SortType from Graphic3d;
1356 W, H : Integer from Standard;
1357 View : CView from Graphic3d;
1358 Under, Over : CLayer2d from Aspect;
1359 Precision : Real from Standard = 0.005;
1360 ProgressBarFunc : Address from Standard = NULL;
1361 ProgressObject : Address from Standard = NULL ) is redefined virtual;
1364 SetDepthTestEnabled( me; view : CView from Graphic3d;
1365 isEnabled : Boolean from Standard )
1366 is redefined static;
1367 ---Purpose: call_togl_depthtest()
1369 IsDepthTestEnabled( me; view : CView from Graphic3d )
1370 returns Boolean from Standard is redefined static;
1371 ---Purpose: call_togl_isdepthtest()
1373 ReadDepths( me; view : CView from Graphic3d;
1375 width, height : Integer;
1377 is redefined static;
1378 ---Purpose: Reads depths of shown pixels of the given
1379 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
1381 FBOCreate( me : mutable;
1382 view : CView from Graphic3d;
1383 width, height : Integer from Standard )
1384 returns PtrFrameBuffer from Graphic3d
1385 is redefined static;
1386 ---Purpose: Generate offscreen FBO (needs OpenGL2+ hardware)
1387 -- If not supported on hardware returns NULL.
1389 FBORelease( me : mutable;
1390 view : CView from Graphic3d;
1391 fboPtr : in out PtrFrameBuffer from Graphic3d )
1392 is redefined static;
1393 ---Purpose: Remove offscreen FBO
1395 FBOGetDimensions( me : mutable;
1396 view : CView from Graphic3d;
1397 fboPtr : PtrFrameBuffer from Graphic3d;
1398 width, height : out Integer from Standard;
1399 widthMax, heightMax : out Integer from Standard )
1400 is redefined static;
1401 ---Purpose: Read offscreen FBO configuration.
1403 FBOChangeViewport( me : mutable;
1404 view : CView from Graphic3d;
1405 fboPtr : in out PtrFrameBuffer from Graphic3d;
1406 width, height : Integer from Standard )
1407 is redefined static;
1408 ---Purpose: Change offscreen FBO viewport.
1410 BufferDump( me : mutable;
1411 view : CView from Graphic3d;
1412 buffer : in out CRawBufferData from Image )
1413 returns Boolean from Standard
1414 is redefined static;
1415 ---Purpose: Dump active rendering buffer into specified memory buffer.
1417 SetGLLightEnabled( me; view : CView from Graphic3d;
1418 isEnabled : Boolean from Standard )
1419 is redefined static;
1420 ---Purpose: call_togl_gllight()
1422 IsGLLightEnabled( me; view : CView from Graphic3d )
1423 returns Boolean from Standard is redefined static;
1424 ---Purpose: call_togl_isgllight()
1426 --ListOfAvalableFontNames( me;
1427 -- lst: out NListOfHAsciiString from Graphic3d )
1428 -- returns Boolean from Standard
1430 -- Purpose: Initialize list of names of avalable system fonts
1431 -- returns Standard_False if fails
1432 -- ABD Integration support of system fonts (using FTGL and FreeType)
1434 end GraphicDriver from OpenGl;