0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / V3d / V3d_Viewer.cdl
CommitLineData
b311480e 1-- Created on: 1992-01-17
2-- Created by: GG
3-- Copyright (c) 1992-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
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
4952a30a 21-- Modified FMN - 02/02/98 -> Specifique UNIX
22-- CAL - 16/07/98 -> S3892. Ajout grilles 3d.
23-- GG - 15/12/99 -> GER61351 Add SetDefaultBackgroundColor()
24-- and DefaultBackgroundColor() methods
25-- GG - 20/01/00 -> IMP200100 Add GridDrawMode() method
26-- GG - 24/01/00 -> IMP240100 Add SetGridEcho() methods
27-- Add GridEcho() method.
28-- Add ShowGridEcho() private method
29-- SAV - 26/11/02 -> Add new field to store grid echo aspect
7fd59977 30
6942f04a 31class Viewer from V3d inherits TShared from MMgt
7fd59977 32
4952a30a 33 ---Version:
7fd59977 34
4952a30a 35 ---Purpose: Defines services on Viewer type objects.
36 -- The methods of this class allow editing and
37 -- interrogation of the parameters linked to the viewer
38 -- its friend classes (View,light,plane).
7fd59977 39
4952a30a 40 ---Keywords: Viewer,Default Attributes
7fd59977 41
42 ---References:
43
4952a30a 44uses
7fd59977 45
dc3fe572 46 GraphicDriver from Graphic3d,
4952a30a 47 TypeOfUpdate from V3d,
48 TypeOfVisualization from V3d,
49 TypeOfShadingModel from V3d,
50 TypeOfSurfaceDetail from V3d,
51 TypeOfOrientation from V3d,
52 View from V3d,
53 Light from V3d,
54 Plane from V3d,
55 ListOfTransient from V3d,
7fd59977 56 ListIteratorOfListOfTransient from TColStd,
59f45b7c 57 SequenceOfInteger from TColStd,
7fd59977 58 TypeOfView from V3d,
4952a30a 59 Vector from Graphic3d,
60 ViewManager from Visual3d,
61 NameOfColor from Quantity,
62 TypeOfColor from Quantity,
63 Color from Quantity,
64 Length from Quantity,
65 PlaneAngle from Quantity,
66 Background from Aspect,
67 GradientBackground from Aspect,
68 Parameter from Quantity,
69 OrthographicView from V3d,
70 PerspectiveView from V3d,
7fd59977 71 AsciiString,ExtendedString from TCollection,
72 Ax3 from gp,Structure from Graphic3d,
4952a30a 73 Vertex from Graphic3d,
74 Group from Graphic3d,
75 AspectMarker3d from Graphic3d,
76 RectangularGrid from V3d,
77 CircularGrid from V3d,
78 Grid from Aspect,
79 GridType from Aspect,
80 GridDrawMode from Aspect,
7fd59977 81 GradientFillMethod from Aspect
82
7fd59977 83raises
84
6942f04a 85 BadValue from V3d
7fd59977 86
87is
88
6942f04a 89 Create (theDriver : GraphicDriver from Graphic3d;
90 theName : ExtString from Standard;
91 theDomain : CString from Standard = "";
92 theViewSize : Length from Quantity = 1000.0 ;
93 theViewProj : TypeOfOrientation from V3d= V3d_XposYnegZpos ;
94 theViewBackground : NameOfColor from Quantity = Quantity_NOC_GRAY30;
95 theVisualization : TypeOfVisualization from V3d = V3d_ZBUFFER;
96 theShadingModel : TypeOfShadingModel from V3d = V3d_GOURAUD ;
97 theUpdateMode : TypeOfUpdate from V3d = V3d_WAIT;
98 theComputedMode : Boolean from Standard = Standard_True;
99 theDefaultComputedMode: Boolean from Standard = Standard_True;
100 theSurfaceDetail : TypeOfSurfaceDetail from V3d = V3d_TEX_NONE)
4952a30a 101 returns mutable Viewer from V3d
dc3fe572 102 ---Purpose: Create a Viewer with the given graphic driver and the given parameters or
4952a30a 103 -- with their default values.
bcfa72e4 104 -- Currently creating of more than 100 viewer instances
105 -- is not supported and leads to an exception.
106 -- This limitation might be addressed in some future OCCT releases.
6942f04a 107 raises BadValue from V3d ;
4952a30a 108 ---Purpose: If the size of the view is <= 0
dc3fe572 109 -- Warning: Client must creates a graphic driver
7fd59977 110
111 CreateView (me: mutable) returns mutable View from V3d;
4952a30a 112 ---Level: Public
113 ---Purpose: creates a view in the viewer according to its
114 -- default parameters.
115
7fd59977 116 DefaultOrthographicView(me: mutable) returns mutable OrthographicView from V3d;
4952a30a 117
7fd59977 118 DefaultPerspectiveView(me: mutable) returns mutable PerspectiveView from V3d;
119
120 -------------------------------------------------------
4952a30a 121 ---Category: Methods to modify the status of the viewer
7fd59977 122 -------------------------------------------------------
123
124 SetViewOn (me:mutable );
4952a30a 125 ---Level: Public
126 ---Purpose: Activates all of the views of a viewer attached
127 -- to a window.
128
129 SetViewOn (me:mutable; View : View from V3d )
130 ---Level: Public
131 ---Purpose: Activates a particular view in the Viewer .
132 -- Must be call if the Window attached to the view
133 -- has been Deiconified .
6942f04a 134 raises BadValue from V3d;
4952a30a 135 -- If the view is not mapped on the window.
7fd59977 136
137 SetViewOff (me:mutable);
4952a30a 138 ---Level: Public
7fd59977 139 ---Purpose: Deactivates all the views of a Viewer
4952a30a 140 -- attached to a window.
141
142 SetViewOff (me:mutable; View : View from V3d)
143 ---Level: Public
144 ---Purpose: Deactivates a particular view in the Viewer.
145 -- Must be call if the Window attached to the view
146 -- has been Iconified .
6942f04a 147 raises BadValue from V3d;
4952a30a 148 -- If the view is not mapped on the window.
7fd59977 149
6942f04a 150 Update (me:mutable ) is static;
4952a30a 151 ---Level: Public
298f9ad7 152 ---Purpose: Deprecated, Redraw() should be used instead.
7fd59977 153
154 UpdateLights (me: mutable);
4952a30a 155 ---Level: Public
156 ---Purpose: Updates the lights of all the views of a viewer.
7fd59977 157
158 Redraw ( me );
4952a30a 159 ---Level: Public
7fd59977 160 ---Purpose: Redraws all the views of the Viewer even if no
4952a30a 161 -- modification has taken place. Must be called if
162 -- all the views of the Viewer are exposed, as for
163 -- example in a global DeIconification.
7fd59977 164
165 Remove (me:mutable);
4952a30a 166 ---Level: Public
7fd59977 167 ---Purpose: Suppresses the Viewer.
168
4952a30a 169 Erase ( me );
170 ---Level: Public
171 ---Purpose: Erase all Objects in All the views.
7fd59977 172
4952a30a 173 UnHighlight ( me );
174 ---Level: Public
175 ---Purpose: UnHighlight all Objects in All the views.
7fd59977 176
4952a30a 177 SetDefaultBackgroundColor (me:mutable; Type : TypeOfColor; V1, V2, V3 : Parameter );
178 ---Level: Public
179 ---Purpose: Defines the default base colour of views attached
180 -- to the Viewer by supplying the type of colour
181 -- definition and the three component values..
7fd59977 182
4952a30a 183 SetDefaultBackgroundColor (me:mutable; Name : NameOfColor );
184 ---Level: Public
185 ---Purpose: Defines the default background colour of views
186 -- attached to the viewer by supplying the name of the
187 -- colour under the form Quantity_NOC_xxxx .
7fd59977 188
4952a30a 189 SetDefaultBackgroundColor (me:mutable; Color : Color from Quantity);
190 ---Level: Public
191 ---Purpose: Defines the default background colour of views
192 -- attached to the viewer by supplying the color object
7fd59977 193
4952a30a 194 SetDefaultBgGradientColors ( me:mutable;
7fd59977 195 Name1 : NameOfColor;
196 Name2 : NameOfColor;
197 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR );
4952a30a 198 ---Level: Public
199 ---Purpose: Defines the default gradient background colours of view
200 -- attached to the viewer by supplying the name of the
201 -- colours under the form Quantity_NOC_xxxx .
7fd59977 202
4952a30a 203 SetDefaultBgGradientColors ( me : mutable ;
204 Color1 : Color from Quantity;
7fd59977 205 Color2 : Color from Quantity;
206 FillStyle : GradientFillMethod from Aspect = Aspect_GFM_HOR );
207 ---Level: Public
4952a30a 208 ---Purpose: Defines the default gradient background colours of views
209 -- attached to the viewer by supplying the colour objects
7fd59977 210
4952a30a 211 SetDefaultViewSize (me:mutable; Size : Length )
212 ---Level: Public
213 ---Purpose: Gives a default size for the creation of views of
214 -- the viewer.
6942f04a 215 raises BadValue from V3d;
4952a30a 216 -- If the size of the view is <= 0
7fd59977 217
4952a30a 218 SetDefaultViewProj (me:mutable; Orientation : TypeOfOrientation );
219 ---Level: Public
220 ---Purpose: Gives the default projection for creating views
221 -- in the viewer.
7fd59977 222
4952a30a 223 SetDefaultVisualization(me:mutable; Type : TypeOfVisualization from V3d);
224 ---Level: Public
225 ---Purpose: Gives the default visualisation mode..
7fd59977 226
227
228 SetZBufferManagment(me: mutable; Automatic: Boolean from Standard);
4952a30a 229 ---Level: Public
230 ---Purpose: defines the strategy concerning the ZBuffer activity.
231 -- If Automatic is true, ZBuffer will be activated or
232 -- deactivated depending on the fact that faces exist or
233 -- not in the Viewer. This will optimize the response time
234 -- in the case where only wireframe objects are displayed.
235 -- If Automatic is False, ZBuffer will be activated or
236 -- deactivated depending on the choice of SetVisualization
237 -- in each View.
238 -- Note that by default, the ZBufferManagment is not automatic.
239
7fd59977 240 ZBufferManagment(me) returns Boolean from Standard;
4952a30a 241 ---Level: Public
242 ---Purpose: returns the ZBuffer stategy choice.
243
244 SetDefaultShadingModel(me:mutable; Type : TypeOfShadingModel from V3d);
245 ---Level: Public
246 ---Purpose: Gives the default type of SHADING.
247
248 SetDefaultSurfaceDetail(me:mutable; Type : TypeOfSurfaceDetail from V3d);
249 ---Level: Public
250 ---Purpose: Gives the default type of texture mapping.
7fd59977 251
252 SetDefaultAngle (me:mutable; Angle : PlaneAngle from Quantity);
4952a30a 253 ---Level: Public
254
255 SetUpdateMode ( me: mutable ; Mode : TypeOfUpdate from V3d );
256 ---Level: Public
257 ---Purpose: Defines the mode of regenerating the views making
258 -- up the viewer. This can be immediate <ASAP> or
259 -- deferred <WAIT>. In this latter case, the views are
260 -- updated when the method Update(me) is called.
7fd59977 261
262 SetDefaultTypeOfView(me:mutable; Type : TypeOfView from V3d);
4952a30a 263 ---Level: Public
7fd59977 264
265
266 SetPrivilegedPlane(me: mutable; aPlane: Ax3 from gp);
4952a30a 267 ---Level: Public
268
7fd59977 269 PrivilegedPlane(me) returns Ax3 from gp;
4952a30a 270 ---Level: Public
271
272 DisplayPrivilegedPlane(me: mutable; OnOff: Boolean from Standard; aSize: Length from Quantity = 1);
273 ---Level: Public
274
275 SetLightOn(me:mutable; MyLight : Light from V3d )
276 ---Level: Public
277 ---Purpose: Activates MyLight in the viewer.
6942f04a 278 raises BadValue from V3d;
4952a30a 279 -- If No More Light can be activated in MyViewer .
280
281 SetLightOn(me:mutable)
282 ---Level: Public
283 ---Purpose: Activates all the lights defined in this viewer.
6942f04a 284 raises BadValue from V3d;
4952a30a 285 -- If No More Light can be activated in MyViewer .
286
287 SetLightOff(me:mutable; MyLight : Light from V3d );
288 ---Level: Public
289 ---Purpose: Desactivate MyLight in this viewer.
290
291 SetLightOff(me:mutable);
292 ---Level: Public
293 ---Purpose: Deactivate all the Lights defined in this viewer.
294
295 DelLight(me:mutable; MyLight : Light from V3d);
296 ---Level: Internal
297 ---Purpose: Delete Light in Sequence Of Lights.
298
7fd59977 299 SetCurrentSelectedLight (me : mutable; TheLight : Light from V3d);
4952a30a 300 ---Level: Advanced
7fd59977 301 ---Purpose: Defines the selected light.
302
4952a30a 303 ClearCurrentSelectedLight (me : mutable);
304 ---Level: Advanced
305 ---Purpose: Defines the selected light at NULL.
7fd59977 306
307 -----------------------------------------
308 ---Category: Inquire methods
309 -----------------------------------------
310
4952a30a 311 DefaultBackgroundColor ( me ; Type : TypeOfColor ; V1,V2,V3 : out Parameter);
312 ---Level: Public
313 ---Purpose: Returns the default background colour depending of the type.
314 DefaultBackgroundColor ( me ) returns Color from Quantity;
315 ---Level: Public
316 ---Purpose: Returns the default background colour object.
7fd59977 317
4952a30a 318 DefaultBgGradientColors( me;
7fd59977 319 Color1 : out Color from Quantity;
4952a30a 320 Color2 : out Color from Quantity) ;
321 ---Level: Public
7fd59977 322 ---Purpose: Returns the gradient background colour objects of the view.
323
4952a30a 324 DefaultViewSize ( me) returns Length;
325 ---Level: Public
326 ---Purpose: Returns the default size of the view.
7fd59977 327
4952a30a 328 DefaultViewProj ( me) returns TypeOfOrientation;
329 ---Level: Public
330 ---Purpose: Returns the default Projection.
7fd59977 331
4952a30a 332 DefaultVisualization ( me ) returns TypeOfVisualization from V3d;
333 ---Level: Public
334 ---Purpose: Returns the default type of Visualization.
7fd59977 335
4952a30a 336 DefaultShadingModel ( me ) returns TypeOfShadingModel from V3d;
337 ---Level: Public
338 ---Purpose: Returns the default type of Shading
7fd59977 339
4952a30a 340 DefaultSurfaceDetail ( me ) returns TypeOfSurfaceDetail from V3d;
341 ---Level: Public
342 ---Purpose: Returns the default type of texture mapping
7fd59977 343
344 DefaultAngle ( me ) returns PlaneAngle from Quantity;
4952a30a 345 ---Level: Public
346
347 UpdateMode ( me ) returns TypeOfUpdate from V3d;
348 ---Level: Public
349 ---Purpose: Returns the regeneration mode of views in the viewer.
7fd59977 350
351 IfMoreViews( me ) returns Boolean;
4952a30a 352 ---Level: Advanced
7fd59977 353 ---Purpose: Returns True if One View more can be
354 -- activated in this Viewer.
4952a30a 355 --
356
357 ------------------------------
358 ---Category: iteration methods
359 ------------------------------
360
361 InitActiveViews(me: mutable);
362 ---Level: Advanced
363 ---Purpose: initializes an iteration on the active views.
364
365 MoreActiveViews (me) returns Boolean from Standard;
366 ---Level: Advanced
367 ---Purpose: returns true if there are more active view(s) to return.
368
369 NextActiveViews (me: mutable);
370 ---Level: Advanced
7fd59977 371 ---Purpose : Go to the next active view
372 -- (if there is not, ActiveView will raise an exception)
4952a30a 373
7fd59977 374 ActiveView(me) returns mutable View from V3d;
4952a30a 375 ---Level: Advanced
376
377 LastActiveView(me) returns Boolean from Standard;
378 ---Level: Advanced
379 ---Purpose: returns true if there is only
380 -- one active view.
381
382 InitDefinedViews(me: mutable);
383 ---Level: Advanced
384 ---Purpose: initializes an iteration on the Defined views.
385
386
387 MoreDefinedViews (me) returns Boolean from Standard;
388 ---Level: Advanced
389 ---Purpose: returns true if there are more Defined view(s) to return.
390
391
392 NextDefinedViews (me: mutable);
393 ---Level: Advanced
7fd59977 394 ---Purpose : Go to the next Defined view
395 -- (if there is not, DefinedView will raise an exception)
4952a30a 396
397 DefinedView(me) returns View from V3d;
398 ---Level: Advanced
399
400 InitActiveLights(me: mutable);
401 ---Level: Advanced
402 ---Purpose: initializes an iteration on the active Lights.
403
404 MoreActiveLights (me) returns Boolean from Standard;
405 ---Level: Advanced
406 ---Purpose: returns true if there are more active Light(s) to return.
407
408
409 NextActiveLights (me: mutable);
410 ---Level: Advanced
7fd59977 411 ---Purpose : Go to the next active Light
412 -- (if there is not, ActiveLight will raise an exception)
413
4952a30a 414
415 ActiveLight(me) returns mutable Light from V3d;
416 ---Level: Advanced
417
418 InitDefinedLights(me: mutable);
419 ---Level: Advanced
420 ---Purpose: initializes an iteration on the Defined Lights.
421
422 MoreDefinedLights (me) returns Boolean from Standard;
423 ---Level: Advanced
424 ---Purpose: returns true if there are more Defined Light(s) to return.
425
426 NextDefinedLights (me: mutable);
427 ---Level: Advanced
7fd59977 428 ---Purpose : Go to the next Defined Light
429 -- (if there is not, DefinedLight will raise an exception)
4952a30a 430
7fd59977 431 DefinedLight(me) returns Light from V3d;
4952a30a 432 ---Level: Advanced
433
434 AddPlane( me: mutable; MyPlane : Plane from V3d);
435 ---Purpose: Adds Plane in Sequence Of Planes.
436
437 DelPlane( me: mutable; MyPlane : Plane from V3d);
438 ---Purpose: Delete Plane in Sequence Of Planes.
439
440 InitDefinedPlanes(me: mutable);
441 ---Level: Advanced
442 ---Purpose: initializes an iteration on the Defined Planes.
443
444 MoreDefinedPlanes (me) returns Boolean from Standard;
445 ---Level: Advanced
446 ---Purpose: returns true if there are more Defined Plane(s) to return.
447
448 NextDefinedPlanes (me: mutable);
449 ---Level: Advanced
7fd59977 450 ---Purpose : Go to the next Defined Plane
451 -- (if there is not, DefinedPlane will raise an exception)
4952a30a 452
7fd59977 453 DefinedPlane(me) returns Plane from V3d;
4952a30a 454 ---Level: Advanced
455
456 Viewer (me) returns mutable ViewManager ;
457 ---Level: Advanced
458 ---Purpose: Returns the viewer associated to Visual3d .
7fd59977 459
460 CurrentSelectedLight (me) returns Light from V3d;
4952a30a 461 ---Level: Advanced
462 ---Purpose: Returns the Selected Light.
7fd59977 463
464 IsGlobalLight (me; TheLight : Light from V3d) returns Boolean;
4952a30a 465 ---Level: Advanced
466
7fd59977 467 ComputedMode(me) returns Boolean from Standard;
4952a30a 468 ---Level: Public
469 ---Purpose: returns true if the computed mode can be used.
7fd59977 470
471 DefaultComputedMode(me) returns Boolean from Standard;
4952a30a 472 ---Level: Public
473 ---Purpose: returns true if by default the computed mode must be used.
7fd59977 474
475 -----------------------------------------
4952a30a 476 ---Category: grid management
7fd59977 477 -----------------------------------------
478
4952a30a 479 ActivateGrid (me : mutable;
480 aGridType : GridType from Aspect;
481 aGridDrawMode : GridDrawMode from Aspect)
482 is static;
483 ---Purpose: Activates the grid in all views of <me>.
484 ---Level : Public
485 ---Category: grid management
486
487 DeactivateGrid (me : mutable)
488 is static;
489 ---Purpose: Deactivates the grid in all views of <me>.
490 ---Level : Public
491 ---Category: grid management
492
493 SetGridEcho (me : mutable;
494 showGrid: Boolean from Standard = Standard_True) is static;
495 ---Purpose: Show/Don't show grid echo to the hit point.
496 -- If TRUE,the grid echo will be shown at ConvertToGrid() time.
497 ---Level : Public
498 ---Category: grid management
499
500 SetGridEcho (me : mutable;
501 aMarker: AspectMarker3d from Graphic3d) is static;
502 ---Purpose: Show grid echo <aMarker> to the hit point.
503 -- Warning: When the grid echo marker is not set,
504 -- a default marker is build with the attributes:
505 -- marker type : Aspect_TOM_STAR
506 -- marker color : Quantity_NOC_GRAY90
507 -- marker size : 3.0
508 ---Level : Public
509 ---Category: grid management
510
511 GridEcho (me) returns Boolean from Standard is static;
512 ---Purpose: Returns TRUE when grid echo must be displayed
513 -- at hit point.
514 ---Level : Public
515 ---Category: grid management
516
517 IsActive (me)
518 returns Boolean from Standard
519 is static;
520 ---Purpose: Returns Standard_True if a grid is activated in <me>.
521 ---Level : Public
522 ---Category: grid management
523
524 Grid (me)
525 returns mutable Grid from Aspect
526 is static;
7fd59977 527 ---Purpose : Returns the defined grid in <me>.
4952a30a 528 ---Level : Public
529 ---Category: grid management
530
531 GridType (me)
532 returns GridType from Aspect
533 is static;
534 ---Purpose: Returns the current grid type defined in <me>.
535 ---Level : Public
536 ---Category: grid management
537
538 GridDrawMode (me)
539 returns GridDrawMode from Aspect
540 is static;
541 ---Purpose: Returns the current grid draw mode defined in <me>.
542 ---Level : Public
543 ---Category: grid management
544
545 RectangularGridValues (me;
546 XOrigin, YOrigin : out Length from Quantity;
547 XStep, YStep : out Length from Quantity;
548 RotationAngle : out PlaneAngle from Quantity)
549 is static;
550 ---Purpose: Returns the definition of the rectangular grid.
551 ---Level : Public
552 ---Category: grid management
553
554 SetRectangularGridValues (me : mutable;
555 XOrigin, YOrigin : Length from Quantity;
556 XStep, YStep : Length from Quantity;
557 RotationAngle : PlaneAngle from Quantity)
558 is static;
559 ---Purpose: Sets the definition of the rectangular grid.
560 --- <XOrigin>, <YOrigin> defines the origin of the grid.
561 --- <XStep> defines the interval between 2 vertical lines.
562 --- <YStep> defines the interval between 2 horizontal lines.
563 --- <RotationAngle> defines the rotation angle of the grid.
564 ---Level : Public
565 ---Category: grid management
566
567 CircularGridValues (me;
568 XOrigin, YOrigin : out Length from Quantity;
569 RadiusStep : out Length from Quantity;
570 DivisionNumber : out Integer from Standard;
571 RotationAngle : out PlaneAngle from Quantity)
572 is static;
573 ---Purpose: Returns the definition of the circular grid.
574 ---Level : Public
575 ---Category: grid management
576
577 SetCircularGridValues (me : mutable;
578 XOrigin, YOrigin : Length from Quantity;
579 RadiusStep : Length from Quantity;
580 DivisionNumber : Integer from Standard;
581 RotationAngle : PlaneAngle from Quantity)
582 is static;
583 ---Purpose: Sets the definition of the circular grid.
584 --- <XOrigin>, <YOrigin> defines the origin of the grid.
585 --- <RadiusStep> defines the interval between 2 circles.
586 --- <DivisionNumber> defines the section number of one half circle.
587 --- <RotationAngle> defines the rotation angle of the grid.
588 ---Level : Public
589 ---Category: grid management
590
591 CircularGridGraphicValues (me;
592 Radius : out Length from Quantity;
593 OffSet : out Length from Quantity)
594 is static;
595 ---Purpose: Returns the location and the size of the grid.
596 ---Level : Public
597 ---Category: grid management
598
599 SetCircularGridGraphicValues (me : mutable;
600 Radius : Length from Quantity;
601 OffSet : Length from Quantity)
602 is static;
603 ---Purpose: Sets the location and the size of the grid.
604 --- <XSize> defines the width of the grid.
605 --- <YSize> defines the height of the grid.
606 --- <OffSet> defines the displacement along the plane normal.
607 ---Level : Public
608 ---Category: grid management
609
610 RectangularGridGraphicValues (me;
611 XSize, YSize : out Length from Quantity;
612 OffSet : out Length from Quantity)
613 is static;
614 ---Purpose: Returns the location and the size of the grid.
615 ---Level : Public
616 ---Category: grid management
617
618 SetRectangularGridGraphicValues (me : mutable;
619 XSize, YSize : Length from Quantity;
620 OffSet : Length from Quantity)
621 is static;
622 ---Purpose: Sets the location and the size of the grid.
623 --- <XSize> defines the width of the grid.
624 --- <YSize> defines the height of the grid.
625 --- <OffSet> defines the displacement along the plane normal.
626 ---Level : Public
627 ---Category: grid management
7fd59977 628
629 -----------------------------------------
630 ---Category: Private or Protected methods
631 -----------------------------------------
632
4952a30a 633 GetBackgroundColor ( me )
634 returns Background from Aspect is private;
635 ---Purpose: Returns the default background colour.
7fd59977 636
4952a30a 637 GetGradientBackground ( me ) returns GradientBackground from Aspect;
638 ---Level: Public
639 ---Purpose: Returns the gradient background of the view.
7fd59977 640
4952a30a 641 AddView( me: mutable; MyView : View from V3d) is private;
642 ---Purpose: Adds View in Sequence Of Views.
7fd59977 643
4952a30a 644 DelView( me: mutable; MyView : View from V3d) is private;
645 ---Purpose: Delete View in Sequence Of Views.
7fd59977 646
4952a30a 647 AddLight( me: mutable; MyLight : Light from V3d) is private;
648 ---Purpose: Adds Light in Sequence Of Lights.
7fd59977 649
650 SetDefaultLights(me: mutable);
4952a30a 651 ---Purpose: defines default lights -
652 -- positional-light 0.3 0. 0.
653 -- directional-light V3d_XnegYposZpos
654 -- directional-light V3d_XnegYneg
655 -- ambient-light
7fd59977 656
657 Init(me: mutable);
658
659 IsActive(me; aView: View from V3d)
4952a30a 660 returns Boolean from Standard is private;
661
662 ShowGridEcho(me : mutable;
663 aView: View from V3d;
664 aPoint: Vertex from Graphic3d) is private;
665 ---Purpose:
666 -- Display grid echo at requested point in the view.
667
59f45b7c 668 AddZLayer ( me : mutable;
669 theLayerId : in out Integer from Standard )
670 returns Boolean from Standard is static;
671 ---Purpose: Add a new top-level Z layer to all managed views and get
672 -- its ID as <theLayerId> value. The Z layers are controlled entirely
673 -- by viewer, it is not possible to add a layer to a
674 -- particular view. The method returns Standard_False if the layer can
675 -- not be created. The layer mechanism allows to display structures
676 -- in higher layers in overlay of structures in lower layers.
677
678 RemoveZLayer ( me : mutable;
679 theLayerId : Integer from Standard )
680 returns Boolean from Standard is static;
681 ---Purpose: Remove Z layer with ID <theLayerId>. Method returns
682 -- Standard_False if the layer can not be removed or doesn't exists.
683 -- By default, there are always default bottom-level layer that can't
684 -- be removed.
685
686 GetAllZLayers ( me;
687 theLayerSeq : out SequenceOfInteger from TColStd )
688 is static;
689 ---Purpose: Return all Z layer ids in sequence ordered by overlay level
690 -- from lowest layer to highest ( foreground ). The first layer ID
691 -- in sequence is the default layer that can't be removed.
692
6942f04a 693 Driver(me) returns mutable GraphicDriver from Graphic3d
694 is static;
695 ---C++: return const &
696
697 NextName(me) returns ExtString from Standard
698 is static;
699
700 Domain(me) returns CString from Standard
701 is static;
702
703 IncrCount(me:mutable) is static protected;
704
7fd59977 705fields
706
6942f04a 707 myNextCount: Integer from Standard;
708 myDriver: GraphicDriver from Graphic3d;
709 myName: ExtendedString from TCollection;
710 myDomain: AsciiString from TCollection;
711
4952a30a 712 MyViewer: ViewManager from Visual3d ;
713 MyDefinedViews: ListOfTransient from V3d;
714 MyActiveViews: ListOfTransient from V3d;
715 MyDefinedLights: ListOfTransient from V3d;
716 MyActiveLights: ListOfTransient from V3d;
717 MyDefinedPlanes: ListOfTransient from V3d;
718 MyBackground: Background from Aspect ;
719 MyGradientBackground: GradientBackground from Aspect ;
720 MyViewSize: Real ;
721 MyViewProj: TypeOfOrientation from V3d ;
7fd59977 722 MyVisualization: TypeOfVisualization from V3d ;
4952a30a 723 MyShadingModel: TypeOfShadingModel from V3d ;
724 MySurfaceDetail: TypeOfSurfaceDetail from V3d ;
725 MyDefaultAngle: PlaneAngle from Quantity;
7fd59977 726 MyDefaultTypeOfView: TypeOfView from V3d;
727 MyDefaultOrthographicView: OrthographicView from V3d;
728 MyDefaultPerspectiveView: PerspectiveView from V3d;
4952a30a 729 MyCurrentSelectedLight: Light from V3d;
7fd59977 730 myActiveViewsIterator: ListIteratorOfListOfTransient from TColStd;
731 myDefinedViewsIterator: ListIteratorOfListOfTransient from TColStd;
732 myActiveLightsIterator: ListIteratorOfListOfTransient from TColStd;
733 myDefinedLightsIterator: ListIteratorOfListOfTransient from TColStd;
734 myDefinedPlanesIterator: ListIteratorOfListOfTransient from TColStd;
735 myComputedMode: Boolean from Standard;
736 myDefaultComputedMode: Boolean from Standard;
4952a30a 737 myPrivilegedPlane: Ax3 from gp;
738 myPlaneStructure: Structure from Graphic3d;
739 myDisplayPlane: Boolean from Standard;
7fd59977 740 myDisplayPlaneLength: Length from Quantity;
741
4952a30a 742 myRGrid: RectangularGrid from V3d;
743 myCGrid: CircularGrid from V3d;
744 myGridType: GridType from Aspect;
7fd59977 745
4952a30a 746 myGridEcho: Boolean from Standard;
747 myGridEchoStructure: Structure from Graphic3d;
748 myGridEchoGroup: Group from Graphic3d;
749 myGridEchoAspect : AspectMarker3d from Graphic3d;
7fd59977 750friends
751
4952a30a 752 class View from V3d,
753 class Light from V3d,
754 class Plane from V3d,
7fd59977 755 SetPlane from package V3d (aViewer: Viewer from V3d; x1,y1,z1,x2,y2,z2: Length from Quantity)
756end Viewer;