0023654: Problem with displaying vertices in OCC view after closing all OCC views...
[occt.git] / src / Graphic3d / Graphic3d_Structure.cdl
CommitLineData
b311480e 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
7fd59977 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
7fd59977 28
29class 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
45uses
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,
7fd59977 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,
7fd59977 75 Vertex from Graphic3d,
b8ddfc2f 76 TransModeFlags from Graphic3d,
4269bd1b 77 Pnt from gp,
78 SetOfHClipPlane from Graphic3d
7fd59977 79
80raises
81
82 PriorityDefinitionError from Graphic3d,
83 StructureDefinitionError from Graphic3d,
84 TransformError from Graphic3d
85
86is
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.
9edc5e12 238 -- Values are between 0 and 10.
b8ddfc2f 239 -- Structures are drawn according to their display priorities
240 -- in ascending order.
9edc5e12 241 -- A structure of priority 10 is displayed the last and appears over the others.
242 -- The default value is 5.
7fd59977 243 -- Category: Methods to modify the class definition
244 -- Warning: If <me> is displayed then the SetDisplayPriority
245 -- method erase <me> and display <me> with the
246 -- new priority.
247 -- Raises PriorityDefinitionError if <Priority> is
248 -- greater than 10 or a negative value.
249 raises PriorityDefinitionError from Graphic3d is static;
250
251 ResetDisplayPriority ( me : mutable)
252 is static;
253 ---Level: Public
bbf32d01 254 ---Purpose: Reset the current priority of the structure to the
7fd59977 255 -- previous priority.
256 -- Category: Methods to modify the class definition
257 -- Warning: If <me> is displayed then the SetDisplayPriority
258 -- method erase <me> and display <me> with the
259 -- previous priority.
59f45b7c 260
261 SetZLayer ( me : mutable;
262 theLayerId : Integer from Standard )
263 is static;
264 ---Purpose: Set Z layer ID for the structure. The Z layer mechanism
265 -- allows to display structures presented in higher layers in overlay
266 -- of structures in lower layers by switching off z buffer depth
267 -- test between layers
268
269 GetZLayer ( me )
270 returns Integer from Standard is static;
271 ---Purpose: Get Z layer ID of displayed structure. The method
272 -- returns -1 if the structure has no ID (deleted from graphic driver).
7fd59977 273
4269bd1b 274 SetClipPlanes (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d) is static;
275 ---Purpose: Changes a set of clip planes slicing the structure on rendering.
276 -- @param thePlanes [in] the set of clip planes.
277
278 GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
279 ---C++: return const&
280 ---Purpose: Get clip planes slicing the structure on rendering.
281 -- @return set of clip planes.
282
7fd59977 283 SetPick ( me : mutable;
284 AValue : Boolean from Standard )
285 is static;
286 ---Level: Public
287 ---Purpose: Modifies the detectability indicator to Standard_True
288 -- or Standard_False for the structure <me>.
289 -- The default value at the definition of <me> is
290 -- Standard_True.
291 ---Category: Methods to modify the class definition
292
293 SetPrimitivesAspect ( me : mutable;
294 CTX : AspectLine3d from Graphic3d )
295 is static;
296 ---Level: Public
297 ---Purpose: Modifies the default attributes for lines
298 -- in the structure <me>.
299 ---Category: Methods to modify the class definition
300
301 SetPrimitivesAspect ( me : mutable;
302 CTX : AspectFillArea3d from Graphic3d )
303 is static;
304 ---Level: Public
305 ---Purpose: Modifies the default attributes for faces
306 -- in the structure <me>.
307 ---Category: Methods to modify the class definition
308
309 SetPrimitivesAspect ( me : mutable;
310 CTX : AspectText3d from Graphic3d )
311 is static;
312 ---Level: Public
313 ---Purpose: Modifies the default attributes for text
314 -- in the structure <me>.
315 ---Category: Methods to modify the class definition
316
317 SetPrimitivesAspect ( me : mutable;
318 CTX : AspectMarker3d from Graphic3d )
319 is static;
320 ---Level: Public
321 ---Purpose: Modifies the default attributes for markers
322 -- in the structure <me>.
323 ---Category: Methods to modify the class definition
324
325 SetVisible ( me : mutable;
326 AValue : Boolean from Standard )
327 is static;
328 ---Level: Public
329 ---Purpose: Modifies the visibility indicator to Standard_True or
330 -- Standard_False for the structure <me>.
331 -- The default value at the definition of <me> is
332 -- Standard_True.
333 ---Category: Methods to modify the class definition
334
335 SetManager ( me : mutable;
336 AManager : StructureManager from Graphic3d;
337 WithPropagation : Boolean from Standard = Standard_False)
338 is static;
339 ---Level: Public
340 ---Purpose: Moves the graphic object <me> in the manager <AManager>.
341 -- If <WithPropagation> is Standard_True then all the connected
342 -- graphic objects to <me> are moved.
343
344 SetVisual ( me : mutable;
345 AVisual : TypeOfStructure from Graphic3d )
346 is virtual;
347 ---Level: Public
348 ---Purpose: Modifies the visualisation mode for the structure <me>.
349 ---Warning: It is not possible to display a structure with
350 -- an incompatible display mode.
351 -- If the display mode is different from the current one,
352 -- the structure is erased.
353 --
354 -- TOS_WIREFRAME for a wireframe visualisation
355 -- TOS_SHADING for a shaded visualisation
356 -- TOS_ALL for all visualisations
357 -- TOS_COMPUTED for a computed visualisation
358 -- The default value is TOS_ALL
359 --
360 ---Category: Methods to modify the class definition
361
362 SetZoomLimit ( me : mutable;
363 LimitInf, LimitSup : Real from Standard )
364 ---Level: Internal
365 ---Purpose: Modifies the minimum and maximum zoom coefficients
366 -- for the structure <me>.
367 -- The default value at the definition of <me> is unlimited.
368 -- Category: Methods to modify the class definition
369 -- Warning: Raises StructureDefinitionError if <LimitInf> is
370 -- greater than <LimitSup> or if <LimitInf> or
371 -- <LimitSup> is a negative value.
372 raises StructureDefinitionError from Graphic3d is static;
373
374 UnHighlight ( me : mutable )
375 is static;
376 ---Level: Public
377 ---Purpose: Suppresses the highlight for the structure <me>
378 -- in all the views of the visualiser.
379 ---Category: Methods to modify the class definition
380
381 ----------------------------
382 -- Category: Compute methods
383 ----------------------------
384
eb4320f2 385 Compute (me: mutable)
386 is virtual;
387 ---Level: Advanced
388 ---Category: Methods to modify the class definition
389
7fd59977 390 Compute ( me : mutable;
391 aProjector : DataStructureManager from Graphic3d )
392 returns Structure from Graphic3d 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 returns Structure from Graphic3d is virtual;
401 ---Level: Advanced
402 ---Purpose: Returns the new Structure defined for the new visualization
403 ---Category: Methods to modify the class definition
404
405 Compute ( me : mutable;
406 aProjector : DataStructureManager from Graphic3d;
407 aStructure : in out Structure from Graphic3d )
408 is virtual;
409 ---Level: Advanced
410 ---Purpose: Returns the new Structure defined for the new visualization
411 ---Category: Methods to modify the class definition
412
413 Compute ( me : mutable;
414 aProjector : DataStructureManager from Graphic3d;
415 AMatrix : Array2OfReal from TColStd;
416 aStructure : in out Structure from Graphic3d )
417 is virtual;
418 ---Level: Advanced
419 ---Purpose: Returns the new Structure defined for the new visualization
420 ---Category: Methods to modify the class definition
421
422 ReCompute ( me : mutable );
423 ---Level: Advanced
424 ---Purpose: Forces a new construction of the structure <me>
425 -- if <me> is displayed and TOS_COMPUTED.
426 ---Category: Methods to modify the class definition
427
428 ReCompute ( me : mutable;
429 aProjector : DataStructureManager from Graphic3d );
430 ---Level: Advanced
431 ---Purpose: Forces a new construction of the structure <me>
432 -- if <me> is displayed in <aProjetor> and TOS_COMPUTED.
433 ---Category: Methods to modify the class definition
434
435 ----------------------------
436 -- Category: Inquire methods
437 ----------------------------
438
439 ContainsFacet ( me )
440 returns Boolean from Standard
441 is static;
442 ---Level: Public
443 ---Purpose: Returns Standard_True if the structure <me> contains
444 -- Polygons, Triangles or Quadrangles.
445 ---Category: Inquire methods
446
8ca7beb8 447
7fd59977 448 FillArea3dAspect ( me )
449 returns AspectFillArea3d from Graphic3d
450 is static;
451 ---Level: Public
452 ---Purpose: Returns the values of the current default attributes.
453 ---Category: Inquire methods
454
455 Groups ( me )
bbf32d01 456 returns SequenceOfGroup from Graphic3d
7fd59977 457 is static;
bbf32d01 458 ---C++: return const &
7fd59977 459 ---Level: Internal
bbf32d01 460 ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
7fd59977 461 ---Category: Inquire methods
462
463 NumberOfGroups ( me )
464 returns Integer from Standard
465 is static;
466 ---Level: Public
467 ---Purpose: Returns the current number of groups in the
468 -- structure <me>.
469 ---Category: Inquire methods
470
471 HighlightColor ( me )
472 returns Color from Quantity
473 is static;
474 ---Level: Public
475 ---Purpose: Returns the highlight color for the Highlight method
476 -- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
477 ---Category: Inquire methods
478
479 IsDeleted ( me )
480 returns Boolean from Standard
481 is static;
482 ---Level: Public
483 ---Purpose: Returns Standard_True if the structure <me> is deleted.
484 -- <me> is deleted after the call Remove (me).
485 ---Category: Inquire methods
486
487 IsDisplayed ( me )
488 returns Boolean from Standard
489 is virtual;
490 ---Level: Public
491 ---Purpose: Returns the display indicator for the structure <me>.
492 ---Category: Inquire methods
493
494 IsEmpty ( me )
495 returns Boolean from Standard
496 is static;
497 ---Level: Public
498 ---Purpose: Returns Standard_True if the structure <me> is empty.
499 -- Warning: A structure is empty if :
500 -- it do not have group or all the groups are empties
501 -- and it do not have descendant or all the descendants
502 -- are empties.
503 ---Category: Inquire methods
504
505 IsInfinite ( me )
506 returns Boolean from Standard
507 is static;
508 ---Level: Internal
509 ---Purpose: Returns Standard_True if the structure <me> is infinite.
510 ---Category: Inquire methods
511
512 IsHighlighted ( me )
513 returns Boolean from Standard
514 is virtual;
515 ---Level: Public
516 ---Purpose: Returns the highlight indicator for the structure <me>.
517 ---Category: Inquire methods
518
519 IsSelectable ( me )
520 returns Boolean from Standard
521 is static;
522 ---Level: Public
523 ---Purpose: Returns the detectability indicator for the structure <me>.
524 ---Category: Inquire methods
525
526 IsRotated ( me )
527 returns Boolean from Standard
528 is static;
529 ---Level: Public
530 ---Purpose: Returns Standard_True if the structure <me> is rotated.
531 -- <=> The transformation != Identity, != Scale, != Translation.
532 ---Category: Inquire methods
533
534 IsTransformed ( me )
535 returns Boolean from Standard
536 is static;
537 ---Level: Public
538 ---Purpose: Returns Standard_True if the structure <me> is transformed.
539 -- <=> The transformation != Identity.
540 ---Category: Inquire methods
541
542 IsVisible ( me )
543 returns Boolean from Standard
544 is static;
545 ---Level: Public
546 ---Purpose: Returns the visibility indicator for the structure <me>.
547 ---Category: Inquire methods
548
549 Line3dAspect ( me )
550 returns AspectLine3d from Graphic3d
551 is static;
552 ---Level: Public
553 ---Purpose: Returns the values of the current default attributes.
554 ---Category: Inquire methods
555
556 Marker3dAspect ( me )
557 returns AspectMarker3d from Graphic3d
558 is static;
559 ---Purpose: Returns the current group of graphic attributes used
560 -- for 3d marker primitives.
561
562 MinMaxValues ( me;
563 XMin, YMin, ZMin : out Real from Standard;
564 XMax, YMax, ZMax : out Real from Standard )
565 is static;
566 ---Level: Public
567 ---Purpose: Returns the coordinates of the boundary box
568 -- of the structure <me>.
569 -- Warning: If the structure <me> is empty or infinite then :
570 -- XMin = YMin = ZMin = RealFirst ().
571 -- XMax = YMax = ZMax = RealLast ().
572 ---Category: Inquire methods
573
574 PrimitivesAspect ( me;
575 CTXL : out AspectLine3d from Graphic3d;
576 CTXT : out AspectText3d from Graphic3d;
577 CTXM : out AspectMarker3d from Graphic3d;
578 CTXF : out AspectFillArea3d from Graphic3d )
579 is static;
580 ---Level: Public
581 ---Purpose: Returns the current values of the default attributes.
582 ---Category: Inquire methods
583
584 Text3dAspect ( me )
585 returns AspectText3d from Graphic3d
586 is static;
587 ---Level: Public
588 ---Purpose: Returns the values of the current default attributes.
589 ---Category: Inquire methods
590
7fd59977 591 Visual ( me )
592 returns TypeOfStructure from Graphic3d
593 is static;
594 ---Level: Public
595 ---Purpose: Returns the visualisation mode for the structure <me>.
596 ---Category: Inquire methods
597
598 ----------------------------------------------------
599 -- Category: Methods to manage the structure network
600 ----------------------------------------------------
601
602 -----------------------------------------------------
603 -- Summary of Structure Hierarchies --
604 -- --
605 -- The root is the top of a structure hierarchy --
606 -- or structure network. --
607 -- --
608 -- The attributes of a parent structure are passed --
609 -- passed to its descendants. --
610 -- --
611 -- The attributes of the descendant structures --
612 -- don't affect the parent. --
613 -- --
614 -- Recursive structure networks are not supported. --
615 -----------------------------------------------------
616
617 AcceptConnection ( myclass;
618 AStructure1 : Structure from Graphic3d;
619 AStructure2 : Structure from Graphic3d;
620 AType : TypeOfConnection from Graphic3d )
621 returns Boolean from Standard;
622 ---Level: Internal
623 ---Purpose: Returns Standard_True if the connection is possible between
624 -- <AStructure1> and <AStructure2> without a creation
625 -- of a cycle.
626 --
627 -- It's not possible to call the method
628 -- AStructure1->Connect (AStructure2, TypeOfConnection)
629 -- if
630 -- - the set of all ancestors of <AStructure1> contains
631 -- <AStructure1> and if the
632 -- TypeOfConnection == TOC_DESCENDANT
633 -- - the set of all descendants of <AStructure1> contains
634 -- <AStructure2> and if the
635 -- TypeOfConnection == TOC_ANCESTOR
636 ---Category: Methods to manage the structure network
637
638 Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
639 is static;
640 ---Level: Internal
641 ---Purpose: Returns the group of structures to which <me> is connected.
642 ---Category: Methods to manage the structure network
643
644 Connect ( me : mutable;
645 AStructure : Structure from Graphic3d;
646 AType : TypeOfConnection from Graphic3d;
647 WithCheck : Boolean from Standard = Standard_False );
648 ---Level: Public
649 ---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
650 -- as a child structure of <me>.
651 -- If Atype is TOC_ANCESTOR then add <AStructure>
652 -- as a parent structure of <me>.
653 -- The connection propagates Display, Highlight, Erase,
654 -- Remove, and stacks the transformations.
655 -- No connection if the graph of the structures
656 -- contains a cycle and <WithCheck> is Standard_True;
657 ---Category: Methods to manage the structure network
658
659 Descendants ( me; SG : in out MapOfStructure from Graphic3d )
660 is static;
661 ---Level: Internal
662 ---Purpose: Returns the group of structures connected to <me>.
663 ---Category: Methods to manage the structure network
664
665 Disconnect ( me : mutable;
666 AStructure : Structure from Graphic3d )
667 is static;
668 ---Level: Public
669 ---Purpose: Suppress the connection between <AStructure> and <me>.
670 ---Category: Methods to manage the structure network
671
672 DisconnectAll ( me : mutable;
673 AType : TypeOfConnection from Graphic3d )
674 is static;
675 ---Level: Public
676 ---Purpose: If Atype is TOC_DESCENDANT then suppress all
677 -- the connections with the child structures of <me>.
678 -- If Atype is TOC_ANCESTOR then suppress all
679 -- the connections with the parent structures of <me>.
680 ---Category: Methods to manage the structure network
681
682 Network ( myclass;
683 AStructure : Structure from Graphic3d;
684 AType : TypeOfConnection from Graphic3d;
685 ASet : in out MapOfStructure from Graphic3d );
686 ---Level: Internal
687 ---Purpose: Returns <ASet> the group of structures :
688 -- - directly or indirectly connected to <AStructure> if the
689 -- TypeOfConnection == TOC_DESCENDANT
690 -- - to which <AStructure> is directly or indirectly connected
691 -- if the TypeOfConnection == TOC_ANCESTOR
692 ---Category: Methods to manage the structure network
693
694 SetOwner ( me : mutable;
695 Owner : Address from Standard )
696 is static;
697 ---Level: Advanced
698
699 Owner ( me )
700 returns Address from Standard
701 is static;
702 ---Level: Advanced
703
704 SetHLRValidation ( me : mutable;
705 AFlag : Boolean from Standard )
706 is static;
707 ---Level: Advanced
708
709 HLRValidation ( me )
710 returns Boolean from Standard
711 is static;
712 ---Level: Advanced
713
714 -----------------------------------------------------------
715 -- Category: Methods to manage the structure transformation
716 -----------------------------------------------------------
717
718 Composition ( me )
719 returns TypeOfComposition from Graphic3d
720 is static;
721 ---Level: Public
722 ---Purpose: Returns the type of composition applied to matrices
723 -- of transformation of <me>.
724 ---Category: Methods to manage the structure transformation
725
726 SetTransform ( me : mutable;
727 AMatrix : Array2OfReal from TColStd;
728 AType : TypeOfComposition from Graphic3d )
729 ---Level: Public
730 ---Purpose: Modifies the current local modelling transformation
731 -- in the structure <me>.
732 --
733 -- It is defined as a 4*4 real matrix.
734 --
735 -- -------------------
736 -- | a11 a12 a13 t1 |
737 -- | a21 a22 a23 t2 |
738 -- | a31 a32 a33 t3 |
739 -- | 0 0 0 1 |
740 -- -------------------
741 --
742 -- TypeOfComposition : TOC_REPLACE
743 -- TOC_POSTCONCATENATE
744 --
745 -- Then the modified Local Modelling Transformation is composed
746 -- with the current Global Modelling Transformation to create a
747 -- new Composite Modelling Transformation.
748 --
749 -- The compose type specifies the role of the current local
750 -- modelling transformation (L) in composing the new value for
751 -- the current local modelling transformation (L'), which is
752 -- then combined with the current global modelling transforma-
753 -- tion (G) to calculate the new composite modelling transfor-
754 -- mation (C).
755 --
756 -- TOC_REPLACE
757 -- The transformation matrix (T) replaces the value of
758 -- current local modelling transformation (L).
759 --
760 -- L' <- T
761 -- C <- G x L'
762 --
763 -- TOC_POSTCONCATENATE
764 -- The current local modelling transformation (L) is multiplied
765 -- by the transformation matrix (T):
766 --
767 -- L' <- T x L
768 -- C <- G x L'
769 --
770 -- Category: Methods to manage the structure transformation
771 -- Warning: Raises TransformError if the matrix is not a 4x4 matrix.
772 raises TransformError from Graphic3d is static;
773
774 -- Transform ( me : mutable;
775 Transform ( me;
776 AMatrix : in out Array2OfReal from TColStd )
777 is static;
778 ---Level: Public
779 ---Purpose: Returns the transformation associated with
780 -- the structure <me>.
bbf32d01
K
781 ---Category: Methods to manage the structure transformation
782
7fd59977 783 SetTransformPersistence( me : mutable;
bbf32d01 784 AFlag : TransModeFlags from Graphic3d;
7fd59977 785 APoint : Pnt from gp )
786 ---Level: Public
787 ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
788 is static;
789
bbf32d01 790 SetTransformPersistence( me : mutable;
7fd59977 791 AFlag : TransModeFlags from Graphic3d )
792 -- Calls previous method with point (0,0,0)
793 is static;
bbf32d01 794
7fd59977 795
796 TransformPersistenceMode( me )
797 returns TransModeFlags from Graphic3d
798 ---Level: Public
799 ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
bbf32d01
K
800 is static;
801
7fd59977 802 TransformPersistencePoint( me )
803 returns Pnt from gp
804 ---Level: Public
805 ---Purpose: Get the current point of relative modelling transform persistence
806 is static;
807
808 ----------------------------
809 -- Category: Private methods
810 ----------------------------
811
812 Add ( me : mutable;
813 AGroup : Group from Graphic3d )
814 is static private;
815 ---Level: Internal
816 ---Purpose: Inserts in the structure <me>, the group <G>.
817 -- It will be erased at the next screen update.
818 ---Category: Private methods
819
820 ComputeVisual ( me )
821 returns TypeOfStructure from Graphic3d
822 is static;
823 ---Level: Internal
824 ---Category: Private methods
825
826 GroupsWithFacet ( me : mutable;
827 ADelta : Integer from Standard )
828 is static private;
829 ---Level: Internal
830 ---Purpose: Manages the number of groups in the structure <me>
831 -- which contains facet.
832 -- Polygons, Triangles or Quadrangles.
833 -- <ADelta> = +1 or -1
834 ---Category: Private methods
835
7fd59977 836 GraphicClear ( me : mutable;
837 WithDestruction : Boolean from Standard )
838 is static;
839 ---Level: Internal
840 ---Purpose: Clears the structure <me>.
841 ---Category: Private methods
842
843 GraphicConnect ( me : mutable;
844 ADaughter : Structure from Graphic3d )
845 is static;
846 ---Level: Internal
847 ---Purpose:
848 ---Category: Private methods
849
850 GraphicDisconnect ( me : mutable;
851 ADaughter : Structure from Graphic3d )
852 is static;
853 ---Level: Internal
854 ---Purpose:
855 ---Category: Private methods
856
857 GraphicHighlight ( me : mutable;
858 Method : TypeOfHighlightMethod from Aspect )
859 is static;
860 ---Level: Internal
861 ---Purpose: Highlights the structure <me>.
862 ---Category: Private methods
863
864 GraphicTransform ( me : mutable;
865 AMatrix : Array2OfReal from TColStd )
866 is static;
867 ---Level: Internal
bbf32d01 868 ---Purpose:
7fd59977 869 ---Category: Private methods
870
871 GraphicUnHighlight ( me : mutable )
872 is static;
873 ---Level: Internal
874 ---Purpose: Suppress the highlight for the structure <me>.
875 ---Category: Private methods
876
7fd59977 877 Identification ( me )
878 returns Integer from Standard
879 is static;
880 ---Level: Internal
881 ---Purpose: Returns the identification number of the structure <me>.
882 ---Category: Private methods
883
884 MinMaxCoord ( me;
885 XMin, YMin, ZMin : out Real from Standard;
886 XMax, YMax, ZMax : out Real from Standard )
887 is static private;
888 ---Level: Internal
889 ---Purpose: Returns the extreme coordinates found in the
890 -- structure <me>.
891 -- Warning: If the structure <me> is empty or infinite then :
892 -- XMin = YMin = ZMin = RealFirst ().
893 -- XMax = YMax = ZMax = RealLast ().
894 ---Category: Private methods
895
896 Plot ( me : mutable;
897 aPlotter : Plotter from Graphic3d )
898 is virtual;
899 ---Level: Internal
900 ---Category: Private methods
901
902 PrintNetwork ( myclass;
903 AStructure : Structure from Graphic3d;
904 AType : TypeOfConnection from Graphic3d );
905 ---Level: Internal
906 ---Purpose: Prints informations about the network associated
907 -- with the structure <AStructure>.
908 ---Category: Private methods
909
910 Remove ( me : mutable;
911 APtr : Address from Standard;
912 AType : TypeOfConnection from Graphic3d )
913 is static;
914 ---Level: Internal
915 ---Purpose: Suppress the adress <APtr> in the list
916 -- of descendants or in the list of ancestors.
917 ---Category: Private methods
918
919 Remove ( me : mutable;
920 AGroup : Group from Graphic3d )
921 is static private;
922 ---Level: Internal
923 ---Purpose: Suppress in the structure <me>, the group <AGroup>.
924 -- It will be erased at the next screen update.
925 ---Category: Private methods
926
927 SetComputeVisual ( me : mutable;
928 AVisual : TypeOfStructure from Graphic3d )
929 is static;
930 ---Level: Internal
931 ---Category: Private methods
932
933 StructureManager ( me )
934 returns StructureManager from Graphic3d
935 is static private;
936 ---Level: Internal
937 ---Purpose: Returns the manager to which <me> is associated.
938 ---Category: Private methods
939
940 Transforms ( myclass;
941 ATrsf : Array2OfReal from TColStd;
942 X, Y, Z : Real from Standard;
943 NewX, NewY, NewZ : out Real from Standard );
944 ---Level: Internal
945 ---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
946 ---Category: Private methods
947
948 Transforms ( myclass;
949 ATrsf : Array2OfReal from TColStd;
950 Coord : Vector from Graphic3d )
951 returns Vector from Graphic3d;
952 ---Level: Internal
953 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
954 ---Category: Private methods
955
956 Transforms ( myclass;
957 ATrsf : Array2OfReal from TColStd;
958 Coord : Vertex from Graphic3d )
959 returns Vertex from Graphic3d;
960 ---Level: Internal
961 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
962 ---Category: Private methods
963
964 Update ( me )
965 is static private;
966 ---Level: Internal
967 ---Purpose: Calls the Update method of the StructureManager which
968 -- contains the Structure <me>.
969 ---Category: Private methods
970
971 UpdateStructure ( me : mutable;
972 CTXL : AspectLine3d from Graphic3d;
973 CTXT : AspectText3d from Graphic3d;
974 CTXM : AspectMarker3d from Graphic3d;
975 CTXF : AspectFillArea3d from Graphic3d )
976 is static private;
977 ---Level: Internal
978 ---Purpose: Updates the c structure associated to <me>.
979 ---Category: Private methods
980
bf75be98 981 CStructure ( me : mutable )
982 returns CStructure from Graphic3d
7fd59977 983 is static;
984 ---Level: Internal
985 ---Purpose: Returns the c structure associated to <me>.
986 ---Category: Private methods
bf75be98 987 ---C++: return *
7fd59977 988
989fields
990
991--
992-- Class : Graphic3d_Structure
993--
994-- Purpose : Declaration of variables specific to
995-- graphic structures.
996-- Reminder : A structure is defined in a manager.
997-- It is a sequence of groups of primitives.
998--
999
1000 -- the associated C structure
1001 MyCStructure : CStructure from Graphic3d;
1002
7fd59977 1003 -- the structures to which the structure is attached
1004 MyAncestors : SequenceOfAddress from TColStd;
1005
1006 -- the structures attached to the structure
1007 MyDescendants : SequenceOfAddress from TColStd;
1008
1009 -- the sequence of groups
1010 MyGroups : SequenceOfGroup from Graphic3d;
1011
1012 -- the graphic driver used
1013 MyGraphicDriver : GraphicDriver from Graphic3d;
1014
1015 -- the highlight method of the structure
1016 MyHighlightColor : Color from Quantity;
1017 MyHighlightMethod : TypeOfHighlightMethod from Aspect;
1018
1019 -- the manager accepting the structure
1020 MyPtrStructureManager : Address from Standard is protected;
1021 MyFirstPtrStructureManager : Address from Standard is protected;
1022 MyOwner : Address from Standard;
1023
1024 -- the type of visualisation accepted by the structure
1025 MyVisual : TypeOfStructure from Graphic3d;
1026 MyComputeVisual : TypeOfStructure from Graphic3d is protected;
1027
1028friends
1029
1030 -- a lot of methods of Group use the methods of Structure
1031 class Group from Graphic3d
1032
1033end Structure;