2 -- File: Graphic3d_Group.cdl
3 -- Created: Vendredi 6 Septembre 1991
5 -- 27/09/97 ; PCT : add manual control of textures
6 -- 11/97 ; CAL : ajout polyline par 2 points
7 -- 16/06/2000 : ATS: Study G005 - Group store presentations of it's objects in field
8 -- MyListOfPArray to avoid deletion of handle-manipulating
11 ---Copyright: MatraDatavision 1991,1992,1993,1994
13 class Group from Graphic3d inherits TShared
17 ---Purpose: This class allows the definition of groups
18 -- of primitives inside of graphic objects (presentations).
19 -- A group contains the primitives and attributes
20 -- for which the range is limited to this group.
21 -- The primitives of a group can be globally suppressed.
23 -- There are two main group usage models:
25 -- 1) Non-modifiable, or unbounded, group ('black box').
26 -- Developers can repeat a sequence of
27 -- SetPrimitivesAspect() with AddPrimitiveArray() methods arbitrary number of times
28 -- to define arbitrary number of primitive "blocks" each having individual apect values.
29 -- Any modification of such a group is forbidden, as aspects and primitives are mixed
30 -- in memory without any high-level logical structure, and any modification is very likely to result
31 -- in corruption of the group internal data.
32 -- It is necessary to recreate such a group as a whole when some attribute should be changed.
33 -- (for example, in terms of AIS it is necessary to re-Compute() the whole presentation each time).
34 -- 2) Bounded group. Developers should specify the necessary group aspects with help of
35 -- SetGroupPrimitivesAspect() and then add primitives to the group.
36 -- Such a group have simplified organization in memory (a single block of attributes
37 -- followed by a block of primitives) and therefore it can be modified, if it is necessary to
38 -- change parameters of some aspect that has already been set, using methods:
39 -- IsGroupPrimitivesAspectSet() to detect which aspect was set for primitives;
40 -- GroupPrimitivesAspect() to read current aspect values
41 -- and SetGroupPrimitivesAspect() to set new values.
43 -- Developers are strongly recommended to take all the above into account when filling Graphic3d_Group
44 -- with aspects and primitives and choose the group usage model beforehand out of application needs.
51 Array1OfInteger from TColStd,
52 Array1OfReal from TColStd,
53 HArray1OfByte from TColStd,
55 ExtendedString from TCollection,
57 PlaneAngle from Quantity,
59 Array1OfEdge from Aspect,
62 GroupAspect from Graphic3d,
63 AspectLine3d from Graphic3d,
64 AspectMarker3d from Graphic3d,
65 AspectText3d from Graphic3d,
66 AspectFillArea3d from Graphic3d,
67 HorizontalTextAlignment from Graphic3d,
68 CBitFields4 from Graphic3d,
69 CGroup from Graphic3d,
70 GraphicDriver from Graphic3d,
71 Structure from Graphic3d,
72 TextPath from Graphic3d,
73 TypeOfPolygon from Graphic3d,
74 Vector from Graphic3d,
75 Array1OfVertex from Graphic3d,
76 Array2OfVertex from Graphic3d,
77 Vertex from Graphic3d,
78 Array1OfVertexC from Graphic3d,
79 Array2OfVertexC from Graphic3d,
80 VertexC from Graphic3d,
81 Array1OfVertexN from Graphic3d,
82 Array2OfVertexN from Graphic3d,
83 VertexN from Graphic3d,
84 Array1OfVertexNC from Graphic3d,
85 Array2OfVertexNC from Graphic3d,
86 VertexNC from Graphic3d,
87 VerticalTextAlignment from Graphic3d,
88 VertexNT from Graphic3d,
89 Array1OfVertexNT from Graphic3d,
90 Array2OfVertexNT from Graphic3d,
91 ArrayOfPrimitives from Graphic3d,
92 ListOfPArray from Graphic3d,
93 ListIteratorOfListOfPArray from Graphic3d,
94 TransModeFlags from Graphic3d,
95 CBounds from Graphic3d
99 GroupDefinitionError from Graphic3d,
100 PickIdDefinitionError from Graphic3d,
101 OutOfRange from Standard
104 Create ( AStructure : Structure from Graphic3d )
105 returns mutable Group from Graphic3d;
107 ---Purpose: Creates a group in the structure <AStructure>.
109 ---------------------------------------------------
110 -- Category: Methods to modify the class definition
111 ---------------------------------------------------
113 Clear ( me : mutable;
114 theUpdateStructureMgr : Boolean from Standard = Standard_True )
117 ---Purpose: Supress all primitives and attributes of <me>.
118 -- To clear group without update in Graphic3d_StructureManager
119 -- pass Standard_False as <theUpdateStructureMgr>. This
120 -- used on context and viewer destruction, when the pointer
121 -- to structure manager in Graphic3d_Structure could be
122 -- already released (pointers are used here to avoid handle
124 ---Category: Methods to modify the class definition
126 Destroy ( me : mutable )
129 ---Purpose: Supress the group <me> in the structure.
130 ---Category: Methods to modify the class definition
133 Remove ( me : mutable )
136 ---Purpose: Supress the group <me> in the structure.
137 -- Warning: No more graphic operations in <me> after this call.
138 ---Category: Methods to modify the class definition
140 --SetTransformPersistence( me : mutable;
141 -- AFlag : TransModeFlags from Graphic3d )
143 ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
146 --TransformPersistence( me )
147 -- returns TransModeFlags from Graphic3d
149 ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
152 SetGroupPrimitivesAspect ( me : mutable )
155 ---Purpose: Removes the context for all the line primitives
157 ---Category: Methods to modify the class definition
159 SetGroupPrimitivesAspect ( me : mutable;
160 CTX : AspectLine3d from Graphic3d )
163 ---Purpose: Modifies the context for all the line primitives
165 ---Category: Methods to modify the class definition
167 SetGroupPrimitivesAspect ( me : mutable;
168 CTX : AspectFillArea3d from Graphic3d )
171 ---Purpose: Modifies the context for all the face primitives
173 ---Category: Methods to modify the class definition
175 SetGroupPrimitivesAspect ( me : mutable;
176 CTX : AspectText3d from Graphic3d )
179 ---Purpose: Modifies the context for all the text primitives
181 ---Category: Methods to modify the class definition
183 SetGroupPrimitivesAspect ( me : mutable;
184 CTX : AspectMarker3d from Graphic3d )
187 ---Purpose: Modifies the context for all the marker primitives
189 ---Category: Methods to modify the class definition
191 SetPrimitivesAspect ( me : mutable;
192 CTX : AspectLine3d from Graphic3d )
195 ---Purpose: Modifies the current context of the group to give
196 -- another aspect for all the line primitives created
197 -- after this call in the group.
198 ---Category: Methods to modify the class definition
200 SetPrimitivesAspect ( me : mutable;
201 CTX : AspectFillArea3d from Graphic3d )
204 ---Purpose: Modifies the current context of the group to give
205 -- another aspect for all the face primitives created
206 -- after this call in the group.
207 ---Category: Methods to modify the class definition
209 SetPrimitivesAspect ( me : mutable;
210 CTX : AspectText3d from Graphic3d )
213 ---Purpose: Modifies the current context of the group to give
214 -- another aspect for all the text primitives created
215 -- after this call in the group.
216 ---Category: Methods to modify the class definition
218 SetPrimitivesAspect ( me : mutable;
219 CTX : AspectMarker3d from Graphic3d )
222 ---Purpose: Modifies the current context of the group to give
223 -- another aspect for all the marker primitives created
224 -- after this call in the group.
225 ---Category: Methods to modify the class definition
227 SetMinMaxValues ( me : mutable;
228 XMin, YMin, ZMin : Real from Standard;
229 XMax, YMax, ZMax : Real from Standard )
232 ---Purpose: Sets the coordinates of the boundary box of the
234 ---Category: Methods to modify the class definition
236 -------------------------------------
237 -- Category: Methods to create Marker
238 -------------------------------------
240 ---------------------------------------------
241 -- Summary of Markers --
243 -- They should have one or more vertices. --
245 -- They have the following attributes. --
248 -- Marker Scale Factor. --
251 -- The size, shape and orientation of a --
252 -- marker is not subject to transformation --
253 ---------------------------------------------
255 Marker ( me : mutable;
256 APoint : Vertex from Graphic3d;
257 EvalMinMax : Boolean from Standard = Standard_True )
260 ---Purpose: Creates a marker in position <APoint> which will be drawn
261 -- with the current attribute (AspectMarker).
262 ---Category: Methods to create Marker
264 MarkerSet ( me : mutable;
265 ListVertex : Array1OfVertex from Graphic3d;
266 EvalMinMax : Boolean from Standard = Standard_True )
268 ---Purpose: Creates a group of markers defined by a table of
270 ---Category: Methods to create Marker
272 --------------------------------------
273 -- Category: Methods to create Polygon
274 --------------------------------------
276 --------------------------------------------------
277 -- Summary of Polygons --
279 -- They are limited to one boundary. --
281 -- The boundary should be closed. --
283 -- They should have at least three vertices. --
285 -- They should be planar. --
287 -- They should have a normal. --
289 -- The boundary is drawn only when the interior --
290 -- style is hollow. --
292 -- The boundary have the following attributes : --
295 -- Line Width Scale Factor. --
298 -- They have only interior attributes : --
300 -- Interior Style. --
301 -- Interior Color. --
302 -- Front Material. --
304 --------------------------------------------------
306 Polygon ( me : mutable;
307 ListVertex : Array1OfVertex from Graphic3d;
308 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
309 EvalMinMax : Boolean from Standard = Standard_True )
312 ---Purpose: Links up points to create a face drawn
313 -- using the current fill attributes (AspectFillArea3d))
314 -- The first and last points are not duplicates.
315 ---Category: Methods to create Polygon
317 Polygon ( me : mutable;
318 ListVertex : Array1OfVertex from Graphic3d;
319 Normal : Vector from Graphic3d;
320 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
321 EvalMinMax : Boolean from Standard = Standard_True )
324 ---Purpose: Links up points to create a face drawn
325 -- using the current fill attributes (AspectFillArea3d))
326 -- The first and last points are not duplicates.
327 -- The normal to the polygon is defined normalised.
328 ---Category: Methods to create Polygon
330 Polygon ( me : mutable;
331 ListVertex : Array1OfVertexN from Graphic3d;
332 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
333 EvalMinMax : Boolean from Standard = Standard_True )
336 ---Purpose: Links up points to create a face drawn
337 -- using the current fill attributes (AspectFillArea3d))
338 -- The first and last points are not duplicates.
339 -- The normal is defined and normalised for each vertex.
340 ---Category: Methods to create Polygon
342 Polygon ( me : mutable;
343 ListVertex : Array1OfVertexN from Graphic3d;
344 Normal : Vector from Graphic3d;
345 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
346 EvalMinMax : Boolean from Standard = Standard_True )
349 ---Purpose: Links up points to create a face drawn
350 -- using the current fill attributes (AspectFillArea3d))
351 -- The first and last points are not duplicates.
352 -- The normal is defined for each vertex.
353 -- The normal to the polygon is defined normalised.
354 ---Category: Methods to create Polygon
357 Polygon ( me : mutable;
358 ListVertex : Array1OfVertexNT from Graphic3d;
359 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
360 EvalMinMax : Boolean from Standard = Standard_True )
363 ---Purpose: Links up points to create a face drawn
364 -- using the current fill attributes (AspectFillArea3d))
365 -- The first and last points are not duplicated.
366 -- The normal is defined and normalised for each vertex.
367 -- The texture coordinate is defined for each vertex.
368 ---Category: Methods to create Polygon
372 --------------------------------------------------
373 -- Summary of Polygons with holes --
375 -- They may have multiple boundaries. --
377 -- Each boundary should be closed. --
379 -- Each boundary should have at least three --
382 -- They should be planar. --
384 -- They should have a normal. --
386 -- The boundary is drawn only when the interior --
387 -- style is hollow. --
389 -- The boundary have the following attributes : --
392 -- Line Width Scale Factor. --
395 -- They have only interior attributes : --
397 -- Interior Style. --
398 -- Interior Color. --
399 -- Front Material. --
401 --------------------------------------------------
403 Polygon ( me : mutable;
404 Bounds : Array1OfInteger from TColStd;
405 ListVertex : Array1OfVertex from Graphic3d;
406 EvalMinMax : Boolean from Standard = Standard_True )
409 ---Purpose: Creates a face with holes.
410 -- The face is described by the total number
411 -- of vertices on the external contour and around the holes,
412 -- and by the list of vertices.
413 -- The face will be drawn
414 -- using the current fill attributes (AspectFillArea3d))
415 -- The first and last points are not duplicates.
416 -- Bounds : total number of interior and exterior vertices
417 -- ListVertex : a list of the interior and exterior vertices
418 ---Category: Methods to create Polygon
420 Polygon ( me : mutable;
421 Bounds : Array1OfInteger from TColStd;
422 ListVertex : Array1OfVertex from Graphic3d;
423 Normal : Vector from Graphic3d;
424 EvalMinMax : Boolean from Standard = Standard_True )
427 ---Purpose: Creates a face with holes.
428 -- The face is described by the total number
429 -- of vertices on the external contour and around the holes,
430 -- and by the list of vertices.
431 -- The face will be drawn
432 -- using the current fill attributes (AspectFillArea3d))
433 -- The first and last points are not duplicates.
434 -- The normal to the polygon is normalised.
435 -- Bounds : total number of interior and exterior vertices
436 -- ListVertex : a list of the interior and exterior vertices
437 ---Category: Methods to create Polygon
439 Polygon ( me : mutable;
440 Bounds : Array1OfInteger from TColStd;
441 ListVertex : Array1OfVertexN from Graphic3d;
442 EvalMinMax : Boolean from Standard = Standard_True )
445 ---Purpose: Creates a face with holes.
446 -- The face is described by the total number
447 -- of vertices on the external contour and around the holes,
448 -- and by the list of vertices.
449 -- The face will be drawn
450 -- using the current fill attributes (AspectFillArea3d))
451 -- The first and last points are not duplicates.
452 -- Bounds : total number of interior and exterior vertices
453 -- ListVertex : a list of the interior and exterior vertices
454 ---Category: Methods to create Polygon
456 Polygon ( me : mutable;
457 Bounds : Array1OfInteger from TColStd;
458 ListVertex : Array1OfVertexN from Graphic3d;
459 Normal : Vector from Graphic3d;
460 EvalMinMax : Boolean from Standard = Standard_True )
463 ---Purpose: Creates a face with holes.
464 -- The face is described by the total number
465 -- of vertices on the external contour and around the holes,
466 -- and by the list of vertices.
467 -- The face will be drawn
468 -- using the current fill attributes (AspectFillArea3d))
469 -- The first and last points are not duplicates.
470 -- The normal to the polygon is normalised.
471 -- Bounds : total number of interior and exterior vertices
472 -- ListVertex : a list of the interior and exterior vertices
473 ---Category: Methods to create Polygon
475 PolygonSet ( me : mutable;
476 Bounds : Array1OfInteger from TColStd;
477 ListVertex : Array1OfVertex from Graphic3d;
478 AType : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
479 EvalMinMax : Boolean from Standard = Standard_True )
482 ---Purpose: Links up points to create a set of face drawn
483 -- using the current fill attributes (AspectFillArea3d))
484 -- The first and last points are not duplicates.
485 ---Category: Methods to create Polygon
487 ---------------------------------------
488 -- Category: Methods to create Polyline
489 ---------------------------------------
491 --------------------------------------------
492 -- Summary of Polylines --
494 -- They should have two or more vertices. --
496 -- They have the following attributes. --
499 -- Line Width Scale Factor. --
501 --------------------------------------------
503 Polyline ( me : mutable;
504 APT1 : Vertex from Graphic3d;
505 APT2 : Vertex from Graphic3d;
506 EvalMinMax : Boolean from Standard = Standard_True )
509 ---Purpose: Links up points to create a line drawn
510 -- using the current line attributes (AspectLine)
511 ---Category: Methods to create Polyline
513 Polyline ( me : mutable;
514 ListVertex : Array1OfVertex from Graphic3d;
515 EvalMinMax : Boolean from Standard = Standard_True )
518 ---Purpose: Links up points to create a line drawn
519 -- using the current line attributes (AspectLine)
520 ---Category: Methods to create Polyline
522 Polyline ( me : mutable;
523 ListVertex : Array1OfVertexC from Graphic3d;
524 EvalMinMax : Boolean from Standard = Standard_True )
527 ---Purpose: Links up points to create a line drawn
528 -- using the current line attributes (AspectLine)
529 -- except for the colour which is defined
531 ---Category: Methods to create Polyline
533 -----------------------------------------
534 -- Category: Methods to create Quadrangle
535 -----------------------------------------
537 QuadrangleMesh ( me : mutable;
538 ListVertex : Array2OfVertex from Graphic3d;
539 EvalMinMax : Boolean from Standard = Standard_True )
541 ---Purpose: Creates a group of quadrilaterals from a list of
542 -- points, such that their vertices are:
543 -- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
544 -- The quadrilaterals will be drawn according to the
545 -- current attributes (AspectFillArea3d).
546 -- Category: Methods to create Quadrangle
547 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
548 -- less than four points.
549 raises GroupDefinitionError from Graphic3d is static;
551 QuadrangleMesh ( me : mutable;
552 ListVertex : Array2OfVertexN from Graphic3d;
553 EvalMinMax : Boolean from Standard = Standard_True )
555 ---Purpose: Creates a group of quadrilaterals from a list of
556 -- points, such that their vertices are:
557 -- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
558 -- The quadrilaterals will be drawn according to the
559 -- current attributes (AspectFillArea3d).
560 -- For each vertex the normal is given.
561 -- Category: Methods to create Quadrangle
562 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
563 -- less than four points.
564 raises GroupDefinitionError from Graphic3d is static;
566 QuadrangleMesh ( me : mutable;
567 ListVertex : Array2OfVertexNT from Graphic3d;
568 EvalMinMax : Boolean from Standard = Standard_True )
570 ---Purpose: Creates a group of quadrilaterals from a list of
571 -- points, such that their vertices are:
572 -- Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
573 -- The quadrilaterals will be drawn according to the
574 -- current attributes (AspectFillArea3d).
575 -- For each vertex the normal is given.
576 -- For each vertex a texture coordinate is given.
577 -- Category: Methods to create Quadrangle
578 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
579 -- less than four points.
580 raises GroupDefinitionError from Graphic3d is static;
582 -----------------------------------
583 -- Category: Methods to create Text
584 -----------------------------------
586 --------------------------------------------
587 -- Summary of Texts --
589 -- Text has geometric and nongeometric --
592 -- The geometric text attributes are : --
594 -- Character Height. --
595 -- Character Up Vector. --
597 -- Text Alignment Horizontal. --
598 -- Text Alignment Vertical. --
600 -- The nongeometric text attributes are : --
603 -- Character Spacing. --
604 -- Character Expansion Factor. --
606 --------------------------------------------
609 AText : CString from Standard;
610 APoint : Vertex from Graphic3d;
611 AHeight : Real from Standard;
612 AAngle : PlaneAngle from Quantity;
613 ATp : TextPath from Graphic3d;
614 AHta : HorizontalTextAlignment from Graphic3d;
615 AVta : VerticalTextAlignment from Graphic3d;
616 EvalMinMax : Boolean from Standard = Standard_True )
619 ---Purpose: Creates the string <AText> at position <APoint>.
620 -- The 3D point of attachment is projected. The text is
621 -- written in the plane of projection.
622 -- The attributes are given with respect to the plane of
624 -- AHeight : Height of text.
625 -- (Relative to the Normalized Projection
626 -- Coordinates (NPC) Space).
627 -- AAngle : Orientation of the text
628 -- (with respect to the horizontal).
629 ---Category: Methods to create Text
632 AText : CString from Standard;
633 APoint : Vertex from Graphic3d;
634 AHeight : Real from Standard;
635 EvalMinMax : Boolean from Standard = Standard_True )
638 ---Purpose: Creates the string <AText> at position <APoint>.
639 -- The 3D point of attachment is projected. The text is
640 -- written in the plane of projection.
641 -- The attributes are given with respect to the plane of
643 -- AHeight : Height of text.
644 -- (Relative to the Normalized Projection
645 -- Coordinates (NPC) Space).
646 -- The other attributes have the following default values:
651 ---Category: Methods to create Text
654 AText : ExtendedString from TCollection;
655 APoint : Vertex from Graphic3d;
656 AHeight : Real from Standard;
657 AAngle : PlaneAngle from Quantity;
658 ATp : TextPath from Graphic3d;
659 AHta : HorizontalTextAlignment from Graphic3d;
660 AVta : VerticalTextAlignment from Graphic3d;
661 EvalMinMax : Boolean from Standard = Standard_True )
664 ---Purpose: Creates the string <AText> at position <APoint>.
665 -- The 3D point of attachment is projected. The text is
666 -- written in the plane of projection.
667 -- The attributes are given with respect to the plane of
669 -- AHeight : Height of text.
670 -- (Relative to the Normalized Projection
671 -- Coordinates (NPC) Space).
672 -- AAngle : Orientation of the text
673 -- (with respect to the horizontal).
674 ---Category: Methods to create Text
677 AText : ExtendedString from TCollection;
678 APoint : Vertex from Graphic3d;
679 AHeight : Real from Standard;
680 EvalMinMax : Boolean from Standard = Standard_True )
683 ---Purpose: Creates the string <AText> at position <APoint>.
684 -- The 3D point of attachment is projected. The text is
685 -- written in the plane of projection.
686 -- The attributes are given with respect to the plane of
688 -- AHeight : Height of text.
689 -- (Relative to the Normalized Projection
690 -- Coordinates (NPC) Space).
691 -- The other attributes have the following default values:
696 ---Category: Methods to create Text
698 ---------------------------------------
699 ---Category: Methods to create Triangle
700 ---------------------------------------
702 TriangleMesh ( me : mutable;
703 ListVertex : Array1OfVertex from Graphic3d;
704 EvalMinMax : Boolean from Standard = Standard_True )
706 ---Purpose: Creates triangles from an array of points such that
707 -- the Kth triangle contains the vertices K, K+1, K+2.
708 -- The triangle will be drawn using the current fill
709 -- attributes (AspectFillArea3d)
710 -- Category: Methods to create Triangle
711 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
712 -- less than three points.
713 raises GroupDefinitionError from Graphic3d is static;
715 TriangleMesh ( me : mutable;
716 ListVertex : Array1OfVertexN from Graphic3d;
717 EvalMinMax : Boolean from Standard = Standard_True )
719 ---Purpose: Creates triangles from an array of points such that
720 -- the Kth triangle contains the vertices K, K+1, K+2.
721 -- The triangle will be drawn using the current fill
722 -- attributes (AspectFillArea3d)
723 -- The normal is given for each vertex.
724 -- Category: Methods to create Triangle
725 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
726 -- less than three points.
727 raises GroupDefinitionError from Graphic3d is static;
729 TriangleMesh ( me : mutable;
730 ListVertex : Array1OfVertexNT from Graphic3d;
731 EvalMinMax : Boolean from Standard = Standard_True )
733 ---Purpose: Creates triangles from an array of points such that
734 -- the Kth triangle contains the vertices K, K+1, K+2.
735 -- The triangle will be drawn using the current fill
736 -- attributes (AspectFillArea3d)
737 -- The normal is given for each vertex.
738 -- A texture coordinate is given for each vertex.
739 -- Category: Methods to create Triangle
740 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
741 -- less than three points.
742 raises GroupDefinitionError from Graphic3d is static;
744 TriangleSet ( me : mutable;
745 ListVertex : Array1OfVertex from Graphic3d;
746 ListEdge : Array1OfEdge from Aspect;
747 EvalMinMax : Boolean from Standard = Standard_True )
749 ---Purpose: Creates a group of triangles defined by a table of
750 -- vertices and a table of edges, visible or not.
751 -- Category: Methods to create Triangle
752 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
753 -- less than three points or if <ListEdge> contains
754 -- less than three edges.
755 raises GroupDefinitionError from Graphic3d is static;
757 TriangleSet ( me : mutable;
758 ListVertex : Array1OfVertexN from Graphic3d;
759 ListEdge : Array1OfEdge from Aspect;
760 EvalMinMax : Boolean from Standard = Standard_True )
762 ---Purpose: Creates a group of triangles defined by a table of
763 -- vertices and a table of edges, visible or not.
764 -- For each vertex the normal is given.
765 -- Category: Methods to create Triangle
766 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
767 -- less than three points or if <ListEdge> contains
768 -- less than three edges.
769 raises GroupDefinitionError from Graphic3d is static;
771 TriangleSet ( me : mutable;
772 ListVertex : Array1OfVertexNT from Graphic3d;
773 ListEdge : Array1OfEdge from Aspect;
774 EvalMinMax : Boolean from Standard = Standard_True )
776 ---Purpose: Creates a group of triangles defined by a table of
777 -- vertices and a table of edges, visible or not.
778 -- For each vertex the normal is given.
779 -- For each vertex a texture coordinate is given.
780 -- Category: Methods to create Triangle
781 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
782 -- less than three points or if <ListEdge> contains
783 -- less than three edges.
784 raises GroupDefinitionError from Graphic3d is static;
786 TriangleSet ( me : mutable;
787 ListVertex : Array1OfVertexC from Graphic3d;
788 ListEdge : Array1OfEdge from Aspect;
789 EvalMinMax : Boolean from Standard = Standard_True )
791 ---Purpose: Creates a group of triangles defined by a table of
792 -- vertices and a table of edges, visible or not.
793 -- For each vertex the color is given.
794 -- Category: Methods to create Triangle
795 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
796 -- less than three points or if <ListEdge> contains
797 -- less than three edges.
798 raises GroupDefinitionError from Graphic3d is static;
800 TriangleSet ( me : mutable;
801 ListVertex : Array1OfVertexNC from Graphic3d;
802 ListEdge : Array1OfEdge from Aspect;
803 EvalMinMax : Boolean from Standard = Standard_True )
805 ---Purpose: Creates a group of triangles defined by a table of
806 -- vertices and a table of edges, visible or not.
807 -- For each vertex the normal and the color are given.
808 -- Category: Methods to create Triangle
809 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
810 -- less than three points or if <ListEdge> contains
811 -- less than three edges.
812 raises GroupDefinitionError from Graphic3d is static;
814 AddPrimitiveArray( me : mutable;
815 elem : ArrayOfPrimitives from Graphic3d;
816 EvalMinMax: Boolean from Standard = Standard_True );
818 ---Purpose: Adds an array of primitives for display
820 RemovePrimitiveArray( me : mutable;
821 aRank : Integer from Standard)
823 ---Purpose: Remove the array of primitives of rank <aRank>
824 raises OutOfRange from Standard is static;
825 -- if <aRank> is < 1 or > ArrayNumber()
827 RemovePrimitiveArrays( me : mutable);
829 ---Purpose: Remove all array of primitives
831 UserDraw ( me : mutable;
832 AnObject : Address from Standard;
833 EvalMinMax : Boolean from Standard = Standard_True;
834 -- SAMTECH contribution 5 July 2007 -- BEGIN
835 ContainsFacet: Boolean from Standard = Standard_False
836 -- SAMTECH contribution 5 July 2007 -- END
839 ---Purpose: Creates an UserDraw primitive
840 -- Category: Methods to create UserDraw
841 -- Warning: Raises GroupDefinitionError if ...
842 raises GroupDefinitionError from Graphic3d is static;
844 ----------------------------
845 -- Category: Inquire methods
846 ----------------------------
849 returns Integer from Standard;
851 ---Purpose: Returns the number of primitive array added in this group
853 InitDefinedArray( me:mutable );
855 ---Purpose: Initialize the array list iterator.
857 NextDefinedArray( me:mutable );
859 ---Purpose: Increments the array list iterator.
861 MoreDefinedArray( me:mutable )
862 returns Boolean from Standard;
864 ---Purpose: Returns TRUE if more array exists in the list.
867 returns mutable ArrayOfPrimitives from Graphic3d;
869 ---Purpose: Returns the current array of primitives according
870 -- to the array list iterator value.
872 IsGroupPrimitivesAspectSet ( me;
873 theAspect : GroupAspect from Graphic3d )
874 returns Boolean from Standard
877 ---Purpose: Returns TRUE if aspect is set for the group.
878 ---Category: Inquire methods
880 GroupPrimitivesAspect ( me;
881 CTXL : AspectLine3d from Graphic3d;
882 CTXT : AspectText3d from Graphic3d;
883 CTXM : AspectMarker3d from Graphic3d;
884 CTXF : AspectFillArea3d from Graphic3d )
887 ---Purpose: Returns the context of all the primitives of the group.
888 ---Category: Inquire methods
890 PrimitivesAspect ( me;
891 CTXL : AspectLine3d from Graphic3d;
892 CTXT : AspectText3d from Graphic3d;
893 CTXM : AspectMarker3d from Graphic3d;
894 CTXF : AspectFillArea3d from Graphic3d )
897 ---Purpose: Returns the last inserted context in the group <me>
898 -- foreach kind of primitives.
899 ---Category: Inquire methods
902 returns Boolean from Standard
905 ---Purpose: Returns Standard_True if the group <me> contains
906 -- Polygons, Triangles or Quadrangles.
907 ---Category: Inquire methods
910 returns Boolean from Standard
913 ---Purpose: Returns Standard_True if the group <me> is deleted.
914 -- <me> is deleted after the call Remove (me) or the
915 -- associated structure is deleted.
916 ---Category: Inquire methods
919 returns Boolean from Standard
922 ---Purpose: Returns Standard_True if the group <me> is empty.
923 ---Warning: A group is empty if the MinMaxValues method returns :
924 -- XMin = YMin = ZMin = RealFirst ().
925 -- XMax = YMax = ZMax = RealLast ().
926 ---Category: Inquire methods
929 XMin, YMin, ZMin : out Real from Standard;
930 XMax, YMax, ZMax : out Real from Standard )
933 ---Purpose: Returns the coordinates of the boundary box of the
935 ---Warning: If the group <me> is empty then :
936 -- XMin = YMin = ZMin = RealFirst ().
937 -- XMax = YMax = ZMax = RealLast ().
938 ---Category: Inquire methods
941 returns mutable Structure from Graphic3d
944 ---Purpose: Returns the structure containing the group <me>.
945 ---Category: Inquire methods
947 ----------------------------
948 -- Category: Private methods
949 ----------------------------
952 LB, LE : in out Integer from Standard )
955 ---Purpose: Returns the position of the group in the structure.
956 ---Category: Private methods
959 XMin, YMin, ZMin : out Real from Standard;
960 XMax, YMax, ZMax : out Real from Standard )
963 ---Purpose: Returns the extreme coordinates found in the group.
964 ---Warning: If the group <me> is empty then :
965 -- XMin = YMin = ZMin = RealFirst ().
966 -- XMax = YMax = ZMax = RealLast ().
967 ---Category: Private methods
972 ---Purpose: Calls the Update method of the StructureManager which
973 -- contains the associated Structure of the Group <me>.
974 ---Category: Private methods
976 -----------------------------
977 -- Category: Internal methods
978 -----------------------------
980 BeginPrimitives ( me : mutable )
983 ---Category: Internal methods
985 EndPrimitives ( me : mutable )
988 ---Category: Internal methods
990 Bezier ( me : mutable;
991 ListVertex : Array1OfVertex from Graphic3d;
992 EvalMinMax : Boolean from Standard = Standard_True )
994 ---Purpose: Creates a non rational Bezier curve with a set of poles :
995 -- ListVertex. The weights are defaulted to all being 1.
996 -- Category: Methods to create Curve
997 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
998 -- less than two points.
999 raises GroupDefinitionError from Graphic3d is static;
1001 Bezier ( me : mutable;
1002 ListVertex : Array1OfVertex from Graphic3d;
1003 ListWeight : Array1OfReal from TColStd;
1004 EvalMinMax : Boolean from Standard = Standard_True )
1006 ---Purpose: Creates a non rational Bezier curve with a set of poles :
1007 -- ListVertex and the set of weights ListWeight.
1008 -- If all the weights are identical the curve is considered
1010 -- Category: Methods to create Curve
1011 -- Warning: Raises GroupDefinitionError if <ListVertex> contains
1012 -- less than two points or <ListVertex> and <ListWeight>
1013 -- have not the same length or one weight value is lower
1014 -- or equal to Resolution from package gp.
1015 raises GroupDefinitionError from Graphic3d is static;
1022 -- Class : Graphic3d_Group
1024 -- Purpose : Declaration of variables specific to groups
1027 -- Reminder : A group is defined in a structure
1028 -- It acts as the smallest editable entity.
1030 -- the associated C structure
1031 MyCGroup : CGroup from Graphic3d;
1033 -- the graphic driver used
1034 MyGraphicDriver : GraphicDriver from Graphic3d;
1036 -- the state of the different contexts for primitives
1037 MyCBitFields : CBitFields4 from Graphic3d;
1039 -- the structure contains the group
1040 MyPtrStructure : Address from Standard;
1043 MyBounds : CBounds from Graphic3d;
1045 MyListOfPArray : ListOfPArray from Graphic3d;
1046 MyListOfPArrayIterator : ListIteratorOfListOfPArray from Graphic3d;
1048 MyMarkArray : HArray1OfByte from TColStd;
1049 MyMarkWidth : Integer from Standard;
1050 MyMarkHeight : Integer from Standard;
1054 Remove from class Structure from Graphic3d
1055 ( me : mutable; AGroup : Group from Graphic3d )