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
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.
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.
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.
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
29 class Structure from Graphic3d inherits TShared
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
47 Array2OfReal from TColStd,
48 SequenceOfAddress from TColStd,
53 TypeOfHighlightMethod from Aspect,
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,
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 Vertex from Graphic3d,
76 TransModeFlags from Graphic3d,
78 SetOfHClipPlane from Graphic3d
82 PriorityDefinitionError from Graphic3d,
83 StructureDefinitionError from Graphic3d,
84 TransformError from Graphic3d
88 ------------------------
89 -- Category: Constructor
90 ------------------------
92 Create ( AManager : StructureManager from Graphic3d )
93 returns mutable Structure from Graphic3d;
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
100 -- The structure is not displayed when it is created.
102 ---------------------------------------------------
103 -- Category: Methods to modify the class definition
104 ---------------------------------------------------
106 --------------------------------------------------------
107 -- Summary of Display Priorities --
109 -- Structure display priorities control the order in --
110 -- which structures are redrawn. --
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 --
117 -- For structures with the same display priority, --
118 -- the order in which they were displayed determines --
119 -- determines the drawing order. --
121 -- CAS.CADE supports 11 structure display priorities, --
123 --------------------------------------------------------
125 Clear ( me : mutable;
126 WithDestruction : Boolean from Standard = Standard_True )
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
141 Destroy ( me : mutable )
144 ---Purpose: Suppresses the structure <me>.
145 -- It will be erased at the next screen update.
146 ---Category: Methods to modify the class definition
149 Display ( me : mutable )
152 ---Purpose: Displays the structure <me> in all the views of
154 ---Category: Methods to modify the class definition
156 Display ( me : mutable;
157 Priority : Integer from Standard )
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;
175 DisplayPriority ( me )
176 returns Integer from Standard
179 ---Purpose: Returns the current display priority for the
181 ---Category: Methods to modify the class definition
183 Erase ( me : mutable )
186 ---Purpose: Erases the structure <me> in all the views
187 -- of the visualiser.
188 ---Category: Methods to modify the class definition
190 Highlight ( me : mutable;
191 Method : TypeOfHighlightMethod from Aspect )
194 ---Purpose: Highlights the structure <me> in all the
195 -- views of the visualiser, using the following methods:
197 -- TOHM_COLOR = drawn in the highlight color
199 -- TOHM_BLINK = blinking
200 -- TOHM_BOUNDBOX = enclosed by the boundary box
203 ---Category: Methods to modify the class definition
205 Remove ( me : mutable )
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
213 SetHighlightColor ( me : mutable;
214 AColor : Color from Quantity )
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
221 SetInfiniteState ( me : mutable;
222 AFlag : Boolean from Standard )
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
234 SetDisplayPriority ( me : mutable;
235 Priority : Integer from Standard )
237 ---Purpose: Modifies the order of displaying the structure.
238 -- Values are between 0 and 10.
239 -- Structures are drawn according to their display priorities
240 -- in ascending order.
241 -- A structure of priority 10 is displayed the last and appears over the others.
242 -- The default value is 5.
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
247 -- Raises PriorityDefinitionError if <Priority> is
248 -- greater than 10 or a negative value.
249 raises PriorityDefinitionError from Graphic3d is static;
251 ResetDisplayPriority ( me : mutable)
254 ---Purpose: Reset the current priority of the structure to the
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.
261 SetZLayer ( me : mutable;
262 theLayerId : Integer from Standard )
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
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).
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.
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.
283 SetPick ( me : mutable;
284 AValue : Boolean from Standard )
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
291 ---Category: Methods to modify the class definition
293 SetPrimitivesAspect ( me : mutable;
294 CTX : AspectLine3d from Graphic3d )
297 ---Purpose: Modifies the default attributes for lines
298 -- in the structure <me>.
299 ---Category: Methods to modify the class definition
301 SetPrimitivesAspect ( me : mutable;
302 CTX : AspectFillArea3d from Graphic3d )
305 ---Purpose: Modifies the default attributes for faces
306 -- in the structure <me>.
307 ---Category: Methods to modify the class definition
309 SetPrimitivesAspect ( me : mutable;
310 CTX : AspectText3d from Graphic3d )
313 ---Purpose: Modifies the default attributes for text
314 -- in the structure <me>.
315 ---Category: Methods to modify the class definition
317 SetPrimitivesAspect ( me : mutable;
318 CTX : AspectMarker3d from Graphic3d )
321 ---Purpose: Modifies the default attributes for markers
322 -- in the structure <me>.
323 ---Category: Methods to modify the class definition
325 SetVisible ( me : mutable;
326 AValue : Boolean from Standard )
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
333 ---Category: Methods to modify the class definition
335 SetManager ( me : mutable;
336 AManager : StructureManager from Graphic3d;
337 WithPropagation : Boolean from Standard = Standard_False)
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.
344 SetVisual ( me : mutable;
345 AVisual : TypeOfStructure from Graphic3d )
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.
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
360 ---Category: Methods to modify the class definition
362 SetZoomLimit ( me : mutable;
363 LimitInf, LimitSup : Real from Standard )
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;
374 UnHighlight ( me : mutable )
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
381 ----------------------------
382 -- Category: Compute methods
383 ----------------------------
385 Compute ( me : mutable;
386 aProjector : DataStructureManager from Graphic3d )
387 returns Structure from Graphic3d is virtual;
389 ---Purpose: Returns the new Structure defined for the new visualization
390 ---Category: Methods to modify the class definition
392 Compute ( me : mutable;
393 aProjector : DataStructureManager from Graphic3d;
394 AMatrix : Array2OfReal from TColStd )
395 returns Structure from Graphic3d is virtual;
397 ---Purpose: Returns the new Structure defined for the new visualization
398 ---Category: Methods to modify the class definition
400 Compute ( me : mutable;
401 aProjector : DataStructureManager from Graphic3d;
402 aStructure : in out Structure from Graphic3d )
405 ---Purpose: Returns the new Structure defined for the new visualization
406 ---Category: Methods to modify the class definition
408 Compute ( me : mutable;
409 aProjector : DataStructureManager from Graphic3d;
410 AMatrix : Array2OfReal from TColStd;
411 aStructure : in out Structure from Graphic3d )
414 ---Purpose: Returns the new Structure defined for the new visualization
415 ---Category: Methods to modify the class definition
417 ReCompute ( me : mutable );
419 ---Purpose: Forces a new construction of the structure <me>
420 -- if <me> is displayed and TOS_COMPUTED.
421 ---Category: Methods to modify the class definition
423 ReCompute ( me : mutable;
424 aProjector : DataStructureManager from Graphic3d );
426 ---Purpose: Forces a new construction of the structure <me>
427 -- if <me> is displayed in <aProjetor> and TOS_COMPUTED.
428 ---Category: Methods to modify the class definition
430 ----------------------------
431 -- Category: Inquire methods
432 ----------------------------
435 returns Boolean from Standard
438 ---Purpose: Returns Standard_True if the structure <me> contains
439 -- Polygons, Triangles or Quadrangles.
440 ---Category: Inquire methods
443 FillArea3dAspect ( me )
444 returns AspectFillArea3d from Graphic3d
447 ---Purpose: Returns the values of the current default attributes.
448 ---Category: Inquire methods
451 returns SequenceOfGroup from Graphic3d
453 ---C++: return const &
455 ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
456 ---Category: Inquire methods
458 NumberOfGroups ( me )
459 returns Integer from Standard
462 ---Purpose: Returns the current number of groups in the
464 ---Category: Inquire methods
466 HighlightColor ( me )
467 returns Color from Quantity
470 ---Purpose: Returns the highlight color for the Highlight method
471 -- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
472 ---Category: Inquire methods
475 returns Boolean from Standard
478 ---Purpose: Returns Standard_True if the structure <me> is deleted.
479 -- <me> is deleted after the call Remove (me).
480 ---Category: Inquire methods
483 returns Boolean from Standard
486 ---Purpose: Returns the display indicator for the structure <me>.
487 ---Category: Inquire methods
490 returns Boolean from Standard
493 ---Purpose: Returns Standard_True if the structure <me> is empty.
494 -- Warning: A structure is empty if :
495 -- it do not have group or all the groups are empties
496 -- and it do not have descendant or all the descendants
498 ---Category: Inquire methods
501 returns Boolean from Standard
504 ---Purpose: Returns Standard_True if the structure <me> is infinite.
505 ---Category: Inquire methods
508 returns Boolean from Standard
511 ---Purpose: Returns the highlight indicator for the structure <me>.
512 ---Category: Inquire methods
515 returns Boolean from Standard
518 ---Purpose: Returns the detectability indicator for the structure <me>.
519 ---Category: Inquire methods
522 returns Boolean from Standard
525 ---Purpose: Returns Standard_True if the structure <me> is rotated.
526 -- <=> The transformation != Identity, != Scale, != Translation.
527 ---Category: Inquire methods
530 returns Boolean from Standard
533 ---Purpose: Returns Standard_True if the structure <me> is transformed.
534 -- <=> The transformation != Identity.
535 ---Category: Inquire methods
538 returns Boolean from Standard
541 ---Purpose: Returns the visibility indicator for the structure <me>.
542 ---Category: Inquire methods
545 returns AspectLine3d from Graphic3d
548 ---Purpose: Returns the values of the current default attributes.
549 ---Category: Inquire methods
551 Marker3dAspect ( me )
552 returns AspectMarker3d from Graphic3d
554 ---Purpose: Returns the current group of graphic attributes used
555 -- for 3d marker primitives.
558 XMin, YMin, ZMin : out Real from Standard;
559 XMax, YMax, ZMax : out Real from Standard )
562 ---Purpose: Returns the coordinates of the boundary box
563 -- of the structure <me>.
564 -- Warning: If the structure <me> is empty or infinite then :
565 -- XMin = YMin = ZMin = RealFirst ().
566 -- XMax = YMax = ZMax = RealLast ().
567 ---Category: Inquire methods
569 PrimitivesAspect ( me;
570 CTXL : out AspectLine3d from Graphic3d;
571 CTXT : out AspectText3d from Graphic3d;
572 CTXM : out AspectMarker3d from Graphic3d;
573 CTXF : out AspectFillArea3d from Graphic3d )
576 ---Purpose: Returns the current values of the default attributes.
577 ---Category: Inquire methods
580 returns AspectText3d from Graphic3d
583 ---Purpose: Returns the values of the current default attributes.
584 ---Category: Inquire methods
587 returns TypeOfStructure from Graphic3d
590 ---Purpose: Returns the visualisation mode for the structure <me>.
591 ---Category: Inquire methods
593 ----------------------------------------------------
594 -- Category: Methods to manage the structure network
595 ----------------------------------------------------
597 -----------------------------------------------------
598 -- Summary of Structure Hierarchies --
600 -- The root is the top of a structure hierarchy --
601 -- or structure network. --
603 -- The attributes of a parent structure are passed --
604 -- passed to its descendants. --
606 -- The attributes of the descendant structures --
607 -- don't affect the parent. --
609 -- Recursive structure networks are not supported. --
610 -----------------------------------------------------
612 AcceptConnection ( myclass;
613 AStructure1 : Structure from Graphic3d;
614 AStructure2 : Structure from Graphic3d;
615 AType : TypeOfConnection from Graphic3d )
616 returns Boolean from Standard;
618 ---Purpose: Returns Standard_True if the connection is possible between
619 -- <AStructure1> and <AStructure2> without a creation
622 -- It's not possible to call the method
623 -- AStructure1->Connect (AStructure2, TypeOfConnection)
625 -- - the set of all ancestors of <AStructure1> contains
626 -- <AStructure1> and if the
627 -- TypeOfConnection == TOC_DESCENDANT
628 -- - the set of all descendants of <AStructure1> contains
629 -- <AStructure2> and if the
630 -- TypeOfConnection == TOC_ANCESTOR
631 ---Category: Methods to manage the structure network
633 Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
636 ---Purpose: Returns the group of structures to which <me> is connected.
637 ---Category: Methods to manage the structure network
639 Connect ( me : mutable;
640 AStructure : Structure from Graphic3d;
641 AType : TypeOfConnection from Graphic3d;
642 WithCheck : Boolean from Standard = Standard_False );
644 ---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
645 -- as a child structure of <me>.
646 -- If Atype is TOC_ANCESTOR then add <AStructure>
647 -- as a parent structure of <me>.
648 -- The connection propagates Display, Highlight, Erase,
649 -- Remove, and stacks the transformations.
650 -- No connection if the graph of the structures
651 -- contains a cycle and <WithCheck> is Standard_True;
652 ---Category: Methods to manage the structure network
654 Descendants ( me; SG : in out MapOfStructure from Graphic3d )
657 ---Purpose: Returns the group of structures connected to <me>.
658 ---Category: Methods to manage the structure network
660 Disconnect ( me : mutable;
661 AStructure : Structure from Graphic3d )
664 ---Purpose: Suppress the connection between <AStructure> and <me>.
665 ---Category: Methods to manage the structure network
667 DisconnectAll ( me : mutable;
668 AType : TypeOfConnection from Graphic3d )
671 ---Purpose: If Atype is TOC_DESCENDANT then suppress all
672 -- the connections with the child structures of <me>.
673 -- If Atype is TOC_ANCESTOR then suppress all
674 -- the connections with the parent structures of <me>.
675 ---Category: Methods to manage the structure network
678 AStructure : Structure from Graphic3d;
679 AType : TypeOfConnection from Graphic3d;
680 ASet : in out MapOfStructure from Graphic3d );
682 ---Purpose: Returns <ASet> the group of structures :
683 -- - directly or indirectly connected to <AStructure> if the
684 -- TypeOfConnection == TOC_DESCENDANT
685 -- - to which <AStructure> is directly or indirectly connected
686 -- if the TypeOfConnection == TOC_ANCESTOR
687 ---Category: Methods to manage the structure network
689 SetOwner ( me : mutable;
690 Owner : Address from Standard )
695 returns Address from Standard
699 SetHLRValidation ( me : mutable;
700 AFlag : Boolean from Standard )
705 returns Boolean from Standard
709 -----------------------------------------------------------
710 -- Category: Methods to manage the structure transformation
711 -----------------------------------------------------------
714 returns TypeOfComposition from Graphic3d
717 ---Purpose: Returns the type of composition applied to matrices
718 -- of transformation of <me>.
719 ---Category: Methods to manage the structure transformation
721 SetTransform ( me : mutable;
722 AMatrix : Array2OfReal from TColStd;
723 AType : TypeOfComposition from Graphic3d )
725 ---Purpose: Modifies the current local modelling transformation
726 -- in the structure <me>.
728 -- It is defined as a 4*4 real matrix.
730 -- -------------------
731 -- | a11 a12 a13 t1 |
732 -- | a21 a22 a23 t2 |
733 -- | a31 a32 a33 t3 |
735 -- -------------------
737 -- TypeOfComposition : TOC_REPLACE
738 -- TOC_POSTCONCATENATE
740 -- Then the modified Local Modelling Transformation is composed
741 -- with the current Global Modelling Transformation to create a
742 -- new Composite Modelling Transformation.
744 -- The compose type specifies the role of the current local
745 -- modelling transformation (L) in composing the new value for
746 -- the current local modelling transformation (L'), which is
747 -- then combined with the current global modelling transforma-
748 -- tion (G) to calculate the new composite modelling transfor-
752 -- The transformation matrix (T) replaces the value of
753 -- current local modelling transformation (L).
758 -- TOC_POSTCONCATENATE
759 -- The current local modelling transformation (L) is multiplied
760 -- by the transformation matrix (T):
765 -- Category: Methods to manage the structure transformation
766 -- Warning: Raises TransformError if the matrix is not a 4x4 matrix.
767 raises TransformError from Graphic3d is static;
769 -- Transform ( me : mutable;
771 AMatrix : in out Array2OfReal from TColStd )
774 ---Purpose: Returns the transformation associated with
775 -- the structure <me>.
776 ---Category: Methods to manage the structure transformation
778 SetTransformPersistence( me : mutable;
779 AFlag : TransModeFlags from Graphic3d;
780 APoint : Pnt from gp )
782 ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
785 SetTransformPersistence( me : mutable;
786 AFlag : TransModeFlags from Graphic3d )
787 -- Calls previous method with point (0,0,0)
791 TransformPersistenceMode( me )
792 returns TransModeFlags from Graphic3d
794 ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
797 TransformPersistencePoint( me )
800 ---Purpose: Get the current point of relative modelling transform persistence
803 ----------------------------
804 -- Category: Private methods
805 ----------------------------
808 AGroup : Group from Graphic3d )
811 ---Purpose: Inserts in the structure <me>, the group <G>.
812 -- It will be erased at the next screen update.
813 ---Category: Private methods
816 returns TypeOfStructure from Graphic3d
819 ---Category: Private methods
821 GroupsWithFacet ( me : mutable;
822 ADelta : Integer from Standard )
825 ---Purpose: Manages the number of groups in the structure <me>
826 -- which contains facet.
827 -- Polygons, Triangles or Quadrangles.
828 -- <ADelta> = +1 or -1
829 ---Category: Private methods
831 GraphicClear ( me : mutable;
832 WithDestruction : Boolean from Standard )
835 ---Purpose: Clears the structure <me>.
836 ---Category: Private methods
838 GraphicConnect ( me : mutable;
839 ADaughter : Structure from Graphic3d )
843 ---Category: Private methods
845 GraphicDisconnect ( me : mutable;
846 ADaughter : Structure from Graphic3d )
850 ---Category: Private methods
852 GraphicHighlight ( me : mutable;
853 Method : TypeOfHighlightMethod from Aspect )
856 ---Purpose: Highlights the structure <me>.
857 ---Category: Private methods
859 GraphicTransform ( me : mutable;
860 AMatrix : Array2OfReal from TColStd )
864 ---Category: Private methods
866 GraphicUnHighlight ( me : mutable )
869 ---Purpose: Suppress the highlight for the structure <me>.
870 ---Category: Private methods
872 Identification ( me )
873 returns Integer from Standard
876 ---Purpose: Returns the identification number of the structure <me>.
877 ---Category: Private methods
880 XMin, YMin, ZMin : out Real from Standard;
881 XMax, YMax, ZMax : out Real from Standard )
884 ---Purpose: Returns the extreme coordinates found in the
886 -- Warning: If the structure <me> is empty or infinite then :
887 -- XMin = YMin = ZMin = RealFirst ().
888 -- XMax = YMax = ZMax = RealLast ().
889 ---Category: Private methods
892 aPlotter : Plotter from Graphic3d )
895 ---Category: Private methods
897 PrintNetwork ( myclass;
898 AStructure : Structure from Graphic3d;
899 AType : TypeOfConnection from Graphic3d );
901 ---Purpose: Prints informations about the network associated
902 -- with the structure <AStructure>.
903 ---Category: Private methods
905 Remove ( me : mutable;
906 APtr : Address from Standard;
907 AType : TypeOfConnection from Graphic3d )
910 ---Purpose: Suppress the adress <APtr> in the list
911 -- of descendants or in the list of ancestors.
912 ---Category: Private methods
914 Remove ( me : mutable;
915 AGroup : Group from Graphic3d )
918 ---Purpose: Suppress in the structure <me>, the group <AGroup>.
919 -- It will be erased at the next screen update.
920 ---Category: Private methods
922 SetComputeVisual ( me : mutable;
923 AVisual : TypeOfStructure from Graphic3d )
926 ---Category: Private methods
928 StructureManager ( me )
929 returns StructureManager from Graphic3d
932 ---Purpose: Returns the manager to which <me> is associated.
933 ---Category: Private methods
935 Transforms ( myclass;
936 ATrsf : Array2OfReal from TColStd;
937 X, Y, Z : Real from Standard;
938 NewX, NewY, NewZ : out Real from Standard );
940 ---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
941 ---Category: Private methods
943 Transforms ( myclass;
944 ATrsf : Array2OfReal from TColStd;
945 Coord : Vector from Graphic3d )
946 returns Vector from Graphic3d;
948 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
949 ---Category: Private methods
951 Transforms ( myclass;
952 ATrsf : Array2OfReal from TColStd;
953 Coord : Vertex from Graphic3d )
954 returns Vertex from Graphic3d;
956 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
957 ---Category: Private methods
962 ---Purpose: Calls the Update method of the StructureManager which
963 -- contains the Structure <me>.
964 ---Category: Private methods
966 UpdateStructure ( me : mutable;
967 CTXL : AspectLine3d from Graphic3d;
968 CTXT : AspectText3d from Graphic3d;
969 CTXM : AspectMarker3d from Graphic3d;
970 CTXF : AspectFillArea3d from Graphic3d )
973 ---Purpose: Updates the c structure associated to <me>.
974 ---Category: Private methods
976 CStructure ( me : mutable )
977 returns CStructure from Graphic3d
980 ---Purpose: Returns the c structure associated to <me>.
981 ---Category: Private methods
987 -- Class : Graphic3d_Structure
989 -- Purpose : Declaration of variables specific to
990 -- graphic structures.
991 -- Reminder : A structure is defined in a manager.
992 -- It is a sequence of groups of primitives.
995 -- the associated C structure
996 MyCStructure : CStructure from Graphic3d;
998 -- the structures to which the structure is attached
999 MyAncestors : SequenceOfAddress from TColStd;
1001 -- the structures attached to the structure
1002 MyDescendants : SequenceOfAddress from TColStd;
1004 -- the sequence of groups
1005 MyGroups : SequenceOfGroup from Graphic3d;
1007 -- the graphic driver used
1008 MyGraphicDriver : GraphicDriver from Graphic3d;
1010 -- the highlight method of the structure
1011 MyHighlightColor : Color from Quantity;
1012 MyHighlightMethod : TypeOfHighlightMethod from Aspect;
1014 -- the manager accepting the structure
1015 MyPtrStructureManager : Address from Standard is protected;
1016 MyFirstPtrStructureManager : Address from Standard is protected;
1017 MyOwner : Address from Standard;
1019 -- the type of visualisation accepted by the structure
1020 MyVisual : TypeOfStructure from Graphic3d;
1021 MyComputeVisual : TypeOfStructure from Graphic3d is protected;
1025 -- a lot of methods of Group use the methods of Structure
1026 class Group from Graphic3d