0023634: Eliminate Polyline and Polygon usage in drawers
[occt.git] / src / Graphic3d / Graphic3d_GraphicDriver.cdl
CommitLineData
b311480e 1-- Created on: 1997-01-28
2-- Created by: CAL
3-- Copyright (c) 1997-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
7fd59977 5--
b311480e 6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21deferred class GraphicDriver from Graphic3d inherits GraphicDriver from Aspect
22
23 ---Version:
24
2166f0fa
SK
25 ---Purpose: This class allows the definition of a graphic driver
26 -- (currently only OpenGl driver is used).
7fd59977 27
2166f0fa 28 ---Keywords: OpenGl
7fd59977 29
30 ---Warning:
31 ---References:
32
33uses
34
35 SharedLibrary from OSD,
36
37 Array1OfInteger from TColStd,
38 Array1OfReal from TColStd,
39 Array2OfReal from TColStd,
40
f0430952 41 AsciiString from TCollection,
7fd59977 42 ExtendedString from TCollection,
43
44 NameOfColor from Quantity,
45 Color from Quantity,
46
47 PlaneAngle from Quantity,
48
49 AlienImage from AlienImage,
692613e5 50 PixMap from Image,
7fd59977 51
52 Array1OfEdge from Aspect,
53 CLayer2d from Aspect,
54 GraphicDriver from Aspect,
55 TypeOfTriedronEcho from Aspect,
56 TypeOfTriedronPosition from Aspect,
57 Handle from Aspect,
58 Display from Aspect,
7edf74fd 59 PrintAlgo from Aspect,
7fd59977 60
61 AspectLine3d from Graphic3d,
62 AspectMarker3d from Graphic3d,
63 AspectText3d from Graphic3d,
64 AspectFillArea3d from Graphic3d,
65 HorizontalTextAlignment from Graphic3d,
66 CBitFields20 from Graphic3d,
67 CGroup from Graphic3d,
68 CLight from Graphic3d,
69 CPick from Graphic3d,
70 CPlane from Graphic3d,
71 CStructure from Graphic3d,
72 CView from Graphic3d,
692613e5 73 BufferType from Graphic3d,
7fd59977 74 Structure from Graphic3d,
75 TextPath from Graphic3d,
76 TypeOfComposition from Graphic3d,
7fd59977 77 TypeOfPrimitive from Graphic3d,
78 Vector from Graphic3d,
79 Array1OfVertex from Graphic3d,
80 Array2OfVertex from Graphic3d,
81 Vertex from Graphic3d,
7fd59977 82 VerticalTextAlignment from Graphic3d,
7fd59977 83 PrimitiveArray from Graphic3d,
84 PtrFrameBuffer from Graphic3d,
85 HArray1OfByte from TColStd,
86 FillMethod from Aspect,
87 GradientFillMethod from Aspect,
88 ExportFormat from Graphic3d,
89 SortType from Graphic3d,
90 HArray1OfReal from TColStd,
91 CUserDraw from Graphic3d,
92 NListOfHAsciiString from Graphic3d,
eeaaaefb 93 FontAspect from Font,
7fd59977 94 CGraduatedTrihedron from Graphic3d
95
96raises
97
98 TransformError from Graphic3d
99
100is
101 Initialize ( AShrName : CString from Standard )
102 returns mutable GraphicDriver from Graphic3d;
103 ---Level: Public
104 ---Purpose: Initialises the Driver
105
106 -------------------------
107 -- Category: Init methods
108 -------------------------
109
110 Begin ( me : mutable;
111 ADisplay : CString from Standard )
112 returns Boolean from Standard
113 is deferred;
114 ---Purpose: call_togl_begin
115
116 Begin ( me : mutable;
117 ADisplay : Display from Aspect )
118 returns Boolean from Standard
119 is deferred;
120 ---Purpose: call_togl_begin_display
121
122 End ( me : mutable )
123 is deferred;
124 ---Purpose: call_togl_end
125
126 ----------------------------
127 -- Category: Inquire methods
128 ----------------------------
129
130 InquireLightLimit ( me : mutable )
131 returns Integer from Standard
132 is deferred;
133 ---Purpose: call_togl_inquirelight
134
135 InquireMat ( me : mutable;
136 ACView : CView from Graphic3d;
137 AMatO : out Array2OfReal from TColStd;
138 AMatM : out Array2OfReal from TColStd )
139 is deferred;
140 ---Purpose: call_togl_inquiremat
141
142 InquirePlaneLimit ( me : mutable )
143 returns Integer from Standard
144 is deferred;
145 ---Purpose: call_togl_inquireplane
146
147 InquireViewLimit ( me : mutable )
148 returns Integer from Standard
149 is deferred;
150 ---Purpose: call_togl_inquireview
151
7fd59977 152 ------------------------------
153 -- Category: Highlight methods
154 ------------------------------
155
156 Blink ( me : mutable;
157 ACStructure : CStructure from Graphic3d;
158 Create : Boolean from Standard )
159 is deferred;
160 ---Purpose: call_togl_blink
161
162 BoundaryBox ( me : mutable;
163 ACStructure : CStructure from Graphic3d;
164 Create : Boolean from Standard )
165 is deferred;
166 ---Purpose: call_togl_boundarybox
167
168 HighlightColor ( me : mutable;
169 ACStructure : CStructure from Graphic3d;
170 R : ShortReal from Standard;
171 G : ShortReal from Standard;
172 B : ShortReal from Standard;
173 Create : Boolean from Standard )
174 is deferred;
175 ---Purpose: call_togl_highlightcolor
176
177 NameSetStructure ( me : mutable;
178 ACStructure : CStructure from Graphic3d )
179 is deferred;
180 ---Purpose: call_togl_namesetstructure
181
182 -------------------------------------
183 -- Category: Group management methods
184 -------------------------------------
185
186 ClearGroup ( me : mutable;
187 ACGroup : CGroup from Graphic3d )
188 is deferred;
189 ---Purpose: call_togl_cleargroup
190
7fd59977 191 FaceContextGroup ( me : mutable;
192 ACGroup : CGroup from Graphic3d;
193 NoInsert : Integer from Standard )
194 is deferred;
195 ---Purpose: call_togl_facecontextgroup
196
197 Group ( me : mutable;
198 ACGroup : in out CGroup from Graphic3d )
199 is deferred;
200 ---Purpose: call_togl_group
201
202 LineContextGroup ( me : mutable;
203 ACGroup : CGroup from Graphic3d;
204 NoInsert : Integer from Standard )
205 is deferred;
206 ---Purpose: call_togl_linecontextgroup
207
208 MarkerContextGroup ( me : mutable;
209 ACGroup : CGroup from Graphic3d;
210 NoInsert : Integer from Standard )
211 is deferred;
212 ---Purpose: call_togl_markercontextgroup
213
214 MarkerContextGroup ( me : mutable;
215 ACGroup : CGroup from Graphic3d;
216 NoInsert : Integer from Standard;
217 AMarkWidth : Integer from Standard;
218 AMarkHeight: Integer from Standard;
219 ATexture : HArray1OfByte from TColStd )
220 is deferred;
221 ---Purpose: call_togl_markercontextgroup
222
7fd59977 223 RemoveGroup ( me : mutable;
224 ACGroup : CGroup from Graphic3d )
225 is deferred;
226 ---Purpose: call_togl_removegroup
227
228 TextContextGroup ( me : mutable;
229 ACGroup : CGroup from Graphic3d;
230 NoInsert : Integer from Standard )
231 is deferred;
232 ---Purpose: call_togl_textcontextgroup
233
234 -----------------------------------------
235 -- Category: Structure management methods
236 -----------------------------------------
237
238 ClearStructure ( me : mutable;
239 ACStructure : CStructure from Graphic3d )
240 is deferred;
241 ---Purpose: call_togl_clearstructure
242
243 Connect ( me : mutable;
244 AFather : CStructure from Graphic3d;
245 ASon : CStructure from Graphic3d )
246 is deferred;
247 ---Purpose: call_togl_connect
248
249 ContextStructure ( me : mutable;
250 ACStructure : CStructure from Graphic3d )
251 is deferred;
252 ---Purpose: call_togl_contextstructure
253
254 Disconnect ( me : mutable;
255 AFather : CStructure from Graphic3d;
256 ASon : CStructure from Graphic3d )
257 is deferred;
258 ---Purpose: call_togl_disconnect
259
260 DisplayStructure ( me : mutable;
261 ACView : CView from Graphic3d;
262 ACStructure : CStructure from Graphic3d;
263 APriority : Integer from Standard )
264 is deferred;
265 ---Purpose: call_togl_displaystructure
266
267 EraseStructure ( me : mutable;
268 ACView : CView from Graphic3d;
269 ACStructure : CStructure from Graphic3d )
270 is deferred;
271 ---Purpose: call_togl_erasestructure
272
273 RemoveStructure ( me : mutable;
274 ACStructure : CStructure from Graphic3d )
275 is deferred;
276 ---Purpose: call_togl_removestructure
277
278 Structure ( me : mutable;
279 ACStructure : in out CStructure from Graphic3d )
280 is deferred;
281 ---Purpose: call_togl_structure
282
7fd59977 283 ------------------------------------
284 -- Category: Structured mode methods
285 ------------------------------------
286
287 ActivateView ( me : mutable;
288 ACView : CView from Graphic3d )
289 is deferred;
290 ---Purpose: call_togl_activateview
291
292 AntiAliasing ( me : mutable;
293 ACView : CView from Graphic3d;
294 AFlag : Boolean from Standard )
295 is deferred;
296 ---Purpose: call_togl_antialiasing
297
298 Background ( me : mutable;
299 ACView : CView from Graphic3d )
300 is deferred;
301 ---Purpose: call_togl_background
302
303 GradientBackground ( me : mutable;
304 ACView : CView from Graphic3d;
305 AColor1: Color from Quantity;
306 AColor2: Color from Quantity;
307 FillStyle : GradientFillMethod from Aspect
308 )
2166f0fa 309 is deferred;
7fd59977 310 ---Purpose: call_togl_gradient_background
311
312
313 BackgroundImage( me : mutable;
314 FileName : CString from Standard;
315 ACView : CView from Graphic3d;
316 FillStyle : FillMethod from Aspect )
317 is deferred;
318
319 SetBgImageStyle( me : mutable;
320 ACView : CView from Graphic3d;
321 FillStyle : FillMethod from Aspect )
322 is deferred;
323
324 SetBgGradientStyle( me : mutable;
325 ACView : CView from Graphic3d;
326 FillStyle : GradientFillMethod from Aspect )
2166f0fa 327 is deferred;
7fd59977 328
329 ClipLimit ( me : mutable;
330 ACView : CView from Graphic3d;
331 AWait : Boolean from Standard )
332 is deferred;
333 ---Purpose: call_togl_cliplimit
334
335 DeactivateView ( me : mutable;
336 ACView : CView from Graphic3d )
337 is deferred;
338 ---Purpose: call_togl_deactivateview
339
340 DepthCueing ( me : mutable;
341 ACView : CView from Graphic3d;
342 AFlag : Boolean from Standard )
343 is deferred;
344 ---Purpose: call_togl_cliplimit
345
346 ProjectRaster ( me : mutable;
347 ACView : CView from Graphic3d;
348 AX : ShortReal from Standard;
349 AY : ShortReal from Standard;
350 AZ : ShortReal from Standard;
351 AU : out Integer from Standard;
352 AV : out Integer from Standard )
353 returns Boolean from Standard
354 is deferred;
355 ---Purpose: call_togl_unproject_raster
356
357 UnProjectRaster ( me : mutable;
358 ACView : CView from Graphic3d;
359 Axm : Integer from Standard;
360 Aym : Integer from Standard;
361 AXM : Integer from Standard;
362 AYM : Integer from Standard;
363 AU : Integer from Standard;
364 AV : Integer from Standard;
365 AX : out ShortReal from Standard;
366 AY : out ShortReal from Standard;
367 AZ : out ShortReal from Standard )
368 returns Boolean from Standard
369 is deferred;
370 ---Purpose: call_togl_unproject_raster
371
372 UnProjectRasterWithRay ( me : mutable;
373 ACView : CView from Graphic3d;
374 Axm : Integer from Standard;
375 Aym : Integer from Standard;
376 AXM : Integer from Standard;
377 AYM : Integer from Standard;
378 AU : Integer from Standard;
379 AV : Integer from Standard;
380 AX : out ShortReal from Standard;
381 AY : out ShortReal from Standard;
382 AZ : out ShortReal from Standard;
383 DX : out ShortReal from Standard;
384 DY : out ShortReal from Standard;
385 DZ : out ShortReal from Standard )
386 returns Boolean from Standard
387 is deferred;
388 ---Purpose: call_togl_unproject_raster_with_ray
389
390 RatioWindow ( me : mutable;
391 ACView : CView from Graphic3d )
392 is deferred;
393 ---Purpose: call_togl_ratio_window
394
395 Redraw ( me : mutable;
396 ACView : CView from Graphic3d;
397 ACUnderLayer : CLayer2d from Aspect;
398 ACOverLayer : CLayer2d from Aspect;
399 x : Integer = 0;
400 y : Integer = 0;
401 width : Integer = 0;
402 height : Integer = 0 )
403 is deferred;
404 ---Purpose: call_togl_redraw
405 -- Warning: when the redraw area has a null size, the full view is redrawn
406
407 RemoveView ( me : mutable;
408 ACView : CView from Graphic3d )
409 is deferred;
410 ---Purpose: call_togl_removeview
411
412 SetLight ( me : mutable;
413 ACView : CView from Graphic3d )
414 is deferred;
415 ---Purpose: call_togl_setlight
416
417 SetPlane ( me : mutable;
418 ACView : CView from Graphic3d )
419 is deferred;
420 ---Purpose: call_togl_setplane
421
422 SetVisualisation ( me : mutable;
423 ACView : CView from Graphic3d )
424 is deferred;
425 ---Purpose: call_togl_setvisualisation
426
427 TransformStructure ( me : mutable;
428 ACStructure : CStructure from Graphic3d )
429 is deferred;
430 ---Purpose: call_togl_transformstructure
431
432 DegenerateStructure ( me : mutable;
433 ACStructure : CStructure from Graphic3d )
434 is deferred;
435 ---Purpose: call_togl_degeneratestructure
436
437 Transparency ( me : mutable;
438 ACView : CView from Graphic3d;
439 AFlag : Boolean from Standard )
440 is deferred;
441 ---Purpose: call_togl_transparency
442
443 Update ( me : mutable;
444 ACView : CView from Graphic3d;
445 ACUnderLayer : CLayer2d from Aspect;
446 ACOverLayer : CLayer2d from Aspect )
447 is deferred;
448 ---Purpose: call_togl_update
449
450 View ( me : mutable;
451 ACView : in out CView from Graphic3d )
452 returns Boolean from Standard
453 is deferred;
454 ---Purpose: call_togl_view
455
456 ViewMapping ( me : mutable;
457 ACView : CView from Graphic3d;
458 AWait : Boolean from Standard )
459 is deferred;
460 ---Purpose: call_togl_viewmapping
461
462 ViewOrientation ( me : mutable;
463 ACView : CView from Graphic3d;
464 AWait : Boolean from Standard )
465 is deferred;
466 ---Purpose: call_togl_vieworientation
467
468 Environment ( me : mutable;
469 ACView : CView from Graphic3d )
470 is deferred;
471 ---Purpose:
472
473 ----------------------------------------
474 -- Category: Methods to create Marker
475 -- for Purpose : see Graphic3d_Group.cdl
476 ----------------------------------------
477
478 Marker ( me : mutable;
479 ACGroup : CGroup from Graphic3d;
b8ddfc2f 480 APoint : Vertex from Graphic3d )
7fd59977 481 is deferred;
482
483 MarkerSet ( me : mutable;
484 ACGroup : CGroup from Graphic3d;
b8ddfc2f 485 ListVertex : Array1OfVertex from Graphic3d )
7fd59977 486 is deferred;
487
488 ----------------------------------------
7fd59977 489 -- Category: Methods to create Text
490 -- for Purpose : see Graphic3d_Group.cdl
491 ----------------------------------------
492
493 Text ( me : mutable;
494 ACGroup : CGroup from Graphic3d;
495 AText : CString from Standard;
496 APoint : Vertex from Graphic3d;
497 AHeight : Real from Standard;
498 AAngle : PlaneAngle from Quantity;
499 ATp : TextPath from Graphic3d;
500 AHta : HorizontalTextAlignment from Graphic3d;
501 AVta : VerticalTextAlignment from Graphic3d;
502 EvalMinMax : Boolean from Standard = Standard_True )
503 is deferred;
504 ---Purpose: call_togl_text
505
506 Text ( me : mutable;
507 ACGroup : CGroup from Graphic3d;
508 AText : CString from Standard;
509 APoint : Vertex from Graphic3d;
510 AHeight : Real from Standard;
511 EvalMinMax : Boolean from Standard = Standard_True )
512 is deferred;
513 ---Purpose: call_togl_text
514
515 Text ( me : mutable;
516 ACGroup : CGroup from Graphic3d;
517 AText : ExtendedString from TCollection;
518 APoint : Vertex from Graphic3d;
519 AHeight : Real from Standard;
520 AAngle : PlaneAngle from Quantity;
521 ATp : TextPath from Graphic3d;
522 AHta : HorizontalTextAlignment from Graphic3d;
523 AVta : VerticalTextAlignment from Graphic3d;
524 EvalMinMax : Boolean from Standard = Standard_True )
525 is deferred;
526 ---Purpose: call_togl_text
527
528 Text ( me : mutable;
529 ACGroup : CGroup from Graphic3d;
530 AText : ExtendedString from TCollection;
531 APoint : Vertex from Graphic3d;
532 AHeight : Real from Standard;
533 EvalMinMax : Boolean from Standard = Standard_True )
534 is deferred;
535 ---Purpose: call_togl_text
536
537 ----------------------------------------
538 ---Category: Methods to create Triangle
539 -- for Purpose : see Graphic3d_Group.cdl
540 ----------------------------------------
541
7fd59977 542 PrimitiveArray( me : mutable;
543 ACGroup : CGroup from Graphic3d;
544 parray : PrimitiveArray from Graphic3d;
545 EvalMinMax : Boolean from Standard = Standard_True )
546 is deferred;
547 ---Purpose: call_togl_parray
548
549 UserDraw( me : mutable;
550 ACGroup : CGroup from Graphic3d;
551 AUserDraw : CUserDraw from Graphic3d )
552 is deferred;
553 ---Purpose: call_togl_userdraw
554
555 EnableVBO( me : mutable;
556 status : Boolean from Standard )
2166f0fa 557 is deferred;
7fd59977 558 ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
559
f0430952 560 MemoryInfo (me;
561 theFreeBytes : out Size from Standard;
562 theInfo : out AsciiString from TCollection) returns Boolean from Standard is deferred;
563 ---Purpose: Returns information about GPU memory usage.
564
7fd59977 565 ----------------------------------------
566 ---Category: Methods to create Triedron
567 -- for Purpose : see Graphic3d_Group.cdl
568 ----------------------------------------
569
570 ZBufferTriedronSetup ( me : mutable;
571 XColor : NameOfColor from Quantity = Quantity_NOC_RED;
572 YColor : NameOfColor from Quantity = Quantity_NOC_GREEN;
573 ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1;
574 SizeRatio : Real from Standard = 0.8;
575 AxisDiametr : Real from Standard = 0.05;
576 NbFacettes : Integer from Standard = 12)
577 is deferred;
578 ---Purpose: call_togl_ztriedron_setup
579
580 TriedronDisplay ( me : mutable;
581 ACView : CView from Graphic3d;
582 APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER;
583 AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ;
584 AScale : Real from Standard = 0.02;
585 AsWireframe : Boolean from Standard = Standard_True )
586 is deferred;
587 ---Purpose: call_togl_triedron_display
588
589
590 TriedronErase ( me : mutable;
591 ACView : CView from Graphic3d)
592 is deferred;
593 ---Purpose: call_togl_triedron_erase
594
595
596 TriedronEcho ( me : mutable;
597 ACView : CView from Graphic3d;
598 AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE )
599 is deferred;
600 ---Purpose: call_togl_triedron_echo
601
602 ---------------------------------
603 ---Category: Graduated trihedron
604 ---------------------------------
605
7fd59977 606 GraduatedTrihedronDisplay(me : mutable;
607 view : CView from Graphic3d;
13a22457 608 cubic : CGraduatedTrihedron from Graphic3d)
7fd59977 609 ---Purpose: call_togl_graduatedtrihedron_display
610 is deferred;
611
612 GraduatedTrihedronErase(me : mutable;
613 view : CView from Graphic3d)
614 ---Purpose: call_togl_graduatedtrihedron_erase
615 is deferred;
616
617 GraduatedTrihedronMinMaxValues(me : mutable;
618 xmin : ShortReal from Standard;
619 ymin : ShortReal from Standard;
620 zmin : ShortReal from Standard;
621 xmax : ShortReal from Standard;
622 ymax : ShortReal from Standard;
623 zmax : ShortReal from Standard)
624 ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
625 is deferred;
626
7fd59977 627 ---------------------------
628 -- Category: Animation mode
629 ---------------------------
630
631 BeginAnimation ( me : mutable;
632 ACView : CView from Graphic3d)
633 is deferred;
634 ---Purpose: call_togl_begin_animation
635
636 EndAnimation ( me : mutable;
637 ACView : CView from Graphic3d)
638 is deferred;
639 ---Purpose: call_togl_end_animation
640
641 ----------------------------------
642 -- Category: Ajout mode methods
643 ----------------------------------
644
645 BeginAddMode ( me : mutable;
646 ACView : CView from Graphic3d)
647 returns Boolean from Standard
648 is deferred;
649 ---Purpose: call_togl_begin_ajout_mode
650
651 EndAddMode ( me : mutable)
652 is deferred;
653 ---Purpose: call_togl_end_ajout_mode
654
655 ----------------------------------
656 -- Category: Immediat mode methods
657 ----------------------------------
658
659 BeginImmediatMode ( me : mutable;
660 ACView : CView from Graphic3d;
661 ACUnderLayer : CLayer2d from Aspect;
662 ACOverLayer : CLayer2d from Aspect;
663 DoubleBuffer : Boolean from Standard;
664 RetainMode : Boolean from Standard)
665 returns Boolean from Standard
666 is deferred;
667 ---Purpose: call_togl_begin_immediat_mode
668
669 BeginPolyline ( me : mutable )
670 is deferred;
671 ---Purpose: call_togl_begin_polyline
672
673 ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d;
674 aFlush : Boolean from Standard = Standard_True)
675 is deferred;
676 ---Purpose: call_togl_clear_immediat_mode
677
678 Draw ( me : mutable;
679 X : ShortReal from Standard;
680 Y : ShortReal from Standard;
681 Z : ShortReal from Standard )
682 is deferred;
683 ---Purpose: call_togl_draw
684
685 DrawStructure ( me : mutable;
686 ACStructure : CStructure from Graphic3d )
687 is deferred;
688 ---Purpose: call_togl_draw_structure
689
690 EndImmediatMode ( me : mutable;
691 Synchronize : Integer from Standard )
692 is deferred;
693 ---Purpose: call_togl_end_immediat_mode
694
695 EndPolyline ( me : mutable )
696 is deferred;
697 ---Purpose: call_togl_end_polyline
698
699 Move ( me : mutable;
700 X : ShortReal from Standard;
701 Y : ShortReal from Standard;
702 Z : ShortReal from Standard )
703 is deferred;
704 ---Purpose: call_togl_move
705
706 SetLineColor ( me : mutable;
707 R : ShortReal from Standard;
708 G : ShortReal from Standard;
709 B : ShortReal from Standard )
710 is deferred;
711 ---Purpose: call_togl_set_linecolor
712
713 SetLineType ( me : mutable;
714 Type : Integer from Standard )
715 is deferred;
716 ---Purpose: call_togl_set_linetype
717
718 SetLineWidth ( me : mutable;
719 Width : ShortReal from Standard )
720 is deferred;
721 ---Purpose: call_togl_set_linewidth
722
723 SetMinMax ( me : mutable;
724 X1 : ShortReal from Standard;
725 Y1 : ShortReal from Standard;
726 Z1 : ShortReal from Standard;
727 X2 : ShortReal from Standard;
728 Y2 : ShortReal from Standard;
729 Z2 : ShortReal from Standard )
730 is deferred;
731 ---Purpose: call_togl_set_minmax
732
733 Transform ( me : mutable;
734 AMatrix : Array2OfReal from TColStd;
735 AType : TypeOfComposition from Graphic3d )
736 is deferred;
737 ---Purpose: call_togl_transform
738
7fd59977 739 -------------------------------
740 -- Category: Layer mode methods
741 -------------------------------
742
743 Layer ( me : mutable;
744 ACLayer : in out CLayer2d from Aspect )
745 is deferred;
746 ---Purpose: call_togl_layer2d
747
748 RemoveLayer ( me : mutable;
749 ACLayer : CLayer2d from Aspect )
750 is deferred;
751 ---Purpose: call_togl_removelayer2d
752
753 BeginLayer ( me : mutable;
754 ACLayer : CLayer2d from Aspect )
755 is deferred;
756 ---Purpose: call_togl_begin_layer2d
757
758 BeginPolygon2d ( me : mutable )
759 is deferred;
760 ---Purpose: call_togl_begin_polygon2d
761
762 BeginPolyline2d ( me : mutable )
763 is deferred;
764 ---Purpose: call_togl_begin_polyline2d
765
766 ClearLayer ( me : mutable;
767 ACLayer : CLayer2d from Aspect )
768 is deferred;
769 ---Purpose: call_togl_clear_layer2d
770
771 Draw ( me : mutable;
772 X : ShortReal from Standard;
773 Y : ShortReal from Standard )
774 is deferred;
775 ---Purpose: call_togl_draw2d
776
777 Edge ( me : mutable;
778 X : ShortReal from Standard;
779 Y : ShortReal from Standard )
780 is deferred;
781 ---Purpose: call_togl_edge2d
782
783 EndLayer ( me : mutable )
784 is deferred;
785 ---Purpose: call_togl_end_layer2d
786
787 EndPolygon2d ( me : mutable )
788 is deferred;
789 ---Purpose: call_togl_end_polygon2d
790
791 EndPolyline2d ( me : mutable )
792 is deferred;
793 ---Purpose: call_togl_end_polyline2d
794
795 Move ( me : mutable;
796 X : ShortReal from Standard;
797 Y : ShortReal from Standard )
798 is deferred;
799 ---Purpose: call_togl_move2d
800
801 Rectangle ( me : mutable;
802 X, Y : ShortReal from Standard;
803 Width, Height : ShortReal from Standard )
804 is deferred;
805 ---Purpose: call_togl_rectangle2d
806
807 SetColor ( me : mutable;
808 R : ShortReal from Standard;
809 G : ShortReal from Standard;
810 B : ShortReal from Standard )
811 is deferred;
812 ---Purpose: call_togl_set_color
813
814 SetTransparency ( me : mutable;
815 ATransparency : ShortReal from Standard )
816 is deferred;
817 ---Purpose: call_togl_set_transparency
818
819 UnsetTransparency ( me : mutable )
820 is deferred;
821 ---Purpose: call_togl_unset_transparency
822
823 SetLineAttributes ( me : mutable;
824 Type : Integer from Standard;
825 Width : ShortReal from Standard )
826 is deferred;
827 ---Purpose: call_togl_set_line_attributes
828
829
830 SetTextAttributes ( me : mutable;
831 Font : CString from Standard;
832 Type : Integer from Standard;
833 R : ShortReal from Standard;
834 G : ShortReal from Standard;
835 B : ShortReal from Standard )
2166f0fa 836 is deferred;
25289ec1 837 ---Purpose: Set text attributes for under-/overlayer.
838 -- <Font> argument defines the name of the font to be used,
839 -- <Type> argument defines the display type of the text,
840 -- <R> <G> <B> values define the color of decal or subtitle background.
841 -- To set the color of the text you can use the SetColor method.
7fd59977 842
843 Text ( me : mutable;
844 AText : CString from Standard;
845 X, Y : ShortReal from Standard;
846 AHeight : ShortReal from Standard )
847 is deferred;
848 ---Purpose: call_togl_text2d
849 -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
850
851 DefaultTextHeight( me )
852 returns ShortReal from Standard
853 is deferred;
854
855
856 TextSize( me;
857 AText : CString from Standard;
858 AHeight : ShortReal from Standard;
859 AWidth : in out ShortReal from Standard;
860 AnAscent : in out ShortReal from Standard;
861 ADescent : in out ShortReal from Standard )
862 is deferred;
863 ---Purpose: call_togl_textsize2d
864
865 SetBackFacingModel ( me : mutable;
866 aView : CView from Graphic3d )
867 is deferred;
868 ---Purpose: call_togl_backfacing
869
870 SetDepthTestEnabled( me; view : CView from Graphic3d;
871 isEnabled : Boolean from Standard )
872 is deferred;
873 ---Purpose: call_togl_depthtest
874
875 IsDepthTestEnabled( me; view : CView from Graphic3d )
876 returns Boolean from Standard is deferred;
877 ---Purpose: call_togl_isdepthtest
878
879 ReadDepths( me;
880 view : CView from Graphic3d;
881 x, y : Integer;
882 width, height : Integer;
883 buffer : Address )
884 is deferred;
885 ---Purpose: Reads depths of shown pixels of the given
886 -- rectangle (glReadPixels with GL_DEPTH_COMPONENT)
887
888 FBOCreate( me : mutable;
889 view : CView from Graphic3d;
890 width, height : Integer from Standard )
891 returns PtrFrameBuffer from Graphic3d
892 is deferred;
893 ---Purpose: Generate offscreen FBO in the graphic library.
894 -- If not supported on hardware returns NULL.
895
896 FBORelease( me : mutable;
897 view : CView from Graphic3d;
898 fboPtr : in out PtrFrameBuffer from Graphic3d )
899 is deferred;
900 ---Purpose: Remove offscreen FBO from the graphic library
901
902 FBOGetDimensions( me : mutable;
903 view : CView from Graphic3d;
904 fboPtr : PtrFrameBuffer from Graphic3d;
905 width, height : out Integer from Standard;
906 widthMax, heightMax : out Integer from Standard )
907 is deferred;
908 ---Purpose: Read offscreen FBO configuration.
909
910 FBOChangeViewport( me : mutable;
911 view : CView from Graphic3d;
912 fboPtr : in out PtrFrameBuffer from Graphic3d;
913 width, height : Integer from Standard )
914 is deferred;
915 ---Purpose: Change offscreen FBO viewport.
916
917 BufferDump( me : mutable;
692613e5 918 theCView : CView from Graphic3d;
919 theImage : in out PixMap from Image;
920 theBufferType : BufferType from Graphic3d )
7fd59977 921 returns Boolean from Standard
922 is deferred;
923 ---Purpose: Dump active rendering buffer into specified memory buffer.
924
925 SetGLLightEnabled( me; view : CView from Graphic3d;
926 isEnabled : Boolean from Standard )
927 is deferred;
928 ---Purpose: call_togl_gllight
929
930 IsGLLightEnabled( me; view : CView from Graphic3d )
931 returns Boolean from Standard is deferred;
932 ---Purpose: call_togl_isgllight
933
934 Print (me;
935 ACView : CView from Graphic3d;
936 ACUnderLayer : CLayer2d from Aspect;
937 ACOverLayer : CLayer2d from Aspect;
938 hPrnDC : Handle from Aspect;
939 showBackground : Boolean;
7edf74fd
A
940 filename : CString;
941 printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH;
942 theScaleFactor : Real from Standard = 1.0 )
943 returns Boolean from Standard is deferred;
7fd59977 944 ---Level: Internal
945 ---Purpose: print the contents of all layers of the view to the printer.
946 -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
947 -- <showBackground> : When set to FALSE then print the view without background color
948 -- (background is white)
949 -- else set to TRUE for printing with current background color.
950 -- <filename>: If != NULL, then the view will be printed to a file.
7edf74fd
A
951 -- <printAlgorithm>: Select print algorithm: stretch, tile.
952 -- <theScaleFactor>: Scaling coefficient, used internally to scale the
953 -- printings accordingly to the scale factor selected in the printer
954 -- properties dialog.
955 -- Returns Standard_True if the data is passed to the printer, otherwise
956 -- Standard_False if the print operation failed due to the printer errors,
957 -- or insufficient system memory available.
7fd59977 958 ---Warning: Works only under Windows.
959
7fd59977 960 Export( me: mutable;
5cedc27f
K
961 theFileName : CString from Standard;
962 theFormat : ExportFormat from Graphic3d;
963 theSortType : SortType from Graphic3d;
964 theWidth, theHeight : Integer from Standard;
965 theView : CView from Graphic3d;
966 theLayerUnder : CLayer2d from Aspect;
967 theLayerOver : CLayer2d from Aspect;
968 thePrecision : Real from Standard = 0.005;
969 theProgressBarFunc : Address from Standard = NULL;
970 theProgressObject : Address from Standard = NULL )
971 returns Boolean from Standard
972 is deferred;
973 ---Purpose:
974 -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
975 -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
976 -- Notice however that results may differ a lot and do not contain some elements.
7fd59977 977
59f45b7c 978 AddZLayer( me : mutable;
979 theCView : CView from Graphic3d;
980 theLayerId : Integer from Standard )
981 is deferred;
982 ---Purpose: Add a new top-level z layer with ID <theLayerId> for
983 -- the view. Z layers allow drawing structures in higher layers
984 -- in foreground of structures in lower layers. To add a structure
985 -- to desired layer on display it is necessary to set the layer
986 -- ID for the structure.
987
988 RemoveZLayer( me : mutable;
989 theCView : CView from Graphic3d;
990 theLayerId : Integer from Standard )
991 is deferred;
992 ---Purpose: Remove Z layer from the specified view. All structures
993 -- displayed at the moment in layer will be displayed in default layer
994 -- ( the bottom-level z layer ). To unset layer ID from associated
995 -- structures use method UnsetZLayer (...).
996
997 UnsetZLayer( me : mutable;
998 theLayerId : Integer from Standard )
999 is deferred;
1000 ---Purpose: Unset Z layer ID for all structures. The structure
1001 -- indexes will be set to default layer ( the bottom-level z layer
1002 -- with ID = 0 ).
1003
1004 ChangeZLayer( me : mutable;
1005 theCStructure : CStructure from Graphic3d;
1006 theLayerId : Integer from Standard )
1007 is deferred;
1008 ---Purpose: Change Z layer of a structure. The new z layer ID will
1009 -- be used to define the associated layer for structure on display.
1010
1011 ChangeZLayer( me : mutable;
1012 theCStructure : CStructure from Graphic3d;
1013 theCView : CView from Graphic3d;
1014 theNewLayerId : Integer from Standard )
1015 is deferred;
1016 ---Purpose: Change Z layer of a structure already presented in view.
1017
1018 GetZLayer( me;
1019 theCStructure : CStructure from Graphic3d )
1020 returns Integer from Standard is deferred;
1021 ---Purpose: Get Z layer ID of structure. If the structure doesn't
1022 -- exists in graphic driver, the method returns -1.
1023
7fd59977 1024 --------------------------
1025 -- Category: Class methods
1026 --------------------------
1027
1028 Light ( myclass;
1029 ACLight : CLight from Graphic3d;
1030 Update : Boolean from Standard )
1031 returns Integer from Standard;
1032 ---Purpose: call_togl_light
1033
1034 Plane ( myclass;
1035 ACPlane : CPlane from Graphic3d;
1036 Update : Boolean from Standard )
1037 returns Integer from Standard;
1038 ---Purpose: call_togl_plane
1039
1040 -----------------------------
1041 -- Category: Internal methods
1042 -----------------------------
1043
1044 PrintBoolean ( me;
1045 AComment : CString from Standard;
1046 AValue : Boolean from Standard );
1047
1048 PrintCGroup ( me;
1049 ACGroup : CGroup from Graphic3d;
1050 AField : Integer from Standard );
1051
1052 PrintCLight ( me;
1053 ACLight : CLight from Graphic3d;
1054 AField : Integer from Standard );
1055
1056 PrintCPick ( me;
1057 ACPick : CPick from Graphic3d;
1058 AField : Integer from Standard );
1059
1060 PrintCPlane ( me;
1061 ACPlane : CPlane from Graphic3d;
1062 AField : Integer from Standard );
1063
1064 PrintCStructure ( me;
1065 ACStructure : CStructure from Graphic3d;
1066 AField : Integer from Standard );
1067
1068 PrintCView ( me;
1069 ACView : CView from Graphic3d;
1070 AField : Integer from Standard );
1071
1072 PrintFunction ( me;
1073 AFunc : CString from Standard );
1074
1075 PrintInteger ( me;
1076 AComment : CString from Standard;
1077 AValue : Integer from Standard );
1078
1079 PrintIResult ( me;
1080 AFunc : CString from Standard;
1081 AResult : Integer from Standard );
1082
1083 PrintShortReal ( me;
1084 AComment : CString from Standard;
1085 AValue : ShortReal from Standard );
1086
1087 PrintMatrix ( me;
1088 AComment : CString from Standard;
1089 AMatrix : Array2OfReal from TColStd )
1090 raises TransformError from Graphic3d;
1091
1092 PrintString ( me;
1093 AComment : CString from Standard;
1094 AString : CString from Standard );
1095
1096 SetTrace ( me : mutable;
1097 ALevel : Integer from Standard )
1098 is static;
1099
1100 Trace ( me )
1101 returns Integer from Standard
1102 is static;
1103
1104 --ListOfAvalableFontNames( me;
1105 -- lst: out NListOfHAsciiString from Graphic3d )
1106 -- returns Boolean from Standard
1107 -- is deferred;
1108 -- Purpose: Initialize list of names of avalable system fonts
1109 -- returns Standard_False if fails
1110 -- ABD Integration support of system fonts (using FTGL and FreeType)
1111
1112fields
1113
1114 MyTraceLevel : Integer from Standard is protected;
1115 MySharedLibrary : SharedLibrary from OSD is protected;
1116
1117end GraphicDriver from Graphic3d;