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