0211cf5800183d2ecafb8df1e32b09376513b114
[occt.git] / src / Graphic3d / Graphic3d_GraphicDriver.cdl
1 -- Created on: 1997-01-28
2 -- Created by: CAL
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class GraphicDriver from Graphic3d inherits TShared
18
19     ---Version:
20
21     ---Purpose: This class allows the definition of a graphic driver
22     --      for 3d interface (currently only OpenGl driver is used).
23
24     ---Keywords: OpenGl
25
26     ---Warning:
27     ---References:
28
29 uses
30
31     Array1OfInteger     from TColStd,
32     Array1OfReal        from TColStd,
33     Array2OfReal        from TColStd,
34
35     AsciiString         from TCollection,
36     ExtendedString      from TCollection,
37
38     NameOfColor         from Quantity,
39     Color               from Quantity,
40
41     PlaneAngle          from Quantity,
42
43     PixMap              from Image,
44
45     CLayer2d            from Aspect,
46     TypeOfTriedronEcho  from Aspect,
47     TypeOfTriedronPosition  from Aspect,
48     Handle              from Aspect,
49     Display             from Aspect,
50     PrintAlgo           from Aspect,
51     DisplayConnection_Handle from Aspect,
52
53     ZLayerId            from Graphic3d,
54     ZLayerSettings      from Graphic3d,
55
56     AspectLine3d        from Graphic3d,
57     AspectMarker3d      from Graphic3d,
58     AspectText3d        from Graphic3d,
59     AspectFillArea3d    from Graphic3d,
60     HorizontalTextAlignment from Graphic3d,
61     CBitFields20        from Graphic3d,
62     Group               from Graphic3d,
63     CLight              from Graphic3d,
64     CPlane              from Graphic3d,
65     CStructure          from Graphic3d,
66     CStructure_Handle   from Graphic3d,
67     CView               from Graphic3d,
68     BufferType          from Graphic3d,
69     Structure           from Graphic3d,
70     StructureManager    from Graphic3d,
71     TextPath            from Graphic3d,
72     TypeOfComposition   from Graphic3d,
73     TypeOfPrimitive     from Graphic3d,
74     Vector              from Graphic3d,
75     Array1OfVertex      from Graphic3d,
76     Array2OfVertex      from Graphic3d,
77     Vertex              from Graphic3d,
78     VerticalTextAlignment   from Graphic3d,
79     PtrFrameBuffer      from Graphic3d,
80     HArray1OfByte       from TColStd,
81     FillMethod          from Aspect,
82     GradientFillMethod  from Aspect,
83     ExportFormat        from Graphic3d,
84     SortType            from Graphic3d,
85     HArray1OfReal       from TColStd,
86     CUserDraw           from Graphic3d,
87     NListOfHAsciiString from Graphic3d,
88     FontAspect          from Font,
89     GraduatedTrihedron  from Graphic3d,
90     ClipPlane           from Graphic3d,
91     Vec3                from Graphic3d,
92     Ax2                 from gp
93
94 raises
95
96     TransformError      from Graphic3d
97
98 is
99     Initialize (theDisp : DisplayConnection_Handle from Aspect)
100     returns GraphicDriver from Graphic3d;
101     ---Level: Public
102     ---Purpose: Initialises the Driver
103
104     ----------------------------
105     -- Category: Inquire methods
106     ----------------------------
107
108     InquireLightLimit ( me  : mutable )
109         returns Integer from Standard
110         is deferred;
111     ---Purpose: call_togl_inquirelight
112
113     InquirePlaneLimit ( me  : mutable )
114         returns Integer from Standard
115         is deferred;
116     ---Purpose: call_togl_inquireplane
117
118     InquireViewLimit ( me   : mutable )
119         returns Integer from Standard
120         is deferred;
121     ---Purpose: call_togl_inquireview
122
123     -----------------------------------------
124     -- Category: Structure management methods
125     -----------------------------------------
126
127     DisplayStructure ( me           : mutable;
128                        theCView     : CView from Graphic3d;
129                        theStructure : Structure from Graphic3d;
130                        thePriority  : Integer from Standard )
131         is deferred;
132     ---Purpose: call_togl_displaystructure
133
134     EraseStructure ( me           : mutable;
135                      theCView     : CView from Graphic3d;
136                      theStructure : Structure from Graphic3d )
137         is deferred;
138     ---Purpose: call_togl_erasestructure
139
140     RemoveStructure ( me            : mutable;
141                       theCStructure : in out CStructure_Handle from Graphic3d )
142         is deferred;
143     ---Purpose: call_togl_removestructure
144
145     Structure (me : mutable;
146                theManager : StructureManager from Graphic3d)
147         returns CStructure_Handle from Graphic3d
148         is deferred;
149     ---Purpose: Creates new empty graphic structure
150
151     ------------------------------------
152     -- Category: Structured mode methods
153     ------------------------------------
154
155     ActivateView ( me       : mutable;
156                    ACView   : CView from Graphic3d )
157         is deferred;
158     ---Purpose: call_togl_activateview
159
160     AntiAliasing ( me       : mutable;
161                    ACView   : CView from Graphic3d;
162                    AFlag    : Boolean from Standard )
163         is deferred;
164     ---Purpose: call_togl_antialiasing
165
166     Background ( me     : mutable;
167                  ACView : CView from Graphic3d )
168         is deferred;
169     ---Purpose: call_togl_background
170
171     GradientBackground ( me     : mutable;
172                          ACView : CView from Graphic3d;
173                          AColor1: Color from Quantity;
174                          AColor2: Color from Quantity;
175                          FillStyle : GradientFillMethod from Aspect
176                        )
177     is deferred;
178     ---Purpose: call_togl_gradient_background
179
180
181     BackgroundImage( me           : mutable;
182                      FileName     : CString from Standard;
183                      ACView       : CView from Graphic3d;
184                      FillStyle    : FillMethod from Aspect )
185     is deferred;
186
187     SetBgImageStyle( me        : mutable;
188                      ACView    : CView from Graphic3d;
189                      FillStyle : FillMethod from Aspect )
190     is deferred;
191
192     SetBgGradientStyle( me        : mutable;
193                         ACView    : CView from Graphic3d;
194                         FillStyle : GradientFillMethod from Aspect )
195     is deferred;
196
197     ClipLimit ( me      : mutable;
198                 ACView  : CView from Graphic3d;
199                 AWait   : Boolean from Standard )
200         is deferred;
201     ---Purpose: call_togl_cliplimit
202
203     DeactivateView ( me     : mutable;
204                      ACView : CView from Graphic3d )
205         is deferred;
206     ---Purpose: call_togl_deactivateview
207
208     DepthCueing ( me        : mutable;
209                   ACView    : CView from Graphic3d;
210                   AFlag     : Boolean from Standard )
211         is deferred;
212     ---Purpose: call_togl_cliplimit
213
214     RatioWindow ( me        : mutable;
215                   ACView    : CView from Graphic3d )
216         is deferred;
217     ---Purpose: call_togl_ratio_window
218
219     Redraw ( me             : mutable;
220              theCView       : CView from Graphic3d;
221              theCUnderLayer : CLayer2d from Aspect;
222              theCOverLayer  : CLayer2d from Aspect;
223              theX           : Integer = 0;
224              theY           : Integer = 0;
225              theWidth       : Integer = 0;
226              theHeight      : Integer = 0 )
227     is deferred;
228     ---Purpose: Redraw content of the view
229
230     RedrawImmediate ( me               : mutable;
231                       theCView         : CView from Graphic3d;
232                       theCUnderLayer   : CLayer2d from Aspect;
233                       theCOverLayer    : CLayer2d from Aspect )
234     is deferred;
235     ---Purpose: Redraw layer of immediate presentations
236
237     Invalidate ( me       : mutable;
238                  theCView : CView from Graphic3d )
239     is deferred;
240     ---Purpose: Invalidates content of the view but does not redraw it
241
242     RemoveView ( me     : mutable;
243                 ACView  : CView from Graphic3d )
244         is deferred;
245     ---Purpose: call_togl_removeview
246
247     SetLight ( me       : mutable;
248            ACView   : CView from Graphic3d )
249         is deferred;
250     ---Purpose: call_togl_setlight
251
252     SetClipPlanes (me : mutable; theCView : CView from Graphic3d) is deferred;
253     ---Purpose: Pass clip planes to the associated graphic driver view.
254
255     SetCamera (me : mutable; theCView : CView from Graphic3d)
256          is deferred;
257     ---Purpose: Inform graphic driver if camera assigned to view changes.
258
259     SetVisualisation ( me       : mutable;
260                        ACView   : CView from Graphic3d )
261         is deferred;
262     ---Purpose: call_togl_setvisualisation
263
264     View ( me   : mutable;
265            ACView   : in out CView from Graphic3d )
266         returns Boolean from Standard
267         is deferred;
268     ---Purpose: call_togl_view
269
270         Environment ( me        : mutable;
271                       ACView    : CView from Graphic3d )
272         is deferred;
273     ---Purpose:
274
275     ----------------------------------------
276     ---Category: Methods to create Triangle
277     -- for Purpose : see Graphic3d_Group.cdl
278     ----------------------------------------
279
280     EnableVBO( me       : mutable;
281                status   : Boolean from Standard )
282                is deferred;
283     ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays
284
285     MemoryInfo (me;
286                 theFreeBytes : out Size from Standard;
287                 theInfo      : out AsciiString from TCollection) returns Boolean from Standard is deferred;
288     ---Purpose: Returns information about GPU memory usage.
289
290     ----------------------------------------
291     ---Category: Methods to create Triedron
292     -- for Purpose : see Graphic3d_Group.cdl
293     ----------------------------------------
294
295     ZBufferTriedronSetup ( me          : mutable;
296                            XColor      : NameOfColor from Quantity = Quantity_NOC_RED;
297                            YColor      : NameOfColor from Quantity = Quantity_NOC_GREEN;
298                            ZColor      : NameOfColor from Quantity = Quantity_NOC_BLUE1;
299                            SizeRatio   : Real from Standard = 0.8;
300                            AxisDiametr : Real from Standard = 0.05;
301                            NbFacettes  : Integer from Standard = 12)
302          is deferred;
303         ---Purpose: call_togl_ztriedron_setup
304
305     TriedronDisplay ( me            : mutable;
306                       ACView        : CView from Graphic3d;
307                       APosition     : TypeOfTriedronPosition from Aspect  = Aspect_TOTP_CENTER;
308                       AColor        : NameOfColor from Quantity = Quantity_NOC_WHITE ;
309                       AScale        : Real from Standard  =  0.02;
310                       AsWireframe   : Boolean from Standard = Standard_True )
311         is deferred;
312     ---Purpose: call_togl_triedron_display
313
314
315     TriedronErase ( me      : mutable;
316                   ACView    : CView from Graphic3d)
317         is deferred;
318     ---Purpose: call_togl_triedron_erase
319
320
321     TriedronEcho ( me       : mutable;
322                    ACView   : CView from Graphic3d;
323                    AType    : TypeOfTriedronEcho from Aspect  = Aspect_TOTE_NONE )
324         is deferred;
325     ---Purpose: call_togl_triedron_echo
326
327     ---------------------------------
328     ---Category: Graduated  trihedron
329     ---------------------------------
330
331     GraduatedTrihedronDisplay(me : mutable;
332                               theView : CView from Graphic3d;
333                               theCubic : GraduatedTrihedron from Graphic3d)
334     ---Purpose: call_togl_graduatedtrihedron_display
335     is deferred;
336
337     GraduatedTrihedronErase(me : mutable;
338                             theView : CView from Graphic3d)
339     ---Purpose: call_togl_graduatedtrihedron_erase
340     is deferred;
341
342     GraduatedTrihedronMinMaxValues (me : mutable;
343                                     theView : CView from Graphic3d;
344                                     theMin : Vec3 from Graphic3d;
345                                     theMax : Vec3 from Graphic3d)
346     ---Purpose: Sets minimum and maximum points of scene bounding box for Graduated Trihedron
347     -- stored in graphic view object.
348     -- @param theView [in] current graphic view
349     -- @param theMin [in] the minimum point of scene.
350     -- @param theMax [in] the maximum point of scene.
351
352     is deferred;
353
354     ----------------------------------
355     -- Category: Immediate mode methods
356     ----------------------------------
357
358     SetImmediateModeDrawToFront (me                   : mutable;
359                                  theCView             : CView from Graphic3d;
360                                  theDrawToFrontBuffer : Boolean from Standard)
361     returns Boolean from Standard
362     is deferred;
363     ---Purpose: @param theDrawToFrontBuffer Advanced option to modify rendering mode:
364     -- 1. TRUE.  Drawing immediate mode structures directly to the front buffer over the scene image.
365     --    Fast, so preferred for interactive work (used by default).
366     --    However these extra drawings will be missed in image dump since it is performed from back buffer.
367     --    Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen
368     --    in run-time (in case of slow hardware) and/or tearing may appear.
369     --    So this is strongly recommended to draw only simple (fast) structures.
370     -- 2. FALSE. Drawing immediate mode structures to the back buffer.
371     --    The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on.
372     --    But it works in any case and is especially useful for view dump because the dump image is read from the back buffer.
373     -- @return previous mode.
374
375     DisplayImmediateStructure ( me           : mutable;
376                                 theCView     : CView      from Graphic3d;
377                                 theStructure : Structure from Graphic3d )
378     is deferred;
379     ---Purpose: Display structure in immediate mode on top of general presentation
380
381     EraseImmediateStructure ( me            : mutable;
382                               theCView      : CView      from Graphic3d;
383                               theCStructure : CStructure from Graphic3d )
384     is deferred;
385     ---Purpose: Erases immediate structure
386
387     -------------------------------
388     -- Category: Layer mode methods
389     -------------------------------
390
391     Layer ( me      : mutable;
392             ACLayer : in out CLayer2d from Aspect )
393         is deferred;
394     ---Purpose: call_togl_layer2d
395
396     RemoveLayer ( me        : mutable;
397                   ACLayer   : CLayer2d from Aspect )
398         is deferred;
399     ---Purpose: call_togl_removelayer2d
400
401     BeginLayer ( me         : mutable;
402                  ACLayer    : CLayer2d from Aspect )
403         is deferred;
404     ---Purpose: call_togl_begin_layer2d
405
406     BeginPolygon2d ( me : mutable )
407         is deferred;
408     ---Purpose: call_togl_begin_polygon2d
409
410     BeginPolyline2d ( me    : mutable )
411         is deferred;
412     ---Purpose: call_togl_begin_polyline2d
413
414     ClearLayer ( me         : mutable;
415                  ACLayer    : CLayer2d from Aspect )
416         is deferred;
417     ---Purpose: call_togl_clear_layer2d
418
419     Draw ( me   : mutable;
420            X    : ShortReal from Standard;
421            Y    : ShortReal from Standard )
422         is deferred;
423     ---Purpose: call_togl_draw2d
424
425     Edge ( me   : mutable;
426            X    : ShortReal from Standard;
427            Y    : ShortReal from Standard )
428         is deferred;
429     ---Purpose: call_togl_edge2d
430
431     EndLayer ( me       : mutable )
432         is deferred;
433     ---Purpose: call_togl_end_layer2d
434
435     EndPolygon2d ( me   : mutable )
436         is deferred;
437     ---Purpose: call_togl_end_polygon2d
438
439     EndPolyline2d ( me  : mutable )
440         is deferred;
441     ---Purpose: call_togl_end_polyline2d
442
443     Move ( me   : mutable;
444            X    : ShortReal from Standard;
445            Y    : ShortReal from Standard )
446         is deferred;
447     ---Purpose: call_togl_move2d
448
449     Rectangle ( me              : mutable;
450                 X, Y            : ShortReal from Standard;
451                 Width, Height   : ShortReal from Standard )
452         is deferred;
453     ---Purpose: call_togl_rectangle2d
454
455     SetColor ( me   : mutable;
456                R    : ShortReal from Standard;
457                G    : ShortReal from Standard;
458                B    : ShortReal from Standard )
459         is deferred;
460     ---Purpose: call_togl_set_color
461
462     SetTransparency ( me    : mutable;
463            ATransparency    : ShortReal from Standard )
464         is deferred;
465     ---Purpose: call_togl_set_transparency
466
467     UnsetTransparency ( me  : mutable )
468         is deferred;
469     ---Purpose: call_togl_unset_transparency
470
471     SetLineAttributes ( me      : mutable;
472                         Type    : Integer from Standard;
473                         Width   : ShortReal from Standard )
474         is deferred;
475     ---Purpose: call_togl_set_line_attributes
476
477
478     SetTextAttributes ( me      : mutable;
479                         Font    : CString from Standard;
480                         Type    : Integer from Standard;
481                         R       : ShortReal from Standard;
482                         G       : ShortReal from Standard;
483                         B       : ShortReal from Standard )
484         is deferred;
485     ---Purpose: Set text attributes for under-/overlayer.
486     -- <Font> argument defines the name of the font to be used,
487     -- <Type> argument defines the display type of the text,
488     -- <R> <G> <B> values define the color of decal or subtitle background.
489     -- To set the color of the text you can use the SetColor method.
490
491     Text ( me       : mutable;
492            AText    : CString from Standard;
493            X, Y     : ShortReal from Standard;
494            AHeight  : ShortReal from Standard )
495         is deferred;
496     ---Purpose: call_togl_text2d
497     -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method)
498
499     DefaultTextHeight( me )
500         returns ShortReal from Standard
501         is deferred;
502
503
504     TextSize( me;
505               AText    : CString from Standard;
506               AHeight  : ShortReal from Standard;
507               AWidth   : in out ShortReal from Standard;
508               AnAscent : in out ShortReal from Standard;
509               ADescent : in out ShortReal from Standard )
510             is deferred;
511     ---Purpose: call_togl_textsize2d
512
513         SetBackFacingModel ( me    : mutable;
514                              aView : CView from Graphic3d )
515             is deferred;
516         ---Purpose: call_togl_backfacing
517
518         SetDepthTestEnabled( me; view : CView from Graphic3d;
519                                  isEnabled : Boolean from Standard )
520     is deferred;
521     ---Purpose: call_togl_depthtest
522
523         IsDepthTestEnabled( me; view : CView from Graphic3d )
524     returns Boolean from Standard is deferred;
525     ---Purpose: call_togl_isdepthtest
526
527         ReadDepths( me;
528                     view          : CView from Graphic3d;
529                     x, y          : Integer;
530                     width, height : Integer;
531                     buffer        : Address )
532     is deferred;
533     ---Purpose: Reads depths of shown pixels of the given
534     --          rectangle (glReadPixels with GL_DEPTH_COMPONENT)
535
536         FBOCreate( me            : mutable;
537                    view          : CView from Graphic3d;
538                    width, height : Integer from Standard )
539                   returns PtrFrameBuffer from Graphic3d
540     is deferred;
541     ---Purpose: Generate offscreen FBO in the graphic library.
542     --          If not supported on hardware returns NULL.
543
544         FBORelease( me            : mutable;
545                     view          : CView from Graphic3d;
546                     fboPtr        : in out PtrFrameBuffer from Graphic3d )
547     is deferred;
548     ---Purpose: Remove offscreen FBO from the graphic library
549
550         FBOGetDimensions( me                  : mutable;
551                           view                : CView from Graphic3d;
552                           fboPtr              : PtrFrameBuffer from Graphic3d;
553                           width, height       : out Integer from Standard;
554                           widthMax, heightMax : out Integer from Standard )
555     is deferred;
556     ---Purpose: Read offscreen FBO configuration.
557
558         FBOChangeViewport( me                  : mutable;
559                            view                : CView from Graphic3d;
560                            fboPtr              : in out PtrFrameBuffer from Graphic3d;
561                            width, height       : Integer from Standard )
562     is deferred;
563     ---Purpose: Change offscreen FBO viewport.
564
565         BufferDump( me            : mutable;
566                     theCView      : CView from Graphic3d;
567                     theImage      : in out PixMap from Image;
568                     theBufferType : BufferType from Graphic3d )
569                    returns Boolean from Standard
570     is deferred;
571     ---Purpose: Dump active rendering buffer into specified memory buffer.
572
573         SetGLLightEnabled( me; view : CView from Graphic3d;
574                                isEnabled : Boolean from Standard )
575     is deferred;
576     ---Purpose: call_togl_gllight
577
578         IsGLLightEnabled( me; view : CView from Graphic3d )
579     returns Boolean from Standard is deferred;
580     ---Purpose: call_togl_isgllight
581
582     Print (me;
583            ACView          : CView from Graphic3d;
584            ACUnderLayer    : CLayer2d from Aspect;
585            ACOverLayer     : CLayer2d from Aspect;
586            hPrnDC          : Handle from Aspect;
587            showBackground  : Boolean;
588            filename        : CString;
589            printAlgorithm  : PrintAlgo from Aspect = Aspect_PA_STRETCH;
590            theScaleFactor  : Real from Standard = 1.0 )
591         returns Boolean from Standard is deferred;
592       ---Level: Internal
593       ---Purpose: print the contents of all layers of the view to the printer.
594     -- <hPrnDC> : Pass the PrinterDeviceContext (HDC),
595     -- <showBackground> : When set to FALSE then print the view without background color
596     -- (background is white)
597       -- else set to TRUE for printing with current background color.
598     -- <filename>: If != NULL, then the view will be printed to a file.
599     -- <printAlgorithm>: Select print algorithm: stretch, tile.   
600     -- <theScaleFactor>: Scaling coefficient, used internally to scale the
601     -- printings accordingly to the scale factor selected in the printer 
602     -- properties dialog.
603     -- Returns Standard_True if the data is passed to the printer, otherwise
604     -- Standard_False if the print operation failed due to the printer errors, 
605     -- or insufficient system memory available.
606     ---Warning: Works only under Windows.
607
608         Export( me: mutable;
609                 theFileName         : CString from Standard;
610                 theFormat           : ExportFormat from Graphic3d;
611                 theSortType         : SortType from Graphic3d;
612                 theWidth, theHeight : Integer from Standard;
613                 theView             : CView from Graphic3d;
614                 theLayerUnder       : CLayer2d from Aspect;
615                 theLayerOver        : CLayer2d from Aspect;
616                 thePrecision        : Real from Standard = 0.005;
617                 theProgressBarFunc  : Address from Standard = NULL;
618                 theProgressObject   : Address from Standard = NULL )
619         returns Boolean from Standard
620         is deferred;
621     ---Purpose:
622     -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
623     -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
624     -- Notice however that results may differ a lot and do not contain some elements.
625
626     InvalidateBVHData( me         : mutable;
627                        theCView   : out CView from Graphic3d;
628                        theLayerId : Integer from Standard )
629     is deferred;
630     ---Purpose:
631     -- Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.
632
633     AddZLayer( me         : mutable;
634                theCView   : CView from Graphic3d;
635                theLayerId : ZLayerId from Graphic3d )
636         is deferred;
637         ---Purpose: Add a new top-level z layer with ID <theLayerId> for
638         -- the view. Z layers allow drawing structures in higher layers
639         -- in foreground of structures in lower layers. To add a structure
640         -- to desired layer on display it is necessary to set the layer
641         -- ID for the structure.
642
643     RemoveZLayer( me         : mutable;
644                   theCView   : CView from Graphic3d;
645                   theLayerId : ZLayerId from Graphic3d )
646         is deferred;
647         ---Purpose: Remove Z layer from the specified view. All structures
648         -- displayed at the moment in layer will be displayed in default layer
649         -- ( the bottom-level z layer ). To unset layer ID from associated
650         -- structures use method UnsetZLayer (...).
651
652     UnsetZLayer( me         : mutable;
653                  theLayerId : ZLayerId from Graphic3d )
654         is deferred;
655         ---Purpose: Unset Z layer ID for all structures. The structure
656         -- indexes will be set to default layer ( the bottom-level z layer
657         -- with ID = 0 ).
658
659     ChangeZLayer( me            : mutable;
660                   theCStructure : CStructure from Graphic3d;
661                   theCView      : CView from Graphic3d;
662                   theNewLayerId : ZLayerId from Graphic3d )
663         is deferred;
664         ---Purpose: Change Z layer of a structure already presented in view.
665
666     SetZLayerSettings( me          : mutable;
667                        theCView    : CView from Graphic3d;
668                        theLayerId  : ZLayerId from Graphic3d;
669                        theSettings : ZLayerSettings from Graphic3d)
670         is deferred;
671         ---Purpose:  Sets the settings for a single Z layer of specified view.
672
673     ChangePriority( me             : mutable;
674                     theCStructure  : CStructure from Graphic3d;
675                     theCView       : CView from Graphic3d;
676                     theNewPriority : Integer from Standard )
677         is deferred;
678         ---Purpose: Changes the priority of a structure within its Z layer
679         -- in the specified view.
680
681     -----------------------------
682     -- Category: Internal methods
683     -----------------------------
684
685     PrintBoolean ( me;
686                    AComment : CString from Standard;
687                    AValue   : Boolean from Standard );
688
689     PrintCLight ( me;
690                   ACLight   : CLight from Graphic3d;
691                   AField    : Integer from Standard );
692
693     PrintCStructure ( me;
694                       ACStructure   : CStructure from Graphic3d;
695                       AField    : Integer from Standard );
696
697     PrintCView ( me;
698                  ACView : CView from Graphic3d;
699                  AField : Integer from Standard );
700
701     PrintFunction ( me;
702                     AFunc   : CString from Standard );
703
704     PrintInteger ( me;
705                    AComment  : CString from Standard;
706                    AValue    : Integer from Standard );
707
708     PrintIResult ( me;
709                    AFunc    : CString from Standard;
710                    AResult  : Integer from Standard );
711
712     PrintShortReal ( me;
713                      AComment   : CString from Standard;
714                      AValue     : ShortReal from Standard );
715
716     PrintMatrix ( me;
717                   AComment  : CString from Standard;
718                   AMatrix   : Array2OfReal from TColStd )
719         raises TransformError from Graphic3d;
720
721     PrintString ( me;
722                   AComment  : CString from Standard;
723                   AString   : CString from Standard );
724
725     SetTrace ( me       : mutable;
726                ALevel   : Integer from Standard )
727         is static;
728
729     Trace ( me )
730         returns Integer from Standard
731         is static;
732
733     GetDisplayConnection (me)
734        returns DisplayConnection_Handle from Aspect;
735     ---C++: return const &
736
737     ---Purpose: returns Handle to display connection
738
739     IsDeviceLost (me)
740       returns Boolean from Standard;
741     -- Purpose: @return Standard_True in cases when the last view has been removed but some objects still present.
742
743     ResetDeviceLostFlag (me: mutable);
744     -- Purpose: Resets DeviceLostFlag to default (Standard_False) state.
745
746 fields
747
748     MyTraceLevel       : Integer from Standard is protected;
749     myDisplayConnection: DisplayConnection_Handle from Aspect is protected;
750     myDeviceLostFlag   : Boolean from Standard is protected;
751
752 end GraphicDriver from Graphic3d;