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 SetPick ( me : mutable;
246 AValue : Boolean from Standard )
249 ---Purpose: Modifies the detectability indicator to Standard_True
250 -- or Standard_False for the structure <me>.
251 -- The default value at the definition of <me> is
253 ---Category: Methods to modify the class definition
255 SetPrimitivesAspect ( me : mutable;
256 CTX : AspectLine3d from Graphic3d )
259 ---Purpose: Modifies the default attributes for lines
260 -- in the structure <me>.
261 ---Category: Methods to modify the class definition
263 SetPrimitivesAspect ( me : mutable;
264 CTX : AspectFillArea3d from Graphic3d )
267 ---Purpose: Modifies the default attributes for faces
268 -- in the structure <me>.
269 ---Category: Methods to modify the class definition
271 SetPrimitivesAspect ( me : mutable;
272 CTX : AspectText3d from Graphic3d )
275 ---Purpose: Modifies the default attributes for text
276 -- in the structure <me>.
277 ---Category: Methods to modify the class definition
279 SetPrimitivesAspect ( me : mutable;
280 CTX : AspectMarker3d from Graphic3d )
283 ---Purpose: Modifies the default attributes for markers
284 -- in the structure <me>.
285 ---Category: Methods to modify the class definition
287 SetVisible ( me : mutable;
288 AValue : Boolean from Standard )
291 ---Purpose: Modifies the visibility indicator to Standard_True or
292 -- Standard_False for the structure <me>.
293 -- The default value at the definition of <me> is
295 ---Category: Methods to modify the class definition
297 SetManager ( me : mutable;
298 AManager : StructureManager from Graphic3d;
299 WithPropagation : Boolean from Standard = Standard_False)
302 ---Purpose: Moves the graphic object <me> in the manager <AManager>.
303 -- If <WithPropagation> is Standard_True then all the connected
304 -- graphic objects to <me> are moved.
306 SetVisual ( me : mutable;
307 AVisual : TypeOfStructure from Graphic3d )
310 ---Purpose: Modifies the visualisation mode for the structure <me>.
311 ---Warning: It is not possible to display a structure with
312 -- an incompatible display mode.
313 -- If the display mode is different from the current one,
314 -- the structure is erased.
316 -- TOS_WIREFRAME for a wireframe visualisation
317 -- TOS_SHADING for a shaded visualisation
318 -- TOS_ALL for all visualisations
319 -- TOS_COMPUTED for a computed visualisation
320 -- The default value is TOS_ALL
322 ---Category: Methods to modify the class definition
324 SetZoomLimit ( me : mutable;
325 LimitInf, LimitSup : Real from Standard )
327 ---Purpose: Modifies the minimum and maximum zoom coefficients
328 -- for the structure <me>.
329 -- The default value at the definition of <me> is unlimited.
330 -- Category: Methods to modify the class definition
331 -- Warning: Raises StructureDefinitionError if <LimitInf> is
332 -- greater than <LimitSup> or if <LimitInf> or
333 -- <LimitSup> is a negative value.
334 raises StructureDefinitionError from Graphic3d is static;
336 UnHighlight ( me : mutable )
339 ---Purpose: Suppresses the highlight for the structure <me>
340 -- in all the views of the visualiser.
341 ---Category: Methods to modify the class definition
343 ----------------------------
344 -- Category: Compute methods
345 ----------------------------
347 Compute ( me : mutable;
348 aProjector : DataStructureManager from Graphic3d )
349 returns Structure from Graphic3d is virtual;
351 ---Purpose: Returns the new Structure defined for the new visualization
352 ---Category: Methods to modify the class definition
354 Compute ( me : mutable;
355 aProjector : DataStructureManager from Graphic3d;
356 AMatrix : Array2OfReal from TColStd )
357 returns Structure from Graphic3d is virtual;
359 ---Purpose: Returns the new Structure defined for the new visualization
360 ---Category: Methods to modify the class definition
362 Compute ( me : mutable;
363 aProjector : DataStructureManager from Graphic3d;
364 aStructure : in out Structure from Graphic3d )
367 ---Purpose: Returns the new Structure defined for the new visualization
368 ---Category: Methods to modify the class definition
370 Compute ( me : mutable;
371 aProjector : DataStructureManager from Graphic3d;
372 AMatrix : Array2OfReal from TColStd;
373 aStructure : in out Structure from Graphic3d )
376 ---Purpose: Returns the new Structure defined for the new visualization
377 ---Category: Methods to modify the class definition
379 ReCompute ( me : mutable );
381 ---Purpose: Forces a new construction of the structure <me>
382 -- if <me> is displayed and TOS_COMPUTED.
383 ---Category: Methods to modify the class definition
385 ReCompute ( me : mutable;
386 aProjector : DataStructureManager from Graphic3d );
388 ---Purpose: Forces a new construction of the structure <me>
389 -- if <me> is displayed in <aProjetor> and TOS_COMPUTED.
390 ---Category: Methods to modify the class definition
392 ----------------------------
393 -- Category: Inquire methods
394 ----------------------------
397 returns Boolean from Standard
400 ---Purpose: Returns Standard_True if the structure <me> contains
401 -- Polygons, Triangles or Quadrangles.
402 ---Category: Inquire methods
405 ElementNumber : Integer from Standard;
406 AVertex : out VertexNC from Graphic3d;
407 AVector : out Vector from Graphic3d )
408 returns Boolean from Standard
411 ---Purpose: Explores a structure element of <me>.
412 -- Returns Standard_True if the exploration succeded and
413 -- Standard_False if the exploration is done or if the
414 -- specified structure element is not in the structure.
415 -- <AVertex> contains the coordinates, the normal and
416 -- the color of the vertex found in the structure element.
417 -- <AVector> contains the normal of the face.
418 -- Warning: - The structure element number is given by
419 -- Visual3d_ViewManager::Pick method.
420 -- - The primitive type is given by
421 -- Graphic3d_Structure::Type method.
422 -- - The normal is (0.0, 0.0, 0.0) when the normal is not
423 -- specified in the structure element.
424 -- - The color is (0.0, 0.0, 0.0) when the color is not
425 -- specified in the structure element.
426 -- - To initialize the exploration, you have to call the
427 -- Graphic3d_Structure::Type method before this method.
429 -- Programming example :
431 -- // Define a graphic device
432 -- Handle(Graphic3d_GraphicDevice) GD =
433 -- new Graphic3d_GraphicDevice ("dummy:0.0");
435 -- // Define a view manager
436 -- Handle(Visual3d_ViewManager) VM = new Visual3d_ViewManager (GD);
439 -- Handle(Visual3d_View) V = new Visual3d_View (VM);
441 -- // Define a window
442 -- Handle(Aspect_Window) W = new Aspect_Window
443 -- (GD, "Graphic View 1", 0.695, 0.695, 0.600, 0.600,
444 -- Xw_WQ_3DQUALITY, Quantity_NOC_MATRAGRAY);
446 -- // Define a context pick
447 -- Visual3d_ContextPick CTXP;
449 -- // Activate the view
453 -- // Create a structure
454 -- Handle(Graphic3d_Structure) S = new Graphic3d_Structure (V);
455 -- Handle(Graphic3d_Group) G = new Graphic3d_Group (S);
457 -- // Create a polygon
458 -- G->Polygon (PtsArray);
460 -- // Display the structure
464 -- Visual3d_PickDescriptor PDes (CTXP);
466 -- PDes = V->Pick (CTXP, W, x, y);
468 -- // Explore the top structure
469 -- Standard_Boolean Next = Standard_True;
470 -- Graphic3d_Vertex AVertex;
471 -- Graphic3d_Vector AVector;
472 -- if ((PDes.TopStructure ())->Type () == Graphic3d_TOP_POLYGON)
474 -- Next = S->Exploration (PDes.TopElementNumber (),
475 -- AVertex, AVector);
477 -- cout << "Point " << AVertex.X () << " , "
478 -- << AVertex.Y () << " , " << AVertex.Z () << "\n";
479 -- if (! AVector.LengthZero ())
480 -- cout << "Normal " << AVector.X () << " , "
481 -- << AVector.Y () << " , " << AVector.Z () << "\n";
486 ---Category: Inquire methods
488 FillArea3dAspect ( me )
489 returns AspectFillArea3d from Graphic3d
492 ---Purpose: Returns the values of the current default attributes.
493 ---Category: Inquire methods
496 returns SequenceOfGroup from Graphic3d
498 ---C++: return const &
500 ---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
501 ---Category: Inquire methods
503 NumberOfGroups ( me )
504 returns Integer from Standard
507 ---Purpose: Returns the current number of groups in the
509 ---Category: Inquire methods
511 HighlightColor ( me )
512 returns Color from Quantity
515 ---Purpose: Returns the highlight color for the Highlight method
516 -- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
517 ---Category: Inquire methods
520 returns Boolean from Standard
523 ---Purpose: Returns Standard_True if the structure <me> is deleted.
524 -- <me> is deleted after the call Remove (me).
525 ---Category: Inquire methods
528 returns Boolean from Standard
531 ---Purpose: Returns the display indicator for the structure <me>.
532 ---Category: Inquire methods
535 returns Boolean from Standard
538 ---Purpose: Returns Standard_True if the structure <me> is empty.
539 -- Warning: A structure is empty if :
540 -- it do not have group or all the groups are empties
541 -- and it do not have descendant or all the descendants
543 ---Category: Inquire methods
546 returns Boolean from Standard
549 ---Purpose: Returns Standard_True if the structure <me> is infinite.
550 ---Category: Inquire methods
553 returns Boolean from Standard
556 ---Purpose: Returns the highlight indicator for the structure <me>.
557 ---Category: Inquire methods
560 returns Boolean from Standard
563 ---Purpose: Returns the detectability indicator for the structure <me>.
564 ---Category: Inquire methods
567 returns Boolean from Standard
570 ---Purpose: Returns Standard_True if the structure <me> is rotated.
571 -- <=> The transformation != Identity, != Scale, != Translation.
572 ---Category: Inquire methods
575 returns Boolean from Standard
578 ---Purpose: Returns Standard_True if the structure <me> is transformed.
579 -- <=> The transformation != Identity.
580 ---Category: Inquire methods
583 returns Boolean from Standard
586 ---Purpose: Returns the visibility indicator for the structure <me>.
587 ---Category: Inquire methods
590 returns AspectLine3d from Graphic3d
593 ---Purpose: Returns the values of the current default attributes.
594 ---Category: Inquire methods
596 Marker3dAspect ( me )
597 returns AspectMarker3d from Graphic3d
599 ---Purpose: Returns the current group of graphic attributes used
600 -- for 3d marker primitives.
603 XMin, YMin, ZMin : out Real from Standard;
604 XMax, YMax, ZMax : out Real from Standard )
607 ---Purpose: Returns the coordinates of the boundary box
608 -- of the structure <me>.
609 -- Warning: If the structure <me> is empty or infinite then :
610 -- XMin = YMin = ZMin = RealFirst ().
611 -- XMax = YMax = ZMax = RealLast ().
612 ---Category: Inquire methods
614 PrimitivesAspect ( me;
615 CTXL : out AspectLine3d from Graphic3d;
616 CTXT : out AspectText3d from Graphic3d;
617 CTXM : out AspectMarker3d from Graphic3d;
618 CTXF : out AspectFillArea3d from Graphic3d )
621 ---Purpose: Returns the current values of the default attributes.
622 ---Category: Inquire methods
625 returns AspectText3d from Graphic3d
628 ---Purpose: Returns the values of the current default attributes.
629 ---Category: Inquire methods
632 ElementNumber : Integer from Standard )
633 returns TypeOfPrimitive from Graphic3d
636 ---Purpose: Returns the primitive type stored in the structure
637 -- element <ElementNumber>.
638 -- Initialises the exploration of this primitive.
639 -- If the structure element is not a primitive, returns
640 -- Graphic3d_TOP_UNDEFINED.
641 -- Warning: The structure element number is given by
642 -- Visual3d_ViewManager::Pick method.
643 ---Category: Inquire methods
646 returns TypeOfStructure from Graphic3d
649 ---Purpose: Returns the visualisation mode for the structure <me>.
650 ---Category: Inquire methods
652 ----------------------------------------------------
653 -- Category: Methods to manage the structure network
654 ----------------------------------------------------
656 -----------------------------------------------------
657 -- Summary of Structure Hierarchies --
659 -- The root is the top of a structure hierarchy --
660 -- or structure network. --
662 -- The attributes of a parent structure are passed --
663 -- passed to its descendants. --
665 -- The attributes of the descendant structures --
666 -- don't affect the parent. --
668 -- Recursive structure networks are not supported. --
669 -----------------------------------------------------
671 AcceptConnection ( myclass;
672 AStructure1 : Structure from Graphic3d;
673 AStructure2 : Structure from Graphic3d;
674 AType : TypeOfConnection from Graphic3d )
675 returns Boolean from Standard;
677 ---Purpose: Returns Standard_True if the connection is possible between
678 -- <AStructure1> and <AStructure2> without a creation
681 -- It's not possible to call the method
682 -- AStructure1->Connect (AStructure2, TypeOfConnection)
684 -- - the set of all ancestors of <AStructure1> contains
685 -- <AStructure1> and if the
686 -- TypeOfConnection == TOC_DESCENDANT
687 -- - the set of all descendants of <AStructure1> contains
688 -- <AStructure2> and if the
689 -- TypeOfConnection == TOC_ANCESTOR
690 ---Category: Methods to manage the structure network
692 Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
695 ---Purpose: Returns the group of structures to which <me> is connected.
696 ---Category: Methods to manage the structure network
698 Connect ( me : mutable;
699 AStructure : Structure from Graphic3d;
700 AType : TypeOfConnection from Graphic3d;
701 WithCheck : Boolean from Standard = Standard_False );
703 ---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
704 -- as a child structure of <me>.
705 -- If Atype is TOC_ANCESTOR then add <AStructure>
706 -- as a parent structure of <me>.
707 -- The connection propagates Display, Highlight, Erase,
708 -- Remove, and stacks the transformations.
709 -- No connection if the graph of the structures
710 -- contains a cycle and <WithCheck> is Standard_True;
711 ---Category: Methods to manage the structure network
713 Descendants ( me; SG : in out MapOfStructure from Graphic3d )
716 ---Purpose: Returns the group of structures connected to <me>.
717 ---Category: Methods to manage the structure network
719 Disconnect ( me : mutable;
720 AStructure : Structure from Graphic3d )
723 ---Purpose: Suppress the connection between <AStructure> and <me>.
724 ---Category: Methods to manage the structure network
726 DisconnectAll ( me : mutable;
727 AType : TypeOfConnection from Graphic3d )
730 ---Purpose: If Atype is TOC_DESCENDANT then suppress all
731 -- the connections with the child structures of <me>.
732 -- If Atype is TOC_ANCESTOR then suppress all
733 -- the connections with the parent structures of <me>.
734 ---Category: Methods to manage the structure network
737 AStructure : Structure from Graphic3d;
738 AType : TypeOfConnection from Graphic3d;
739 ASet : in out MapOfStructure from Graphic3d );
741 ---Purpose: Returns <ASet> the group of structures :
742 -- - directly or indirectly connected to <AStructure> if the
743 -- TypeOfConnection == TOC_DESCENDANT
744 -- - to which <AStructure> is directly or indirectly connected
745 -- if the TypeOfConnection == TOC_ANCESTOR
746 ---Category: Methods to manage the structure network
748 SetOwner ( me : mutable;
749 Owner : Address from Standard )
754 returns Address from Standard
758 SetHLRValidation ( me : mutable;
759 AFlag : Boolean from Standard )
764 returns Boolean from Standard
768 -----------------------------------------------------------
769 -- Category: Methods to manage the structure transformation
770 -----------------------------------------------------------
773 returns TypeOfComposition from Graphic3d
776 ---Purpose: Returns the type of composition applied to matrices
777 -- of transformation of <me>.
778 ---Category: Methods to manage the structure transformation
780 SetTransform ( me : mutable;
781 AMatrix : Array2OfReal from TColStd;
782 AType : TypeOfComposition from Graphic3d )
784 ---Purpose: Modifies the current local modelling transformation
785 -- in the structure <me>.
787 -- It is defined as a 4*4 real matrix.
789 -- -------------------
790 -- | a11 a12 a13 t1 |
791 -- | a21 a22 a23 t2 |
792 -- | a31 a32 a33 t3 |
794 -- -------------------
796 -- TypeOfComposition : TOC_REPLACE
797 -- TOC_POSTCONCATENATE
799 -- Then the modified Local Modelling Transformation is composed
800 -- with the current Global Modelling Transformation to create a
801 -- new Composite Modelling Transformation.
803 -- The compose type specifies the role of the current local
804 -- modelling transformation (L) in composing the new value for
805 -- the current local modelling transformation (L'), which is
806 -- then combined with the current global modelling transforma-
807 -- tion (G) to calculate the new composite modelling transfor-
811 -- The transformation matrix (T) replaces the value of
812 -- current local modelling transformation (L).
817 -- TOC_POSTCONCATENATE
818 -- The current local modelling transformation (L) is multiplied
819 -- by the transformation matrix (T):
824 -- Category: Methods to manage the structure transformation
825 -- Warning: Raises TransformError if the matrix is not a 4x4 matrix.
826 raises TransformError from Graphic3d is static;
828 -- Transform ( me : mutable;
830 AMatrix : in out Array2OfReal from TColStd )
833 ---Purpose: Returns the transformation associated with
834 -- the structure <me>.
835 ---Category: Methods to manage the structure transformation
837 SetTransformPersistence( me : mutable;
838 AFlag : TransModeFlags from Graphic3d;
839 APoint : Pnt from gp )
841 ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
844 SetTransformPersistence( me : mutable;
845 AFlag : TransModeFlags from Graphic3d )
846 -- Calls previous method with point (0,0,0)
850 TransformPersistenceMode( me )
851 returns TransModeFlags from Graphic3d
853 ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
856 TransformPersistencePoint( me )
859 ---Purpose: Get the current point of relative modelling transform persistence
862 ----------------------------
863 -- Category: Private methods
864 ----------------------------
867 AGroup : Group from Graphic3d )
870 ---Purpose: Inserts in the structure <me>, the group <G>.
871 -- It will be erased at the next screen update.
872 ---Category: Private methods
875 returns TypeOfStructure from Graphic3d
878 ---Category: Private methods
880 GroupsWithFacet ( me : mutable;
881 ADelta : Integer from Standard )
884 ---Purpose: Manages the number of groups in the structure <me>
885 -- which contains facet.
886 -- Polygons, Triangles or Quadrangles.
887 -- <ADelta> = +1 or -1
888 ---Category: Private methods
893 ---Purpose: Prints informations about the structure <me>.
894 ---Category: Private methods
896 GraphicClear ( me : mutable;
897 WithDestruction : Boolean from Standard )
900 ---Purpose: Clears the structure <me>.
901 ---Category: Private methods
903 GraphicConnect ( me : mutable;
904 ADaughter : Structure from Graphic3d )
908 ---Category: Private methods
910 GraphicDisconnect ( me : mutable;
911 ADaughter : Structure from Graphic3d )
915 ---Category: Private methods
917 GraphicHighlight ( me : mutable;
918 Method : TypeOfHighlightMethod from Aspect )
921 ---Purpose: Highlights the structure <me>.
922 ---Category: Private methods
924 GraphicTransform ( me : mutable;
925 AMatrix : Array2OfReal from TColStd )
929 ---Category: Private methods
931 GraphicUnHighlight ( me : mutable )
934 ---Purpose: Suppress the highlight for the structure <me>.
935 ---Category: Private methods
937 GroupLabels ( me : mutable;
938 LB, LE : in out Integer from Standard )
941 ---Purpose: Returns the labels for a new group in the structure <me>.
942 ---Category: Private methods
944 Identification ( me )
945 returns Integer from Standard
948 ---Purpose: Returns the identification number of the structure <me>.
949 ---Category: Private methods
952 XMin, YMin, ZMin : out Real from Standard;
953 XMax, YMax, ZMax : out Real from Standard )
956 ---Purpose: Returns the extreme coordinates found in the
958 -- Warning: If the structure <me> is empty or infinite then :
959 -- XMin = YMin = ZMin = RealFirst ().
960 -- XMax = YMax = ZMax = RealLast ().
961 ---Category: Private methods
964 aPlotter : Plotter from Graphic3d )
967 ---Category: Private methods
969 PrintNetwork ( myclass;
970 AStructure : Structure from Graphic3d;
971 AType : TypeOfConnection from Graphic3d );
973 ---Purpose: Prints informations about the network associated
974 -- with the structure <AStructure>.
975 ---Category: Private methods
977 Remove ( me : mutable;
978 APtr : Address from Standard;
979 AType : TypeOfConnection from Graphic3d )
982 ---Purpose: Suppress the adress <APtr> in the list
983 -- of descendants or in the list of ancestors.
984 ---Category: Private methods
986 Remove ( me : mutable;
987 AGroup : Group from Graphic3d )
990 ---Purpose: Suppress in the structure <me>, the group <AGroup>.
991 -- It will be erased at the next screen update.
992 ---Category: Private methods
994 SetComputeVisual ( me : mutable;
995 AVisual : TypeOfStructure from Graphic3d )
998 ---Category: Private methods
1000 StructureManager ( me )
1001 returns StructureManager from Graphic3d
1004 ---Purpose: Returns the manager to which <me> is associated.
1005 ---Category: Private methods
1007 Transforms ( myclass;
1008 ATrsf : Array2OfReal from TColStd;
1009 X, Y, Z : Real from Standard;
1010 NewX, NewY, NewZ : out Real from Standard );
1012 ---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
1013 ---Category: Private methods
1015 Transforms ( myclass;
1016 ATrsf : Array2OfReal from TColStd;
1017 Coord : Vector from Graphic3d )
1018 returns Vector from Graphic3d;
1020 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
1021 ---Category: Private methods
1023 Transforms ( myclass;
1024 ATrsf : Array2OfReal from TColStd;
1025 Coord : Vertex from Graphic3d )
1026 returns Vertex from Graphic3d;
1028 ---Purpose: Transforms <Coord> with the transformation <ATrsf>.
1029 ---Category: Private methods
1034 ---Purpose: Calls the Update method of the StructureManager which
1035 -- contains the Structure <me>.
1036 ---Category: Private methods
1038 UpdateStructure ( me : mutable;
1039 CTXL : AspectLine3d from Graphic3d;
1040 CTXT : AspectText3d from Graphic3d;
1041 CTXM : AspectMarker3d from Graphic3d;
1042 CTXF : AspectFillArea3d from Graphic3d )
1045 ---Purpose: Updates the c structure associated to <me>.
1046 ---Category: Private methods
1049 returns Address from Standard
1052 ---Purpose: Returns the c structure associated to <me>.
1053 ---Category: Private methods
1062 -- Class : Graphic3d_Structure
1064 -- Purpose : Declaration of variables specific to
1065 -- graphic structures.
1066 -- Reminder : A structure is defined in a manager.
1067 -- It is a sequence of groups of primitives.
1070 -- the associated C structure
1071 MyCStructure : CStructure from Graphic3d;
1073 -- the group identifier generator
1074 MyGroupGenId : GenId from Aspect;
1076 -- the structures to which the structure is attached
1077 MyAncestors : SequenceOfAddress from TColStd;
1079 -- the structures attached to the structure
1080 MyDescendants : SequenceOfAddress from TColStd;
1082 -- the sequence of groups
1083 MyGroups : SequenceOfGroup from Graphic3d;
1085 -- the graphic driver used
1086 MyGraphicDriver : GraphicDriver from Graphic3d;
1088 -- the highlight method of the structure
1089 MyHighlightColor : Color from Quantity;
1090 MyHighlightMethod : TypeOfHighlightMethod from Aspect;
1092 -- the manager accepting the structure
1093 MyPtrStructureManager : Address from Standard is protected;
1094 MyFirstPtrStructureManager : Address from Standard is protected;
1095 MyOwner : Address from Standard;
1097 -- the type of visualisation accepted by the structure
1098 MyVisual : TypeOfStructure from Graphic3d;
1099 MyComputeVisual : TypeOfStructure from Graphic3d is protected;
1103 -- a lot of methods of Group use the methods of Structure
1104 class Group from Graphic3d