1 -- File: Graphic3d_Structure.cdl
2 -- Created: Mercredi 12 Juin 1991
4 -- 11/97 ; CAL : gestion du GraphicClear
5 -- 11/97 ; CAL : ajout pointer StructPtr
6 -- 11/97 ; CAL : amelioration de l'effacement SetManager
7 -- 01/98 ; CAL : gestion du HLRValidation
8 -- 05/98 ; CAL : gestion du GraphicConnect et Disconnect
9 -- 02/00 ; GG : Made Transform() methode not mutable.
10 -- 31/05/01 ; GG : Add ResetDisplayPriority() method
12 ---Copyright: MatraDatavision 1998
15 class Structure from Graphic3d inherits TShared
19 ---Purpose: This class allows the definition a graphic object.
20 -- This graphic structure can be displayed,
21 -- erased, or highlighted.
22 -- This graphic structure can be connected with
23 -- another graphic structure.
24 -- Keywords: Structure, StructureManager, Display, Erase, Highlight,
25 -- UnHighlight, Visible, Priority, Selectable, Visible,
26 -- Visual, Connection, Ancestors, Descendants, Transformation
33 Array2OfReal from TColStd,
34 SequenceOfAddress from TColStd,
39 TypeOfHighlightMethod from Aspect,
41 DataStructureManager from Graphic3d,
42 AspectFillArea3d from Graphic3d,
43 AspectLine3d from Graphic3d,
44 AspectMarker3d from Graphic3d,
45 AspectText3d from Graphic3d,
46 CStructure from Graphic3d,
47 GraphicDriver from Graphic3d,
49 SequenceOfGroup from Graphic3d,
50 HSequenceOfGroup from Graphic3d,
51 SequenceOfStructure from Graphic3d,
52 HSequenceOfStructure from Graphic3d,
53 MapOfStructure from Graphic3d,
54 Plotter from Graphic3d,
55 StructureManager from Graphic3d,
56 TypeOfComposition from Graphic3d,
57 TypeOfConnection from Graphic3d,
58 TypeOfPrimitive from Graphic3d,
59 TypeOfStructure from Graphic3d,
60 Vector from Graphic3d,
61 VertexNC from Graphic3d,
62 Vertex from Graphic3d,
63 TransModeFlags from Graphic3d,
68 PriorityDefinitionError from Graphic3d,
69 StructureDefinitionError from Graphic3d,
70 TransformError from Graphic3d
74 ------------------------
75 -- Category: Constructor
76 ------------------------
78 Create ( AManager : StructureManager from Graphic3d )
79 returns mutable Structure from Graphic3d;
81 ---Purpose: Creates a graphic object in the manager <AManager>.
82 -- It will appear in all the views of the visualiser.
83 -- Warning: The default values AspectLine, AspectFillArea,
84 -- AspectText and AspectMarker are NOT applied to the
86 -- The structure is not displayed when it is created.
88 ---------------------------------------------------
89 -- Category: Methods to modify the class definition
90 ---------------------------------------------------
92 --------------------------------------------------------
93 -- Summary of Display Priorities --
95 -- Structure display priorities control the order in --
96 -- which structures are redrawn. --
98 -- When you display a structure, you specify its --
99 -- priority. The lower the value, the lower the --
100 -- display priority. When the display is regenerated, --
101 -- the structures with the lowest priority are drawn --
103 -- For structures with the same display priority, --
104 -- the order in which they were displayed determines --
105 -- determines the drawing order. --
107 -- CAS.CADE supports 11 structure display priorities, --
109 --------------------------------------------------------
111 Clear ( me : mutable;
112 WithDestruction : Boolean from Standard = Standard_True )
115 ---Purpose: if WithDestruction == Standard_True then
116 -- suppress all the groups of primitives in the structure.
117 -- and it is mandatory to create a new group in <me>.
118 -- if WithDestruction == Standard_False then
119 -- clears all the groups of primitives in the structure.
120 -- and all the groups are conserved and empty.
121 -- They will be erased at the next screen update.
122 -- The structure itself is conserved.
123 -- The transformation and the attributes of <me> are conserved.
124 -- The childs of <me> are conserved.
125 ---Category: Methods to modify the class definition
127 Destroy ( me : mutable )
130 ---Purpose: Suppresses the structure <me>.
131 -- It will be erased at the next screen update.
132 ---Category: Methods to modify the class definition
135 Display ( me : mutable )
138 ---Purpose: Displays the structure <me> in all the views of
140 ---Category: Methods to modify the class definition
142 Display ( me : mutable;
143 Priority : Integer from Standard )
145 ---Purpose: Displays the structure <me> in all the views of
146 -- the visualiser, while modifying its current priority.
147 -- Note: Display Priorities
148 -- Structure display priorities control the order in which
149 -- structures are redrawn. When you display a
150 -- structure, you specify its priority. The lower the value,
151 -- the lower the display priority. When the display is
152 -- regenerated, the structures with the lowest priority
153 -- are drawn first. For structures with the same display
154 -- priority, the order in which they were displayed
155 -- determines the drawing order. Open CASCADE
156 -- supports 11 structure display priorities, 0 to 10.
157 -- Warning: Raises PriorityDefinitionError if <Priority> is
158 -- greater than 10 or a negative value.
159 raises PriorityDefinitionError from Graphic3d is static;
161 DisplayPriority ( me )
162 returns Integer from Standard
165 ---Purpose: Returns the current display priority for the
167 ---Category: Methods to modify the class definition
169 Erase ( me : mutable )
172 ---Purpose: Erases the structure <me> in all the views
173 -- of the visualiser.
174 ---Category: Methods to modify the class definition
176 Highlight ( me : mutable;
177 Method : TypeOfHighlightMethod from Aspect )
180 ---Purpose: Highlights the structure <me> in all the
181 -- views of the visualiser, using the following methods:
183 -- TOHM_COLOR = drawn in the highlight color
185 -- TOHM_BLINK = blinking
186 -- TOHM_BOUNDBOX = enclosed by the boundary box
189 ---Category: Methods to modify the class definition
191 Remove ( me : mutable )
194 ---Purpose: Suppress the structure <me>.
195 -- It will be erased at the next screen update.
196 -- Warning: No more graphic operations in <me> after this call.
197 -- Category: Methods to modify the class definition
199 SetHighlightColor ( me : mutable;
200 AColor : Color from Quantity )
203 ---Purpose: Modifies the highlight color for the Highlight method
204 -- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
205 ---Category: Methods to modify the class definition
207 SetInfiniteState ( me : mutable;
208 AFlag : Boolean from Standard )
211 ---Purpose: Modifies the coordinates of the boundary box
212 -- of the structure <me>.
213 -- if <AFlag> is Standard_True then <me> is infinite and
214 -- the MinMaxValues method or the MinMaxCoord method return :
215 -- XMin = YMin = ZMin = RealFirst ().
216 -- XMax = YMax = ZMax = RealLast ().
217 -- By default, <me> is not infinite but empty.
218 ---Category: Methods to modify the class definition
220 SetDisplayPriority ( me : mutable;
221 Priority : Integer from Standard )
223 ---Purpose: Modifies the order of displaying the structure.
224 -- Values are between 0 et 10.
225 -- The priority 10 being displayed first.
226 -- The default value is 5
227 -- Category: Methods to modify the class definition
228 -- Warning: If <me> is displayed then the SetDisplayPriority
229 -- method erase <me> and display <me> with the
231 -- Raises PriorityDefinitionError if <Priority> is
232 -- greater than 10 or a negative value.
233 raises PriorityDefinitionError from Graphic3d is static;
235 ResetDisplayPriority ( me : mutable)
238 ---Purpose: Reset the current priority of the structure to the
239 -- previous priority.
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 -- previous priority.
245 SetZLayer ( me : mutable;
246 theLayerId : Integer from Standard )
248 ---Purpose: Set Z layer ID for the structure. The Z layer mechanism
249 -- allows to display structures presented in higher layers in overlay
250 -- of structures in lower layers by switching off z buffer depth
251 -- test between layers
254 returns Integer from Standard is static;
255 ---Purpose: Get Z layer ID of displayed structure. The method
256 -- returns -1 if the structure has no ID (deleted from graphic driver).
258 SetPick ( me : mutable;
259 AValue : Boolean from Standard )
262 ---Purpose: Modifies the detectability indicator to Standard_True
263 -- or Standard_False for the structure <me>.
264 -- The default value at the definition of <me> is
266 ---Category: Methods to modify the class definition
268 SetPrimitivesAspect ( me : mutable;
269 CTX : AspectLine3d from Graphic3d )
272 ---Purpose: Modifies the default attributes for lines
273 -- in the structure <me>.
274 ---Category: Methods to modify the class definition
276 SetPrimitivesAspect ( me : mutable;
277 CTX : AspectFillArea3d from Graphic3d )
280 ---Purpose: Modifies the default attributes for faces
281 -- in the structure <me>.
282 ---Category: Methods to modify the class definition
284 SetPrimitivesAspect ( me : mutable;
285 CTX : AspectText3d from Graphic3d )
288 ---Purpose: Modifies the default attributes for text
289 -- in the structure <me>.
290 ---Category: Methods to modify the class definition
292 SetPrimitivesAspect ( me : mutable;
293 CTX : AspectMarker3d from Graphic3d )
296 ---Purpose: Modifies the default attributes for markers
297 -- in the structure <me>.
298 ---Category: Methods to modify the class definition
300 SetVisible ( me : mutable;
301 AValue : Boolean from Standard )
304 ---Purpose: Modifies the visibility indicator to Standard_True or
305 -- Standard_False for the structure <me>.
306 -- The default value at the definition of <me> is
308 ---Category: Methods to modify the class definition
310 SetManager ( me : mutable;
311 AManager : StructureManager from Graphic3d;
312 WithPropagation : Boolean from Standard = Standard_False)
315 ---Purpose: Moves the graphic object <me> in the manager <AManager>.
316 -- If <WithPropagation> is Standard_True then all the connected
317 -- graphic objects to <me> are moved.
319 SetVisual ( me : mutable;
320 AVisual : TypeOfStructure from Graphic3d )
323 ---Purpose: Modifies the visualisation mode for the structure <me>.
324 ---Warning: It is not possible to display a structure with
325 -- an incompatible display mode.
326 -- If the display mode is different from the current one,
327 -- the structure is erased.
329 -- TOS_WIREFRAME for a wireframe visualisation
330 -- TOS_SHADING for a shaded visualisation
331 -- TOS_ALL for all visualisations
332 -- TOS_COMPUTED for a computed visualisation
333 -- The default value is TOS_ALL
335 ---Category: Methods to modify the class definition
337 SetZoomLimit ( me : mutable;
338 LimitInf, LimitSup : Real from Standard )
340 ---Purpose: Modifies the minimum and maximum zoom coefficients
341 -- for the structure <me>.
342 -- The default value at the definition of <me> is unlimited.
343 -- Category: Methods to modify the class definition
344 -- Warning: Raises StructureDefinitionError if <LimitInf> is
345 -- greater than <LimitSup> or if <LimitInf> or
346 -- <LimitSup> is a negative value.
347 raises StructureDefinitionError from Graphic3d is static;
349 UnHighlight ( me : mutable )
352 ---Purpose: Suppresses the highlight for the structure <me>
353 -- in all the views of the visualiser.
354 ---Category: Methods to modify the class definition
356 ----------------------------
357 -- Category: Compute methods
358 ----------------------------
360 Compute ( me : mutable;
361 aProjector : DataStructureManager from Graphic3d )
362 returns Structure from Graphic3d is virtual;
364 ---Purpose: Returns the new Structure defined for the new visualization
365 ---Category: Methods to modify the class definition
367 Compute ( me : mutable;
368 aProjector : DataStructureManager from Graphic3d;
369 AMatrix : Array2OfReal from TColStd )
370 returns Structure from Graphic3d is virtual;
372 ---Purpose: Returns the new Structure defined for the new visualization
373 ---Category: Methods to modify the class definition
375 Compute ( me : mutable;
376 aProjector : DataStructureManager from Graphic3d;
377 aStructure : in out Structure from Graphic3d )
380 ---Purpose: Returns the new Structure defined for the new visualization
381 ---Category: Methods to modify the class definition
383 Compute ( me : mutable;
384 aProjector : DataStructureManager from Graphic3d;
385 AMatrix : Array2OfReal from TColStd;
386 aStructure : in out Structure from Graphic3d )
389 ---Purpose: Returns the new Structure defined for the new visualization
390 ---Category: Methods to modify the class definition
392 ReCompute ( me : mutable );
394 ---Purpose: Forces a new construction of the structure <me>
395 -- if <me> is displayed and TOS_COMPUTED.
396 ---Category: Methods to modify the class definition
398 ReCompute ( me : mutable;
399 aProjector : DataStructureManager from Graphic3d );
401 ---Purpose: Forces a new construction of the structure <me>
402 -- if <me> is displayed in <aProjetor> and TOS_COMPUTED.
403 ---Category: Methods to modify the class definition
405 ----------------------------
406 -- Category: Inquire methods
407 ----------------------------
410 returns Boolean from Standard
413 ---Purpose: Returns Standard_True if the structure <me> contains
414 -- Polygons, Triangles or Quadrangles.
415 ---Category: Inquire methods
418 ElementNumber : Integer from Standard;
419 AVertex : out VertexNC from Graphic3d;
420 AVector : out Vector from Graphic3d )
421 returns Boolean from Standard
424 ---Purpose: Explores a structure element of <me>.
425 -- Returns Standard_True if the exploration succeded and
426 -- Standard_False if the exploration is done or if the
427 -- specified structure element is not in the structure.
428 -- <AVertex> contains the coordinates, the normal and
429 -- the color of the vertex found in the structure element.
430 -- <AVector> contains the normal of the face.
431 -- Warning: - The structure element number is given by
432 -- Visual3d_ViewManager::Pick method.
433 -- - The primitive type is given by
434 -- Graphic3d_Structure::Type method.
435 -- - The normal is (0.0, 0.0, 0.0) when the normal is not
436 -- specified in the structure element.
437 -- - The color is (0.0, 0.0, 0.0) when the color is not
438 -- specified in the structure element.
439 -- - To initialize the exploration, you have to call the
440 -- Graphic3d_Structure::Type method before this method.
442 -- Programming example :
444 -- // Define a graphic device
445 -- Handle(Graphic3d_GraphicDevice) GD =
446 -- new Graphic3d_GraphicDevice ("dummy:0.0");
448 -- // Define a view manager
449 -- Handle(Visual3d_ViewManager) VM = new Visual3d_ViewManager (GD);
452 -- Handle(Visual3d_View) V = new Visual3d_View (VM);
454 -- // Define a window
455 -- Handle(Aspect_Window) W = new Aspect_Window
456 -- (GD, "Graphic View 1", 0.695, 0.695, 0.600, 0.600,
457 -- Xw_WQ_3DQUALITY, Quantity_NOC_MATRAGRAY);
459 -- // Define a context pick
460 -- Visual3d_ContextPick CTXP;
462 -- // Activate the view
466 -- // Create a structure
467 -- Handle(Graphic3d_Structure) S = new Graphic3d_Structure (V);
468 -- Handle(Graphic3d_Group) G = new Graphic3d_Group (S);
470 -- // Create a polygon
471 -- G->Polygon (PtsArray);
473 -- // Display the structure
477 -- Visual3d_PickDescriptor PDes (CTXP);
479 -- PDes = V->Pick (CTXP, W, x, y);
481 -- // Explore the top structure
482 -- Standard_Boolean Next = Standard_True;
483 -- Graphic3d_Vertex AVertex;
484 -- Graphic3d_Vector AVector;
485 -- if ((PDes.TopStructure ())->Type () == Graphic3d_TOP_POLYGON)
487 -- Next = S->Exploration (PDes.TopElementNumber (),
488 -- AVertex, AVector);
490 -- cout << "Point " << AVertex.X () << " , "
491 -- << AVertex.Y () << " , " << AVertex.Z () << "\n";
492 -- if (! AVector.LengthZero ())
493 -- cout << "Normal " << AVector.X () << " , "
494 -- << AVector.Y () << " , " << AVector.Z () << "\n";
499 ---Category: Inquire methods
501 FillArea3dAspect ( me )
502 returns AspectFillArea3d from Graphic3d
505 ---Purpose: Returns the values of the current default attributes.
506 ---Category: Inquire methods
509 returns SequenceOfGroup from Graphic3d
511 ---C++: return const &
513 ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
514 ---Category: Inquire methods
516 NumberOfGroups ( me )
517 returns Integer from Standard
520 ---Purpose: Returns the current number of groups in the
522 ---Category: Inquire methods
524 HighlightColor ( me )
525 returns Color from Quantity
528 ---Purpose: Returns the highlight color for the Highlight method
529 -- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
530 ---Category: Inquire methods
533 returns Boolean from Standard
536 ---Purpose: Returns Standard_True if the structure <me> is deleted.
537 -- <me> is deleted after the call Remove (me).
538 ---Category: Inquire methods
541 returns Boolean from Standard
544 ---Purpose: Returns the display indicator for the structure <me>.
545 ---Category: Inquire methods
548 returns Boolean from Standard
551 ---Purpose: Returns Standard_True if the structure <me> is empty.
552 -- Warning: A structure is empty if :
553 -- it do not have group or all the groups are empties
554 -- and it do not have descendant or all the descendants
556 ---Category: Inquire methods
559 returns Boolean from Standard
562 ---Purpose: Returns Standard_True if the structure <me> is infinite.
563 ---Category: Inquire methods
566 returns Boolean from Standard
569 ---Purpose: Returns the highlight indicator for the structure <me>.
570 ---Category: Inquire methods
573 returns Boolean from Standard
576 ---Purpose: Returns the detectability indicator for the structure <me>.
577 ---Category: Inquire methods
580 returns Boolean from Standard
583 ---Purpose: Returns Standard_True if the structure <me> is rotated.
584 -- <=> The transformation != Identity, != Scale, != Translation.
585 ---Category: Inquire methods
588 returns Boolean from Standard
591 ---Purpose: Returns Standard_True if the structure <me> is transformed.
592 -- <=> The transformation != Identity.
593 ---Category: Inquire methods
596 returns Boolean from Standard
599 ---Purpose: Returns the visibility indicator for the structure <me>.
600 ---Category: Inquire methods
603 returns AspectLine3d from Graphic3d
606 ---Purpose: Returns the values of the current default attributes.
607 ---Category: Inquire methods
609 Marker3dAspect ( me )
610 returns AspectMarker3d from Graphic3d
612 ---Purpose: Returns the current group of graphic attributes used
613 -- for 3d marker primitives.
616 XMin, YMin, ZMin : out Real from Standard;
617 XMax, YMax, ZMax : out Real from Standard )
620 ---Purpose: Returns the coordinates of the boundary box
621 -- of the structure <me>.
622 -- Warning: If the structure <me> is empty or infinite then :
623 -- XMin = YMin = ZMin = RealFirst ().
624 -- XMax = YMax = ZMax = RealLast ().
625 ---Category: Inquire methods
627 PrimitivesAspect ( me;
628 CTXL : out AspectLine3d from Graphic3d;
629 CTXT : out AspectText3d from Graphic3d;
630 CTXM : out AspectMarker3d from Graphic3d;
631 CTXF : out AspectFillArea3d from Graphic3d )
634 ---Purpose: Returns the current values of the default attributes.
635 ---Category: Inquire methods
638 returns AspectText3d from Graphic3d
641 ---Purpose: Returns the values of the current default attributes.
642 ---Category: Inquire methods
645 ElementNumber : Integer from Standard )
646 returns TypeOfPrimitive from Graphic3d
649 ---Purpose: Returns the primitive type stored in the structure
650 -- element <ElementNumber>.
651 -- Initialises the exploration of this primitive.
652 -- If the structure element is not a primitive, returns
653 -- Graphic3d_TOP_UNDEFINED.
654 -- Warning: The structure element number is given by
655 -- Visual3d_ViewManager::Pick method.
656 ---Category: Inquire methods
659 returns TypeOfStructure from Graphic3d
662 ---Purpose: Returns the visualisation mode for the structure <me>.
663 ---Category: Inquire methods
665 ----------------------------------------------------
666 -- Category: Methods to manage the structure network
667 ----------------------------------------------------
669 -----------------------------------------------------
670 -- Summary of Structure Hierarchies --
672 -- The root is the top of a structure hierarchy --
673 -- or structure network. --
675 -- The attributes of a parent structure are passed --
676 -- passed to its descendants. --
678 -- The attributes of the descendant structures --
679 -- don't affect the parent. --
681 -- Recursive structure networks are not supported. --
682 -----------------------------------------------------
684 AcceptConnection ( myclass;
685 AStructure1 : Structure from Graphic3d;
686 AStructure2 : Structure from Graphic3d;
687 AType : TypeOfConnection from Graphic3d )
688 returns Boolean from Standard;
690 ---Purpose: Returns Standard_True if the connection is possible between
691 -- <AStructure1> and <AStructure2> without a creation
694 -- It's not possible to call the method
695 -- AStructure1->Connect (AStructure2, TypeOfConnection)
697 -- - the set of all ancestors of <AStructure1> contains
698 -- <AStructure1> and if the
699 -- TypeOfConnection == TOC_DESCENDANT
700 -- - the set of all descendants of <AStructure1> contains
701 -- <AStructure2> and if the
702 -- TypeOfConnection == TOC_ANCESTOR
703 ---Category: Methods to manage the structure network
705 Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
708 ---Purpose: Returns the group of structures to which <me> is connected.
709 ---Category: Methods to manage the structure network
711 Connect ( me : mutable;
712 AStructure : Structure from Graphic3d;
713 AType : TypeOfConnection from Graphic3d;
714 WithCheck : Boolean from Standard = Standard_False );
716 ---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
717 -- as a child structure of <me>.
718 -- If Atype is TOC_ANCESTOR then add <AStructure>
719 -- as a parent structure of <me>.
720 -- The connection propagates Display, Highlight, Erase,
721 -- Remove, and stacks the transformations.
722 -- No connection if the graph of the structures
723 -- contains a cycle and <WithCheck> is Standard_True;
724 ---Category: Methods to manage the structure network
726 Descendants ( me; SG : in out MapOfStructure from Graphic3d )
729 ---Purpose: Returns the group of structures connected to <me>.
730 ---Category: Methods to manage the structure network
732 Disconnect ( me : mutable;
733 AStructure : Structure from Graphic3d )
736 ---Purpose: Suppress the connection between <AStructure> and <me>.
737 ---Category: Methods to manage the structure network
739 DisconnectAll ( me : mutable;
740 AType : TypeOfConnection from Graphic3d )
743 ---Purpose: If Atype is TOC_DESCENDANT then suppress all
744 -- the connections with the child structures of <me>.
745 -- If Atype is TOC_ANCESTOR then suppress all
746 -- the connections with the parent structures of <me>.
747 ---Category: Methods to manage the structure network
750 AStructure : Structure from Graphic3d;
751 AType : TypeOfConnection from Graphic3d;
752 ASet : in out MapOfStructure from Graphic3d );
754 ---Purpose: Returns <ASet> the group of structures :
755 -- - directly or indirectly connected to <AStructure> if the
756 -- TypeOfConnection == TOC_DESCENDANT
757 -- - to which <AStructure> is directly or indirectly connected
758 -- if the TypeOfConnection == TOC_ANCESTOR
759 ---Category: Methods to manage the structure network
761 SetOwner ( me : mutable;
762 Owner : Address from Standard )
767 returns Address from Standard
771 SetHLRValidation ( me : mutable;
772 AFlag : Boolean from Standard )
777 returns Boolean from Standard
781 -----------------------------------------------------------
782 -- Category: Methods to manage the structure transformation
783 -----------------------------------------------------------
786 returns TypeOfComposition from Graphic3d
789 ---Purpose: Returns the type of composition applied to matrices
790 -- of transformation of <me>.
791 ---Category: Methods to manage the structure transformation
793 SetTransform ( me : mutable;
794 AMatrix : Array2OfReal from TColStd;
795 AType : TypeOfComposition from Graphic3d )
797 ---Purpose: Modifies the current local modelling transformation
798 -- in the structure <me>.
800 -- It is defined as a 4*4 real matrix.
802 -- -------------------
803 -- | a11 a12 a13 t1 |
804 -- | a21 a22 a23 t2 |
805 -- | a31 a32 a33 t3 |
807 -- -------------------
809 -- TypeOfComposition : TOC_REPLACE
810 -- TOC_POSTCONCATENATE
812 -- Then the modified Local Modelling Transformation is composed
813 -- with the current Global Modelling Transformation to create a
814 -- new Composite Modelling Transformation.
816 -- The compose type specifies the role of the current local
817 -- modelling transformation (L) in composing the new value for
818 -- the current local modelling transformation (L'), which is
819 -- then combined with the current global modelling transforma-
820 -- tion (G) to calculate the new composite modelling transfor-
824 -- The transformation matrix (T) replaces the value of
825 -- current local modelling transformation (L).
830 -- TOC_POSTCONCATENATE
831 -- The current local modelling transformation (L) is multiplied
832 -- by the transformation matrix (T):
837 -- Category: Methods to manage the structure transformation
838 -- Warning: Raises TransformError if the matrix is not a 4x4 matrix.
839 raises TransformError from Graphic3d is static;
841 -- Transform ( me : mutable;
843 AMatrix : in out Array2OfReal from TColStd )
846 ---Purpose: Returns the transformation associated with
847 -- the structure <me>.
848 ---Category: Methods to manage the structure transformation
850 SetTransformPersistence( me : mutable;
851 AFlag : TransModeFlags from Graphic3d;
852 APoint : Pnt from gp )
854 ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
857 SetTransformPersistence( me : mutable;
858 AFlag : TransModeFlags from Graphic3d )
859 -- Calls previous method with point (0,0,0)
863 TransformPersistenceMode( me )
864 returns TransModeFlags from Graphic3d
866 ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
869 TransformPersistencePoint( me )
872 ---Purpose: Get the current point of relative modelling transform persistence
875 ----------------------------
876 -- Category: Private methods
877 ----------------------------
880 AGroup : Group from Graphic3d )
883 ---Purpose: Inserts in the structure <me>, the group <G>.
884 -- It will be erased at the next screen update.
885 ---Category: Private methods
888 returns TypeOfStructure from Graphic3d
891 ---Category: Private methods
893 GroupsWithFacet ( me : mutable;
894 ADelta : Integer from Standard )
897 ---Purpose: Manages the number of groups in the structure <me>
898 -- which contains facet.
899 -- Polygons, Triangles or Quadrangles.
900 -- <ADelta> = +1 or -1
901 ---Category: Private methods
906 ---Purpose: Prints informations about the structure <me>.
907 ---Category: Private methods
909 GraphicClear ( me : mutable;
910 WithDestruction : Boolean from Standard )
913 ---Purpose: Clears the structure <me>.
914 ---Category: Private methods
916 GraphicConnect ( me : mutable;
917 ADaughter : Structure from Graphic3d )
921 ---Category: Private methods
923 GraphicDisconnect ( me : mutable;
924 ADaughter : Structure from Graphic3d )
928 ---Category: Private methods
930 GraphicHighlight ( me : mutable;
931 Method : TypeOfHighlightMethod from Aspect )
934 ---Purpose: Highlights the structure <me>.
935 ---Category: Private methods
937 GraphicTransform ( me : mutable;
938 AMatrix : Array2OfReal from TColStd )
942 ---Category: Private methods
944 GraphicUnHighlight ( me : mutable )
947 ---Purpose: Suppress the highlight for the structure <me>.
948 ---Category: Private methods
950 GroupLabels ( me : mutable;
951 LB, LE : in out Integer from Standard )
954 ---Purpose: Returns the labels for a new group in the structure <me>.
955 ---Category: Private methods
957 Identification ( me )
958 returns Integer from Standard
961 ---Purpose: Returns the identification number of the structure <me>.
962 ---Category: Private methods
965 XMin, YMin, ZMin : out Real from Standard;
966 XMax, YMax, ZMax : out Real from Standard )
969 ---Purpose: Returns the extreme coordinates found in the
971 -- Warning: If the structure <me> is empty or infinite then :
972 -- XMin = YMin = ZMin = RealFirst ().
973 -- XMax = YMax = ZMax = RealLast ().
974 ---Category: Private methods
977 aPlotter : Plotter from Graphic3d )
980 ---Category: Private methods
982 PrintNetwork ( myclass;
983 AStructure : Structure from Graphic3d;
984 AType : TypeOfConnection from Graphic3d );
986 ---Purpose: Prints informations about the network associated
987 -- with the structure <AStructure>.
988 ---Category: Private methods
990 Remove ( me : mutable;
991 APtr : Address from Standard;
992 AType : TypeOfConnection from Graphic3d )
995 ---Purpose: Suppress the adress <APtr> in the list
996 -- of descendants or in the list of ancestors.
997 ---Category: Private methods
999 Remove ( me : mutable;
1000 AGroup : Group from Graphic3d )
1003 ---Purpose: Suppress in the structure <me>, the group <AGroup>.
1004 -- It will be erased at the next screen update.
1005 ---Category: Private methods
1007 SetComputeVisual ( me : mutable;
1008 AVisual : TypeOfStructure from Graphic3d )
1011 ---Category: Private methods
1013 StructureManager ( me )
1014 returns StructureManager from Graphic3d
1017 ---Purpose: Returns the manager to which <me> is associated.
1018 ---Category: Private methods
1020 Transforms ( myclass;
1021 ATrsf : Array2OfReal from TColStd;
1022 X, Y, Z : Real from Standard;
1023 NewX, NewY, NewZ : out Real from Standard );
1025 ---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
1026 ---Category: Private methods
1028 Transforms ( myclass;
1029 ATrsf : Array2OfReal from TColStd;
1030 Coord : Vector from Graphic3d )
1031 returns Vector from Graphic3d;
1033 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
1034 ---Category: Private methods
1036 Transforms ( myclass;
1037 ATrsf : Array2OfReal from TColStd;
1038 Coord : Vertex from Graphic3d )
1039 returns Vertex from Graphic3d;
1041 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
1042 ---Category: Private methods
1047 ---Purpose: Calls the Update method of the StructureManager which
1048 -- contains the Structure <me>.
1049 ---Category: Private methods
1051 UpdateStructure ( me : mutable;
1052 CTXL : AspectLine3d from Graphic3d;
1053 CTXT : AspectText3d from Graphic3d;
1054 CTXM : AspectMarker3d from Graphic3d;
1055 CTXF : AspectFillArea3d from Graphic3d )
1058 ---Purpose: Updates the c structure associated to <me>.
1059 ---Category: Private methods
1062 returns Address from Standard
1065 ---Purpose: Returns the c structure associated to <me>.
1066 ---Category: Private methods
1075 -- Class : Graphic3d_Structure
1077 -- Purpose : Declaration of variables specific to
1078 -- graphic structures.
1079 -- Reminder : A structure is defined in a manager.
1080 -- It is a sequence of groups of primitives.
1083 -- the associated C structure
1084 MyCStructure : CStructure from Graphic3d;
1086 -- the group identifier generator
1087 MyGroupGenId : GenId from Aspect;
1089 -- the structures to which the structure is attached
1090 MyAncestors : SequenceOfAddress from TColStd;
1092 -- the structures attached to the structure
1093 MyDescendants : SequenceOfAddress from TColStd;
1095 -- the sequence of groups
1096 MyGroups : SequenceOfGroup from Graphic3d;
1098 -- the graphic driver used
1099 MyGraphicDriver : GraphicDriver from Graphic3d;
1101 -- the highlight method of the structure
1102 MyHighlightColor : Color from Quantity;
1103 MyHighlightMethod : TypeOfHighlightMethod from Aspect;
1105 -- the manager accepting the structure
1106 MyPtrStructureManager : Address from Standard is protected;
1107 MyFirstPtrStructureManager : Address from Standard is protected;
1108 MyOwner : Address from Standard;
1110 -- the type of visualisation accepted by the structure
1111 MyVisual : TypeOfStructure from Graphic3d;
1112 MyComputeVisual : TypeOfStructure from Graphic3d is protected;
1116 -- a lot of methods of Group use the methods of Structure
1117 class Group from Graphic3d