0023024: Update headers of OCCT files
[occt.git] / src / Graphic3d / Graphic3d_Structure.cdl
1 -- Created on: 1991-06-12
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1991-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
21 --              11/97 ; CAL : gestion du GraphicClear
22 --              11/97 ; CAL : ajout pointer StructPtr
23 --              11/97 ; CAL : amelioration de l'effacement SetManager
24 --              01/98 ; CAL : gestion du HLRValidation
25 --              05/98 ; CAL : gestion du GraphicConnect et Disconnect
26 --              02/00 ; GG  : Made Transform() methode not mutable.
27 --              31/05/01 ; GG : Add ResetDisplayPriority() method
28
29 class Structure from Graphic3d inherits TShared
30
31         ---Version:
32
33         ---Purpose: This class allows the definition a graphic object.
34         --          This graphic structure can be displayed,
35         --          erased, or highlighted.
36         --          This graphic structure can be connected with
37         --          another graphic structure.
38         --  Keywords: Structure, StructureManager, Display, Erase, Highlight,
39         --           UnHighlight, Visible, Priority, Selectable, Visible,
40         --           Visual, Connection, Ancestors, Descendants, Transformation
41
42         ---Warning:
43         ---References:
44
45 uses
46
47         Array2OfReal            from TColStd,
48         SequenceOfAddress       from TColStd,
49
50         Color                   from Quantity,
51
52         GenId                   from Aspect,
53         TypeOfHighlightMethod   from Aspect,
54
55         DataStructureManager    from Graphic3d,
56         AspectFillArea3d        from Graphic3d,
57         AspectLine3d            from Graphic3d,
58         AspectMarker3d          from Graphic3d,
59         AspectText3d            from Graphic3d,
60         CStructure              from Graphic3d,
61         GraphicDriver           from Graphic3d,
62         Group                   from Graphic3d,
63         SequenceOfGroup         from Graphic3d,
64         HSequenceOfGroup        from Graphic3d,
65         SequenceOfStructure     from Graphic3d,
66         HSequenceOfStructure    from Graphic3d,
67         MapOfStructure          from Graphic3d,
68         Plotter                 from Graphic3d,
69         StructureManager        from Graphic3d,
70         TypeOfComposition       from Graphic3d,
71         TypeOfConnection        from Graphic3d,
72         TypeOfPrimitive         from Graphic3d,
73         TypeOfStructure         from Graphic3d,
74         Vector                  from Graphic3d,
75         VertexNC                from Graphic3d,
76         Vertex                  from Graphic3d,
77         TransModeFlags          from Graphic3d,
78         Pnt                     from gp
79
80 raises
81
82         PriorityDefinitionError         from Graphic3d,
83         StructureDefinitionError        from Graphic3d,
84         TransformError                  from Graphic3d
85
86 is
87
88         ------------------------
89         -- Category: Constructor
90         ------------------------
91
92         Create ( AManager       : StructureManager from Graphic3d )
93                 returns mutable Structure from Graphic3d;
94         ---Level: Public
95         ---Purpose: Creates a graphic object in the manager <AManager>.
96         --          It will appear in all the views of the visualiser.
97         --  Warning: The default values AspectLine, AspectFillArea,
98         --          AspectText and AspectMarker are NOT applied to the
99         --          structure.
100         --          The structure is not displayed when it is created.
101
102         ---------------------------------------------------
103         -- Category: Methods to modify the class definition
104         ---------------------------------------------------
105
106         --------------------------------------------------------
107         -- Summary of Display Priorities                      --
108         --                                                    --
109         -- Structure display priorities  control the order in --
110         -- which structures are redrawn.                      --
111         --                                                    --
112         -- When  you  display  a structure, you  specify  its --
113         -- priority.  The  lower  the  value, the  lower  the --
114         -- display priority. When the display is regenerated, --
115         -- the structures  with the lowest priority are drawn --
116         -- first.                                             --
117         -- For  structures  with the  same display  priority, --
118         -- the  order in which they were displayed determines --
119         -- determines the drawing order.                      --
120         --                                                    --
121         -- CAS.CADE supports 11 structure display priorities, --
122         -- 0 to 10.                                           --
123         --------------------------------------------------------
124
125         Clear ( me              : mutable;
126                 WithDestruction : Boolean from Standard = Standard_True )
127                 is virtual;
128         ---Level: Public
129         ---Purpose: if WithDestruction == Standard_True then
130         --              suppress all the groups of primitives in the structure.
131         --              and it is mandatory to create a new group in <me>.
132         --          if WithDestruction == Standard_False then
133         --              clears all the groups of primitives in the structure.
134         --              and all the groups are conserved and empty.
135         --          They will be erased at the next screen update.
136         --          The structure itself is conserved.
137         --          The transformation and the attributes of <me> are conserved.
138         --          The childs of <me> are conserved.
139         ---Category: Methods to modify the class definition
140
141         Destroy ( me    : mutable )
142                 is virtual;
143         ---Level: Public
144         ---Purpose: Suppresses the structure <me>.
145         --          It will be erased at the next screen update.
146         ---Category: Methods to modify the class definition
147         ---C++: alias ~
148
149         Display ( me    : mutable )
150                 is virtual;
151         ---Level: Public
152         ---Purpose: Displays the structure <me> in all the views of
153         --          the visualiser.
154         ---Category: Methods to modify the class definition
155
156         Display ( me            : mutable;
157                   Priority      : Integer from Standard )
158         ---Level: Public
159         ---Purpose: Displays the structure <me> in all the views of
160         --          the visualiser, while modifying its current priority.
161         --          Note: Display Priorities
162         --          Structure display priorities control the order in which
163         --          structures are redrawn.   When you display a
164         --          structure, you specify its priority. The lower the value,
165         --          the lower the display priority. When the display is
166         --          regenerated, the structures with the lowest priority
167         --          are drawn first. For structures with the same display
168         --          priority, the order in which they were displayed
169         --          determines the drawing order. Open CASCADE
170         --          supports 11 structure display priorities, 0 to 10.
171         --          Warning: Raises PriorityDefinitionError if <Priority> is
172         --          greater than 10 or a negative value.
173         raises PriorityDefinitionError from Graphic3d is static;
174
175         DisplayPriority ( me )
176                 returns Integer from Standard
177                 is static;
178         ---Level: Public
179         ---Purpose: Returns the current display priority for the
180         --          structure <me>.
181         ---Category: Methods to modify the class definition
182
183         Erase ( me      : mutable )
184                 is virtual;
185         ---Level: Public
186         ---Purpose: Erases the structure <me> in all the views
187         --          of the visualiser.
188         ---Category: Methods to modify the class definition
189
190         Highlight ( me          : mutable;
191                     Method      : TypeOfHighlightMethod from Aspect )
192                 is static;
193         ---Level: Public
194         ---Purpose: Highlights the structure <me> in all the
195         --          views of the visualiser, using the following methods:
196         --
197         --   TOHM_COLOR         = drawn in the highlight color
198         --                                (default white)
199         --          TOHM_BLINK          = blinking
200         --   TOHM_BOUNDBOX      = enclosed by the boundary box
201         --                                (default white)
202         --
203         ---Category: Methods to modify the class definition
204
205         Remove ( me     : mutable )
206                 is static;
207         ---Level: Public
208         ---Purpose: Suppress the structure <me>.
209         --          It will be erased at the next screen update.
210         --  Warning: No more graphic operations in <me> after this call.
211         --  Category: Methods to modify the class definition
212
213         SetHighlightColor ( me          : mutable;
214                             AColor      : Color from Quantity )
215                 is static;
216         ---Level: Public
217         ---Purpose: Modifies the highlight color for the Highlight method
218         --          with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
219         ---Category: Methods to modify the class definition
220
221         SetInfiniteState ( me           : mutable;
222                            AFlag        : Boolean from Standard )
223                 is static;
224         ---Level: Internal
225         ---Purpose: Modifies the coordinates of the boundary box
226         --          of the structure <me>.
227         --          if <AFlag> is Standard_True then <me> is infinite and
228         --          the MinMaxValues method or the MinMaxCoord method return :
229         --          XMin = YMin = ZMin = RealFirst ().
230         --          XMax = YMax = ZMax = RealLast ().
231         --          By default, <me> is not infinite but empty.
232         ---Category: Methods to modify the class definition
233
234         SetDisplayPriority ( me         : mutable;
235                              Priority   : Integer from Standard )
236         ---Level: Public
237         ---Purpose: Modifies the order of displaying the structure.
238         --          Values are between 0 et 10.
239         --          The priority 10 being displayed first.
240         --          The default value is 5
241         --  Category: Methods to modify the class definition
242         --  Warning: If <me> is displayed then the SetDisplayPriority
243         --          method erase <me> and display <me> with the
244         --          new priority.
245         --          Raises PriorityDefinitionError if <Priority> is
246         --          greater than 10 or a negative value.
247         raises PriorityDefinitionError from Graphic3d is static;
248
249         ResetDisplayPriority ( me               : mutable)
250                 is static;
251         ---Level: Public
252         ---Purpose: Reset the current priority of the structure to the
253         --          previous priority.
254         --  Category: Methods to modify the class definition
255         --  Warning: If <me> is displayed then the SetDisplayPriority
256         --          method erase <me> and display <me> with the
257         --          previous priority.
258         
259         SetZLayer ( me         : mutable;
260                     theLayerId : Integer from Standard )
261            is static;
262         ---Purpose: Set Z layer ID for the structure. The Z layer mechanism
263         -- allows to display structures presented in higher layers in overlay
264         -- of structures in lower layers by switching off z buffer depth
265         -- test between layers
266
267         GetZLayer ( me )
268           returns Integer from Standard is static;
269         ---Purpose: Get Z layer ID of displayed structure. The method
270         -- returns -1 if the structure has no ID (deleted from graphic driver).
271
272         SetPick ( me            : mutable;
273                   AValue        : Boolean from Standard )
274                 is static;
275         ---Level: Public
276         ---Purpose: Modifies the detectability indicator to Standard_True
277         --          or Standard_False for the structure <me>.
278         --          The default value at the definition of <me> is
279         --          Standard_True.
280         ---Category: Methods to modify the class definition
281
282         SetPrimitivesAspect ( me        : mutable;
283                               CTX       : AspectLine3d from Graphic3d )
284                 is static;
285         ---Level: Public
286         ---Purpose: Modifies the default attributes for lines
287         --          in the structure <me>.
288         ---Category: Methods to modify the class definition
289
290         SetPrimitivesAspect ( me        : mutable;
291                               CTX       : AspectFillArea3d from Graphic3d )
292                 is static;
293         ---Level: Public
294         ---Purpose: Modifies the default attributes for faces
295         --          in the structure <me>.
296         ---Category: Methods to modify the class definition
297
298         SetPrimitivesAspect ( me        : mutable;
299                               CTX       : AspectText3d from Graphic3d )
300                 is static;
301         ---Level: Public
302         ---Purpose: Modifies the default attributes for text
303         --          in the structure <me>.
304         ---Category: Methods to modify the class definition
305
306         SetPrimitivesAspect ( me        : mutable;
307                               CTX       : AspectMarker3d from Graphic3d )
308                 is static;
309         ---Level: Public
310         ---Purpose: Modifies the default attributes for markers
311         --          in the structure <me>.
312         ---Category: Methods to modify the class definition
313
314         SetVisible ( me         : mutable;
315                      AValue     : Boolean from Standard )
316                 is static;
317         ---Level: Public
318         ---Purpose: Modifies the visibility indicator to Standard_True or
319         --          Standard_False for the structure <me>.
320         --          The default value at the definition of <me> is
321         --          Standard_True.
322         ---Category: Methods to modify the class definition
323
324         SetManager ( me                 : mutable;
325                      AManager           : StructureManager from Graphic3d;
326                      WithPropagation    : Boolean from Standard = Standard_False)
327                 is static;
328         ---Level: Public
329         ---Purpose: Moves the graphic object <me> in the manager <AManager>.
330         --          If <WithPropagation> is Standard_True then all the connected
331         --          graphic objects to <me> are moved.
332
333         SetVisual ( me          : mutable;
334                     AVisual     : TypeOfStructure from Graphic3d )
335                 is virtual;
336         ---Level: Public
337         ---Purpose: Modifies the visualisation mode for the structure <me>.
338         ---Warning: It is not possible to display a structure with
339         --          an incompatible display mode.
340         --          If the display mode is different from the current one,
341         --          the structure is erased.
342         --
343         --          TOS_WIREFRAME for a wireframe visualisation
344         --          TOS_SHADING for a shaded visualisation
345         --          TOS_ALL for all visualisations
346         --          TOS_COMPUTED for a computed visualisation
347         --          The default value is TOS_ALL
348         --
349         ---Category: Methods to modify the class definition
350
351         SetZoomLimit ( me                       : mutable;
352                        LimitInf, LimitSup       : Real from Standard )
353         ---Level: Internal
354         ---Purpose: Modifies the minimum and maximum zoom coefficients
355         --          for the structure <me>.
356         --          The default value at the definition of <me> is unlimited.
357         --  Category: Methods to modify the class definition
358         --  Warning: Raises StructureDefinitionError if <LimitInf> is
359         --          greater than <LimitSup> or if <LimitInf> or
360         --          <LimitSup> is a negative value.
361         raises StructureDefinitionError from Graphic3d is static;
362
363         UnHighlight ( me        : mutable )
364                 is static;
365         ---Level: Public
366         ---Purpose: Suppresses the highlight for the structure <me>
367         --           in all the views of the visualiser.
368         ---Category: Methods to modify the class definition
369
370         ----------------------------
371         -- Category: Compute methods
372         ----------------------------
373
374         Compute ( me    : mutable;
375                   aProjector    : DataStructureManager from Graphic3d )
376                 returns Structure from Graphic3d is virtual;
377         ---Level: Advanced
378         ---Purpose: Returns the new Structure defined for the new visualization
379         ---Category: Methods to modify the class definition
380
381         Compute ( me    : mutable;
382                   aProjector    : DataStructureManager from Graphic3d;
383                   AMatrix       : Array2OfReal from TColStd )
384                 returns Structure from Graphic3d is virtual;
385         ---Level: Advanced
386         ---Purpose: Returns the new Structure defined for the new visualization
387         ---Category: Methods to modify the class definition
388
389         Compute ( me    : mutable;
390                   aProjector    : DataStructureManager from Graphic3d;
391                   aStructure    : in out Structure from Graphic3d )
392                 is virtual;
393         ---Level: Advanced
394         ---Purpose: Returns the new Structure defined for the new visualization
395         ---Category: Methods to modify the class definition
396
397         Compute ( me    : mutable;
398                   aProjector    : DataStructureManager from Graphic3d;
399                   AMatrix       : Array2OfReal from TColStd;
400                   aStructure    : in out Structure from Graphic3d )
401                 is virtual;
402         ---Level: Advanced
403         ---Purpose: Returns the new Structure defined for the new visualization
404         ---Category: Methods to modify the class definition
405
406         ReCompute ( me  : mutable );
407         ---Level: Advanced
408         ---Purpose: Forces a new construction of the structure <me>
409         --          if <me> is displayed and TOS_COMPUTED.
410         ---Category: Methods to modify the class definition
411
412         ReCompute ( me          : mutable;
413                     aProjector  : DataStructureManager from Graphic3d );
414         ---Level: Advanced
415         ---Purpose: Forces a new construction of the structure <me>
416         --          if <me> is displayed in <aProjetor> and TOS_COMPUTED.
417         ---Category: Methods to modify the class definition
418
419         ----------------------------
420         -- Category: Inquire methods
421         ----------------------------
422
423         ContainsFacet ( me )
424                 returns Boolean from Standard
425                 is static;
426         ---Level: Public
427         ---Purpose: Returns Standard_True if the structure <me> contains
428         --          Polygons, Triangles or Quadrangles.
429         ---Category: Inquire methods
430
431         
432         FillArea3dAspect ( me )
433                 returns AspectFillArea3d from Graphic3d
434                 is static;
435         ---Level: Public
436         ---Purpose: Returns the values of the current default attributes.
437         ---Category: Inquire methods
438
439         Groups ( me )
440                 returns SequenceOfGroup from Graphic3d
441                 is static;
442         ---C++: return const &
443         ---Level: Internal
444         ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
445         ---Category: Inquire methods
446
447         NumberOfGroups ( me )
448                 returns Integer from Standard
449                 is static;
450         ---Level: Public
451         ---Purpose: Returns the current number of groups in the
452         --          structure <me>.
453         ---Category: Inquire methods
454
455         HighlightColor ( me )
456                 returns Color from Quantity
457                 is static;
458         ---Level: Public
459         ---Purpose: Returns the highlight color for the Highlight method
460         --          with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
461         ---Category: Inquire methods
462
463         IsDeleted ( me )
464                 returns Boolean from Standard
465                 is static;
466         ---Level: Public
467         ---Purpose: Returns Standard_True if the structure <me> is deleted.
468         --          <me> is deleted after the call Remove (me).
469         ---Category: Inquire methods
470
471         IsDisplayed ( me )
472                 returns Boolean from Standard
473                 is virtual;
474         ---Level: Public
475         ---Purpose: Returns the display indicator for the structure <me>.
476         ---Category: Inquire methods
477
478         IsEmpty ( me )
479                 returns Boolean from Standard
480                 is static;
481         ---Level: Public
482         ---Purpose: Returns Standard_True if the structure <me> is empty.
483         --  Warning: A structure is empty if :
484         --              it do not have group or all the groups are empties
485         --              and it do not have descendant or all the descendants
486         --              are empties.
487         ---Category: Inquire methods
488
489         IsInfinite ( me )
490                 returns Boolean from Standard
491                 is static;
492         ---Level: Internal
493         ---Purpose: Returns Standard_True if the structure <me> is infinite.
494         ---Category: Inquire methods
495
496         IsHighlighted ( me )
497                 returns Boolean from Standard
498                 is virtual;
499         ---Level: Public
500         ---Purpose: Returns the highlight indicator for the structure <me>.
501         ---Category: Inquire methods
502
503         IsSelectable ( me )
504                 returns Boolean from Standard
505                 is static;
506         ---Level: Public
507         ---Purpose: Returns the detectability indicator for the structure <me>.
508         ---Category: Inquire methods
509
510         IsRotated ( me )
511                 returns Boolean from Standard
512                 is static;
513         ---Level: Public
514         ---Purpose: Returns Standard_True if the structure <me> is rotated.
515         --          <=> The transformation != Identity, != Scale, != Translation.
516         ---Category: Inquire methods
517
518         IsTransformed ( me )
519                 returns Boolean from Standard
520                 is static;
521         ---Level: Public
522         ---Purpose: Returns Standard_True if the structure <me> is transformed.
523         --          <=> The transformation != Identity.
524         ---Category: Inquire methods
525
526         IsVisible ( me )
527                 returns Boolean from Standard
528                 is static;
529         ---Level: Public
530         ---Purpose: Returns the visibility indicator for the structure <me>.
531         ---Category: Inquire methods
532
533         Line3dAspect ( me )
534                 returns AspectLine3d from Graphic3d
535                 is static;
536         ---Level: Public
537         ---Purpose: Returns the values of the current default attributes.
538         ---Category: Inquire methods
539
540         Marker3dAspect ( me )
541                 returns AspectMarker3d from Graphic3d
542                 is static;
543         ---Purpose: Returns the current group of graphic attributes used
544         -- for 3d marker primitives.
545
546         MinMaxValues ( me;
547                        XMin, YMin, ZMin : out Real from Standard;
548                        XMax, YMax, ZMax : out Real from Standard )
549                 is static;
550         ---Level: Public
551         ---Purpose: Returns the coordinates of the boundary box
552         --          of the structure <me>.
553         --  Warning: If the structure <me> is empty or infinite then :
554         --          XMin = YMin = ZMin = RealFirst ().
555         --          XMax = YMax = ZMax = RealLast ().
556         ---Category: Inquire methods
557
558         PrimitivesAspect ( me;
559                            CTXL : out AspectLine3d from Graphic3d;
560                            CTXT : out AspectText3d from Graphic3d;
561                            CTXM : out AspectMarker3d from Graphic3d;
562                            CTXF : out AspectFillArea3d from Graphic3d )
563                 is static;
564         ---Level: Public
565         ---Purpose: Returns the current values of the default attributes.
566         ---Category: Inquire methods
567
568         Text3dAspect ( me )
569                 returns AspectText3d from Graphic3d
570                 is static;
571         ---Level: Public
572         ---Purpose: Returns the values of the current default attributes.
573         ---Category: Inquire methods
574
575         Visual ( me )
576                 returns TypeOfStructure from Graphic3d
577                 is static;
578         ---Level: Public
579         ---Purpose: Returns the visualisation mode for the structure <me>.
580         ---Category: Inquire methods
581
582         ----------------------------------------------------
583         -- Category: Methods to manage the structure network
584         ----------------------------------------------------
585
586         -----------------------------------------------------
587         -- Summary of Structure Hierarchies                --
588         --                                                 --
589         -- The root  is the top  of a  structure hierarchy --
590         -- or structure network.                           --
591         --                                                 --
592         -- The attributes of a parent structure are passed --
593         -- passed to its descendants.                      --
594         --                                                 --
595         -- The  attributes  of the  descendant  structures --
596         -- don't affect the parent.                        --
597         --                                                 --
598         -- Recursive structure networks are not supported. --
599         -----------------------------------------------------
600
601         AcceptConnection ( myclass;
602                            AStructure1  : Structure from Graphic3d;
603                            AStructure2  : Structure from Graphic3d;
604                            AType        : TypeOfConnection from Graphic3d )
605                 returns Boolean from Standard;
606         ---Level: Internal
607         ---Purpose: Returns Standard_True if the connection is possible between
608         --          <AStructure1> and <AStructure2> without a creation
609         --          of a cycle.
610         --
611         --          It's not possible to call the method
612         --             AStructure1->Connect (AStructure2, TypeOfConnection)
613         --          if
614         --          - the set of all ancestors of <AStructure1> contains
615         --            <AStructure1> and if the
616         --            TypeOfConnection == TOC_DESCENDANT
617         --          - the set of all descendants of <AStructure1> contains
618         --            <AStructure2> and if the
619         --            TypeOfConnection == TOC_ANCESTOR
620         ---Category: Methods to manage the structure network
621
622         Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
623                 is static;
624         ---Level: Internal
625         ---Purpose: Returns the group of structures to which <me> is connected.
626         ---Category: Methods to manage the structure network
627
628         Connect ( me            : mutable;
629                   AStructure    : Structure from Graphic3d;
630                   AType         : TypeOfConnection from Graphic3d;
631                   WithCheck     : Boolean from Standard = Standard_False );
632         ---Level: Public
633         ---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
634         --          as a child structure of  <me>.
635         --          If Atype is TOC_ANCESTOR then add <AStructure>
636         --          as a parent structure of <me>.
637         --          The connection propagates Display, Highlight, Erase,
638         --          Remove, and stacks the transformations.
639         --          No connection if the graph of the structures
640         --          contains a cycle and <WithCheck> is Standard_True;
641         ---Category: Methods to manage the structure network
642
643         Descendants ( me; SG : in out MapOfStructure from Graphic3d )
644                 is static;
645         ---Level: Internal
646         ---Purpose: Returns the group of structures connected to <me>.
647         ---Category: Methods to manage the structure network
648
649         Disconnect ( me         : mutable;
650                      AStructure : Structure from Graphic3d )
651                 is static;
652         ---Level: Public
653         ---Purpose: Suppress the connection between <AStructure> and <me>.
654         ---Category: Methods to manage the structure network
655
656         DisconnectAll ( me      : mutable;
657                         AType   : TypeOfConnection from Graphic3d )
658                 is static;
659         ---Level: Public
660         ---Purpose: If Atype is TOC_DESCENDANT then suppress all
661         --          the connections with the child structures of <me>.
662         --          If Atype is TOC_ANCESTOR then suppress all
663         --          the connections with the parent structures of <me>.
664         ---Category: Methods to manage the structure network
665
666         Network ( myclass;
667                   AStructure    : Structure from Graphic3d;
668                   AType         : TypeOfConnection from Graphic3d;
669                   ASet          : in out MapOfStructure from Graphic3d );
670         ---Level: Internal
671         ---Purpose: Returns <ASet> the group of structures :
672         --          - directly or indirectly connected to <AStructure> if the
673         --            TypeOfConnection == TOC_DESCENDANT
674         --          - to which <AStructure> is directly or indirectly connected
675         --            if the TypeOfConnection == TOC_ANCESTOR
676         ---Category: Methods to manage the structure network
677
678         SetOwner ( me   : mutable;
679                    Owner        : Address from Standard )
680                 is static;
681         ---Level: Advanced
682
683         Owner ( me )
684                 returns Address from Standard
685                 is static;
686         ---Level: Advanced
687
688         SetHLRValidation ( me   : mutable;
689                            AFlag        : Boolean from Standard )
690                 is static;
691         ---Level: Advanced
692
693         HLRValidation ( me )
694                 returns Boolean from Standard
695                 is static;
696         ---Level: Advanced
697
698         -----------------------------------------------------------
699         -- Category: Methods to manage the structure transformation
700         -----------------------------------------------------------
701
702         Composition ( me )
703                 returns TypeOfComposition from Graphic3d
704                 is static;
705         ---Level: Public
706         ---Purpose: Returns the type of composition applied to matrices
707         --          of transformation of <me>.
708         ---Category: Methods to manage the structure transformation
709
710         SetTransform ( me       : mutable;
711                        AMatrix  : Array2OfReal from TColStd;
712                        AType    : TypeOfComposition from Graphic3d )
713         ---Level: Public
714         ---Purpose: Modifies the current local modelling transformation
715         --          in the structure <me>.
716         --
717         --          It is defined as a 4*4 real matrix.
718         --
719         --          -------------------
720         --          | a11 a12 a13  t1 |
721         --          | a21 a22 a23  t2 |
722         --          | a31 a32 a33  t3 |
723         --          |  0   0   0   1  |
724         --          -------------------
725         --
726         --          TypeOfComposition : TOC_REPLACE
727         --                              TOC_POSTCONCATENATE
728         --
729         -- Then the modified Local Modelling Transformation is composed
730         -- with the current Global Modelling Transformation to create a
731         -- new Composite Modelling Transformation.
732         --
733         -- The compose type specifies the role of the current local
734         -- modelling transformation (L) in composing the new value for
735         -- the current local modelling transformation (L'), which is
736         -- then combined with the current global modelling transforma-
737         -- tion (G) to calculate the new composite modelling transfor-
738         -- mation (C).
739         --
740         -- TOC_REPLACE
741         -- The transformation matrix (T) replaces the value of
742         -- current local modelling transformation (L).
743         --
744         --      L' <- T
745         --      C <- G x L'
746         --
747         -- TOC_POSTCONCATENATE
748         -- The current local modelling transformation (L) is multiplied
749         -- by the transformation matrix (T):
750         --
751         --      L' <- T x L
752         --      C <- G x L'
753         --
754         --  Category: Methods to manage the structure transformation
755         --  Warning: Raises TransformError if the matrix is not a 4x4 matrix.
756         raises TransformError from Graphic3d is static;
757
758         -- Transform ( me               : mutable;
759         Transform ( me;
760                     AMatrix     : in out Array2OfReal from TColStd )
761                 is static;
762         ---Level: Public
763         ---Purpose: Returns the transformation associated with
764         --          the structure <me>.
765         ---Category: Methods to manage the structure transformation
766
767         SetTransformPersistence( me     : mutable;
768                                  AFlag  : TransModeFlags from Graphic3d;
769                                  APoint : Pnt from gp  )
770         ---Level: Public
771         ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
772         is static;
773
774         SetTransformPersistence(  me  :  mutable;
775                                   AFlag  :  TransModeFlags  from  Graphic3d  )
776         --  Calls previous   method  with  point  (0,0,0)
777         is  static;
778
779
780         TransformPersistenceMode( me )
781                         returns TransModeFlags from Graphic3d
782         ---Level: Public
783         ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
784         is static;
785
786         TransformPersistencePoint( me )
787                         returns Pnt from gp
788         ---Level: Public
789         ---Purpose: Get the current point of relative modelling transform persistence
790         is static;
791
792         ----------------------------
793         -- Category: Private methods
794         ----------------------------
795
796         Add ( me        : mutable;
797               AGroup    : Group from Graphic3d )
798                 is static private;
799         ---Level: Internal
800         ---Purpose: Inserts in the structure <me>, the group <G>.
801         --          It will be erased at the next screen update.
802         ---Category: Private methods
803
804         ComputeVisual ( me )
805                 returns TypeOfStructure from Graphic3d
806                 is static;
807         ---Level: Internal
808         ---Category: Private methods
809
810         GroupsWithFacet ( me    : mutable;
811                         ADelta  : Integer from Standard )
812                 is static private;
813         ---Level: Internal
814         ---Purpose: Manages the number of groups in the structure <me>
815         --          which contains facet.
816         --          Polygons, Triangles or Quadrangles.
817         --          <ADelta> = +1 or -1
818         ---Category: Private methods
819
820         GraphicClear ( me       : mutable;
821                        WithDestruction  : Boolean from Standard )
822                 is static;
823         ---Level: Internal
824         ---Purpose: Clears the structure <me>.
825         ---Category: Private methods
826
827         GraphicConnect ( me     : mutable;
828                          ADaughter      : Structure from Graphic3d )
829                 is static;
830         ---Level: Internal
831         ---Purpose:
832         ---Category: Private methods
833
834         GraphicDisconnect ( me  : mutable;
835                             ADaughter   : Structure from Graphic3d )
836                 is static;
837         ---Level: Internal
838         ---Purpose:
839         ---Category: Private methods
840
841         GraphicHighlight ( me           : mutable;
842                            Method       : TypeOfHighlightMethod from Aspect )
843                 is static;
844         ---Level: Internal
845         ---Purpose: Highlights the structure <me>.
846         ---Category: Private methods
847
848         GraphicTransform ( me           : mutable;
849                            AMatrix      : Array2OfReal from TColStd )
850                 is static;
851         ---Level: Internal
852         ---Purpose:
853         ---Category: Private methods
854
855         GraphicUnHighlight ( me : mutable )
856                 is static;
857         ---Level: Internal
858         ---Purpose: Suppress the highlight for the structure <me>.
859         ---Category: Private methods
860
861         GroupLabels ( me        : mutable;
862                       LB, LE    : in out Integer from Standard )
863                 is static private;
864         ---Level: Internal
865         ---Purpose: Returns the labels for a new group in the structure <me>.
866         ---Category: Private methods
867
868         Identification ( me )
869                 returns Integer from Standard
870                 is static;
871         ---Level: Internal
872         ---Purpose: Returns the identification number of the structure <me>.
873         ---Category: Private methods
874
875         MinMaxCoord ( me;
876                       XMin, YMin, ZMin  : out Real from Standard;
877                       XMax, YMax, ZMax  : out Real from Standard )
878                 is static private;
879         ---Level: Internal
880         ---Purpose: Returns the extreme coordinates found in the
881         --          structure <me>.
882         --  Warning: If the structure <me> is empty or infinite then :
883         --          XMin = YMin = ZMin = RealFirst ().
884         --          XMax = YMax = ZMax = RealLast ().
885         ---Category: Private methods
886
887         Plot ( me       : mutable;
888                aPlotter : Plotter from Graphic3d )
889                 is virtual;
890         ---Level: Internal
891         ---Category: Private methods
892
893         PrintNetwork ( myclass;
894                        AStructure       : Structure from Graphic3d;
895                        AType            : TypeOfConnection from Graphic3d );
896         ---Level: Internal
897         ---Purpose: Prints informations about the network associated
898         --          with the structure <AStructure>.
899         ---Category: Private methods
900
901         Remove ( me     : mutable;
902                  APtr   : Address from Standard;
903                  AType  : TypeOfConnection from Graphic3d )
904                 is static;
905         ---Level: Internal
906         ---Purpose: Suppress the adress <APtr> in the list
907         --          of descendants or in the list of ancestors.
908         ---Category: Private methods
909
910         Remove ( me     : mutable;
911                  AGroup : Group from Graphic3d )
912                 is static private;
913         ---Level: Internal
914         ---Purpose: Suppress in the structure <me>, the group <AGroup>.
915         --          It will be erased at the next screen update.
916         ---Category: Private methods
917
918         SetComputeVisual ( me           : mutable;
919                            AVisual      : TypeOfStructure from Graphic3d )
920                 is static;
921         ---Level: Internal
922         ---Category: Private methods
923
924         StructureManager ( me )
925                 returns StructureManager from Graphic3d
926                 is static private;
927         ---Level: Internal
928         ---Purpose: Returns the manager to which <me> is associated.
929         ---Category: Private methods
930
931         Transforms ( myclass;
932                      ATrsf              : Array2OfReal from TColStd;
933                      X, Y, Z            : Real from Standard;
934                      NewX, NewY, NewZ   : out Real from Standard );
935         ---Level: Internal
936         ---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
937         ---Category: Private methods
938
939         Transforms ( myclass;
940                      ATrsf      : Array2OfReal from TColStd;
941                      Coord      : Vector from Graphic3d )
942                 returns Vector from Graphic3d;
943         ---Level: Internal
944         ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
945         ---Category: Private methods
946
947         Transforms ( myclass;
948                      ATrsf      : Array2OfReal from TColStd;
949                      Coord      : Vertex from Graphic3d )
950                 returns Vertex from Graphic3d;
951         ---Level: Internal
952         ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
953         ---Category: Private methods
954
955         Update ( me )
956                 is static private;
957         ---Level: Internal
958         ---Purpose: Calls the Update method of the StructureManager which
959         --          contains the Structure <me>.
960         ---Category: Private methods
961
962         UpdateStructure ( me    : mutable;
963                           CTXL  : AspectLine3d from Graphic3d;
964                           CTXT  : AspectText3d from Graphic3d;
965                           CTXM  : AspectMarker3d from Graphic3d;
966                           CTXF  : AspectFillArea3d from Graphic3d )
967                 is static private;
968         ---Level: Internal
969         ---Purpose: Updates the c structure associated to <me>.
970         ---Category: Private methods
971
972         CStructure ( me )
973                 returns Address from Standard
974                 is static;
975         ---Level: Internal
976         ---Purpose: Returns the c structure associated to <me>.
977         ---Category: Private methods
978
979 --\f
980
981 --\f
982
983 fields
984
985 --
986 -- Class        :       Graphic3d_Structure
987 --
988 -- Purpose      :       Declaration of variables specific to
989 --                      graphic structures.
990 -- Reminder     :       A structure is defined in a manager.
991 --                      It is a sequence of groups of primitives.
992 --
993
994         -- the associated C structure
995         MyCStructure            :       CStructure from Graphic3d;
996
997         -- the group identifier generator
998         MyGroupGenId            :       GenId from Aspect;
999
1000         -- the structures to which the structure is attached
1001         MyAncestors             :       SequenceOfAddress from TColStd;
1002
1003         -- the structures attached to the structure
1004         MyDescendants           :       SequenceOfAddress from TColStd;
1005
1006         -- the sequence of groups
1007         MyGroups                :       SequenceOfGroup from Graphic3d;
1008
1009         -- the graphic driver used
1010         MyGraphicDriver         :       GraphicDriver from Graphic3d;
1011
1012         -- the highlight method of the structure
1013         MyHighlightColor        :       Color from Quantity;
1014         MyHighlightMethod       :       TypeOfHighlightMethod from Aspect;
1015
1016         -- the manager accepting the structure
1017         MyPtrStructureManager           :       Address from Standard is protected;
1018         MyFirstPtrStructureManager      :       Address from Standard is protected;
1019         MyOwner                         :       Address from Standard;
1020
1021         -- the type of visualisation accepted by the structure
1022         MyVisual                :       TypeOfStructure from Graphic3d;
1023         MyComputeVisual         :       TypeOfStructure from Graphic3d is protected;
1024
1025 friends
1026
1027         -- a lot of methods of Group use the methods of Structure
1028         class Group     from Graphic3d
1029
1030 end Structure;