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