1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
|
-- File: Graphic3d_Structure.cdl
-- Created: Mercredi 12 Juin 1991
-- Author: NW,JPB,CAL
-- 11/97 ; CAL : gestion du GraphicClear
-- 11/97 ; CAL : ajout pointer StructPtr
-- 11/97 ; CAL : amelioration de l'effacement SetManager
-- 01/98 ; CAL : gestion du HLRValidation
-- 05/98 ; CAL : gestion du GraphicConnect et Disconnect
-- 02/00 ; GG : Made Transform() methode not mutable.
-- 31/05/01 ; GG : Add ResetDisplayPriority() method
--
---Copyright: MatraDatavision 1998
--
class Structure from Graphic3d inherits TShared
---Version:
---Purpose: This class allows the definition a graphic object.
-- This graphic structure can be displayed,
-- erased, or highlighted.
-- This graphic structure can be connected with
-- another graphic structure.
-- Keywords: Structure, StructureManager, Display, Erase, Highlight,
-- UnHighlight, Visible, Priority, Selectable, Visible,
-- Visual, Connection, Ancestors, Descendants, Transformation
---Warning:
---References:
uses
Array2OfReal from TColStd,
SequenceOfAddress from TColStd,
Color from Quantity,
GenId from Aspect,
TypeOfHighlightMethod from Aspect,
DataStructureManager from Graphic3d,
AspectFillArea3d from Graphic3d,
AspectLine3d from Graphic3d,
AspectMarker3d from Graphic3d,
AspectText3d from Graphic3d,
CStructure from Graphic3d,
GraphicDriver from Graphic3d,
Group from Graphic3d,
SequenceOfGroup from Graphic3d,
HSequenceOfGroup from Graphic3d,
SequenceOfStructure from Graphic3d,
HSequenceOfStructure from Graphic3d,
MapOfStructure from Graphic3d,
Plotter from Graphic3d,
StructureManager from Graphic3d,
TypeOfComposition from Graphic3d,
TypeOfConnection from Graphic3d,
TypeOfPrimitive from Graphic3d,
TypeOfStructure from Graphic3d,
Vector from Graphic3d,
VertexNC from Graphic3d,
Vertex from Graphic3d,
TransModeFlags from Graphic3d,
Pnt from gp
raises
PriorityDefinitionError from Graphic3d,
StructureDefinitionError from Graphic3d,
TransformError from Graphic3d
is
------------------------
-- Category: Constructor
------------------------
Create ( AManager : StructureManager from Graphic3d )
returns mutable Structure from Graphic3d;
---Level: Public
---Purpose: Creates a graphic object in the manager <AManager>.
-- It will appear in all the views of the visualiser.
-- Warning: The default values AspectLine, AspectFillArea,
-- AspectText and AspectMarker are NOT applied to the
-- structure.
-- The structure is not displayed when it is created.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
--------------------------------------------------------
-- Summary of Display Priorities --
-- --
-- Structure display priorities control the order in --
-- which structures are redrawn. --
-- --
-- When you display a structure, you specify its --
-- priority. The lower the value, the lower the --
-- display priority. When the display is regenerated, --
-- the structures with the lowest priority are drawn --
-- first. --
-- For structures with the same display priority, --
-- the order in which they were displayed determines --
-- determines the drawing order. --
-- --
-- CAS.CADE supports 11 structure display priorities, --
-- 0 to 10. --
--------------------------------------------------------
Clear ( me : mutable;
WithDestruction : Boolean from Standard = Standard_True )
is virtual;
---Level: Public
---Purpose: if WithDestruction == Standard_True then
-- suppress all the groups of primitives in the structure.
-- and it is mandatory to create a new group in <me>.
-- if WithDestruction == Standard_False then
-- clears all the groups of primitives in the structure.
-- and all the groups are conserved and empty.
-- They will be erased at the next screen update.
-- The structure itself is conserved.
-- The transformation and the attributes of <me> are conserved.
-- The childs of <me> are conserved.
---Category: Methods to modify the class definition
Destroy ( me : mutable )
is virtual;
---Level: Public
---Purpose: Suppresses the structure <me>.
-- It will be erased at the next screen update.
---Category: Methods to modify the class definition
---C++: alias ~
Display ( me : mutable )
is virtual;
---Level: Public
---Purpose: Displays the structure <me> in all the views of
-- the visualiser.
---Category: Methods to modify the class definition
Display ( me : mutable;
Priority : Integer from Standard )
---Level: Public
---Purpose: Displays the structure <me> in all the views of
-- the visualiser, while modifying its current priority.
-- Note: Display Priorities
-- Structure display priorities control the order in which
-- structures are redrawn. When you display a
-- structure, you specify its priority. The lower the value,
-- the lower the display priority. When the display is
-- regenerated, the structures with the lowest priority
-- are drawn first. For structures with the same display
-- priority, the order in which they were displayed
-- determines the drawing order. Open CASCADE
-- supports 11 structure display priorities, 0 to 10.
-- Warning: Raises PriorityDefinitionError if <Priority> is
-- greater than 10 or a negative value.
raises PriorityDefinitionError from Graphic3d is static;
DisplayPriority ( me )
returns Integer from Standard
is static;
---Level: Public
---Purpose: Returns the current display priority for the
-- structure <me>.
---Category: Methods to modify the class definition
Erase ( me : mutable )
is virtual;
---Level: Public
---Purpose: Erases the structure <me> in all the views
-- of the visualiser.
---Category: Methods to modify the class definition
Highlight ( me : mutable;
Method : TypeOfHighlightMethod from Aspect )
is static;
---Level: Public
---Purpose: Highlights the structure <me> in all the
-- views of the visualiser, using the following methods:
--
-- TOHM_COLOR = drawn in the highlight color
-- (default white)
-- TOHM_BLINK = blinking
-- TOHM_BOUNDBOX = enclosed by the boundary box
-- (default white)
--
---Category: Methods to modify the class definition
Remove ( me : mutable )
is static;
---Level: Public
---Purpose: Suppress the structure <me>.
-- It will be erased at the next screen update.
-- Warning: No more graphic operations in <me> after this call.
-- Category: Methods to modify the class definition
SetHighlightColor ( me : mutable;
AColor : Color from Quantity )
is static;
---Level: Public
---Purpose: Modifies the highlight color for the Highlight method
-- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
---Category: Methods to modify the class definition
SetInfiniteState ( me : mutable;
AFlag : Boolean from Standard )
is static;
---Level: Internal
---Purpose: Modifies the coordinates of the boundary box
-- of the structure <me>.
-- if <AFlag> is Standard_True then <me> is infinite and
-- the MinMaxValues method or the MinMaxCoord method return :
-- XMin = YMin = ZMin = RealFirst ().
-- XMax = YMax = ZMax = RealLast ().
-- By default, <me> is not infinite but empty.
---Category: Methods to modify the class definition
SetDisplayPriority ( me : mutable;
Priority : Integer from Standard )
---Level: Public
---Purpose: Modifies the order of displaying the structure.
-- Values are between 0 et 10.
-- The priority 10 being displayed first.
-- The default value is 5
-- Category: Methods to modify the class definition
-- Warning: If <me> is displayed then the SetDisplayPriority
-- method erase <me> and display <me> with the
-- new priority.
-- Raises PriorityDefinitionError if <Priority> is
-- greater than 10 or a negative value.
raises PriorityDefinitionError from Graphic3d is static;
ResetDisplayPriority ( me : mutable)
is static;
---Level: Public
---Purpose: Reset the current priority of the structure to the
-- previous priority.
-- Category: Methods to modify the class definition
-- Warning: If <me> is displayed then the SetDisplayPriority
-- method erase <me> and display <me> with the
-- previous priority.
SetPick ( me : mutable;
AValue : Boolean from Standard )
is static;
---Level: Public
---Purpose: Modifies the detectability indicator to Standard_True
-- or Standard_False for the structure <me>.
-- The default value at the definition of <me> is
-- Standard_True.
---Category: Methods to modify the class definition
SetPrimitivesAspect ( me : mutable;
CTX : AspectLine3d from Graphic3d )
is static;
---Level: Public
---Purpose: Modifies the default attributes for lines
-- in the structure <me>.
---Category: Methods to modify the class definition
SetPrimitivesAspect ( me : mutable;
CTX : AspectFillArea3d from Graphic3d )
is static;
---Level: Public
---Purpose: Modifies the default attributes for faces
-- in the structure <me>.
---Category: Methods to modify the class definition
SetPrimitivesAspect ( me : mutable;
CTX : AspectText3d from Graphic3d )
is static;
---Level: Public
---Purpose: Modifies the default attributes for text
-- in the structure <me>.
---Category: Methods to modify the class definition
SetPrimitivesAspect ( me : mutable;
CTX : AspectMarker3d from Graphic3d )
is static;
---Level: Public
---Purpose: Modifies the default attributes for markers
-- in the structure <me>.
---Category: Methods to modify the class definition
SetVisible ( me : mutable;
AValue : Boolean from Standard )
is static;
---Level: Public
---Purpose: Modifies the visibility indicator to Standard_True or
-- Standard_False for the structure <me>.
-- The default value at the definition of <me> is
-- Standard_True.
---Category: Methods to modify the class definition
SetManager ( me : mutable;
AManager : StructureManager from Graphic3d;
WithPropagation : Boolean from Standard = Standard_False)
is static;
---Level: Public
---Purpose: Moves the graphic object <me> in the manager <AManager>.
-- If <WithPropagation> is Standard_True then all the connected
-- graphic objects to <me> are moved.
SetVisual ( me : mutable;
AVisual : TypeOfStructure from Graphic3d )
is virtual;
---Level: Public
---Purpose: Modifies the visualisation mode for the structure <me>.
---Warning: It is not possible to display a structure with
-- an incompatible display mode.
-- If the display mode is different from the current one,
-- the structure is erased.
--
-- TOS_WIREFRAME for a wireframe visualisation
-- TOS_SHADING for a shaded visualisation
-- TOS_ALL for all visualisations
-- TOS_COMPUTED for a computed visualisation
-- The default value is TOS_ALL
--
---Category: Methods to modify the class definition
SetZoomLimit ( me : mutable;
LimitInf, LimitSup : Real from Standard )
---Level: Internal
---Purpose: Modifies the minimum and maximum zoom coefficients
-- for the structure <me>.
-- The default value at the definition of <me> is unlimited.
-- Category: Methods to modify the class definition
-- Warning: Raises StructureDefinitionError if <LimitInf> is
-- greater than <LimitSup> or if <LimitInf> or
-- <LimitSup> is a negative value.
raises StructureDefinitionError from Graphic3d is static;
UnHighlight ( me : mutable )
is static;
---Level: Public
---Purpose: Suppresses the highlight for the structure <me>
-- in all the views of the visualiser.
---Category: Methods to modify the class definition
----------------------------
-- Category: Compute methods
----------------------------
Compute ( me : mutable;
aProjector : DataStructureManager from Graphic3d )
returns Structure from Graphic3d is virtual;
---Level: Advanced
---Purpose: Returns the new Structure defined for the new visualization
---Category: Methods to modify the class definition
Compute ( me : mutable;
aProjector : DataStructureManager from Graphic3d;
AMatrix : Array2OfReal from TColStd )
returns Structure from Graphic3d is virtual;
---Level: Advanced
---Purpose: Returns the new Structure defined for the new visualization
---Category: Methods to modify the class definition
Compute ( me : mutable;
aProjector : DataStructureManager from Graphic3d;
aStructure : in out Structure from Graphic3d )
is virtual;
---Level: Advanced
---Purpose: Returns the new Structure defined for the new visualization
---Category: Methods to modify the class definition
Compute ( me : mutable;
aProjector : DataStructureManager from Graphic3d;
AMatrix : Array2OfReal from TColStd;
aStructure : in out Structure from Graphic3d )
is virtual;
---Level: Advanced
---Purpose: Returns the new Structure defined for the new visualization
---Category: Methods to modify the class definition
ReCompute ( me : mutable );
---Level: Advanced
---Purpose: Forces a new construction of the structure <me>
-- if <me> is displayed and TOS_COMPUTED.
---Category: Methods to modify the class definition
ReCompute ( me : mutable;
aProjector : DataStructureManager from Graphic3d );
---Level: Advanced
---Purpose: Forces a new construction of the structure <me>
-- if <me> is displayed in <aProjetor> and TOS_COMPUTED.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
ContainsFacet ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns Standard_True if the structure <me> contains
-- Polygons, Triangles or Quadrangles.
---Category: Inquire methods
Exploration ( me;
ElementNumber : Integer from Standard;
AVertex : out VertexNC from Graphic3d;
AVector : out Vector from Graphic3d )
returns Boolean from Standard
is static;
---Level: Internal
---Purpose: Explores a structure element of <me>.
-- Returns Standard_True if the exploration succeded and
-- Standard_False if the exploration is done or if the
-- specified structure element is not in the structure.
-- <AVertex> contains the coordinates, the normal and
-- the color of the vertex found in the structure element.
-- <AVector> contains the normal of the face.
-- Warning: - The structure element number is given by
-- Visual3d_ViewManager::Pick method.
-- - The primitive type is given by
-- Graphic3d_Structure::Type method.
-- - The normal is (0.0, 0.0, 0.0) when the normal is not
-- specified in the structure element.
-- - The color is (0.0, 0.0, 0.0) when the color is not
-- specified in the structure element.
-- - To initialize the exploration, you have to call the
-- Graphic3d_Structure::Type method before this method.
--
-- Programming example :
--
-- // Define a graphic device
-- Handle(Graphic3d_GraphicDevice) GD =
-- new Graphic3d_GraphicDevice ("dummy:0.0");
--
-- // Define a view manager
-- Handle(Visual3d_ViewManager) VM = new Visual3d_ViewManager (GD);
--
-- // Define a view
-- Handle(Visual3d_View) V = new Visual3d_View (VM);
--
-- // Define a window
-- Handle(Aspect_Window) W = new Aspect_Window
-- (GD, "Graphic View 1", 0.695, 0.695, 0.600, 0.600,
-- Xw_WQ_3DQUALITY, Quantity_NOC_MATRAGRAY);
--
-- // Define a context pick
-- Visual3d_ContextPick CTXP;
--
-- // Activate the view
-- V->SetWindow (W);
-- V->Activate ();
--
-- // Create a structure
-- Handle(Graphic3d_Structure) S = new Graphic3d_Structure (V);
-- Handle(Graphic3d_Group) G = new Graphic3d_Group (S);
--
-- // Create a polygon
-- G->Polygon (PtsArray);
--
-- // Display the structure
-- S->Display ();
--
-- // Pick
-- Visual3d_PickDescriptor PDes (CTXP);
-- PDes.Clear ();
-- PDes = V->Pick (CTXP, W, x, y);
--
-- // Explore the top structure
-- Standard_Boolean Next = Standard_True;
-- Graphic3d_Vertex AVertex;
-- Graphic3d_Vector AVector;
-- if ((PDes.TopStructure ())->Type () == Graphic3d_TOP_POLYGON)
-- while (Next) {
-- Next = S->Exploration (PDes.TopElementNumber (),
-- AVertex, AVector);
-- if (Next) {
-- cout << "Point " << AVertex.X () << " , "
-- << AVertex.Y () << " , " << AVertex.Z () << "\n";
-- if (! AVector.LengthZero ())
-- cout << "Normal " << AVector.X () << " , "
-- << AVector.Y () << " , " << AVector.Z () << "\n";
-- cout << flush;
-- }
-- }
--
---Category: Inquire methods
FillArea3dAspect ( me )
returns AspectFillArea3d from Graphic3d
is static;
---Level: Public
---Purpose: Returns the values of the current default attributes.
---Category: Inquire methods
Groups ( me )
returns SequenceOfGroup from Graphic3d
is static;
---C++: return const &
---Level: Internal
---Purpose: Returns the groups sequence included in the structure <me> (internal storage).
---Category: Inquire methods
NumberOfGroups ( me )
returns Integer from Standard
is static;
---Level: Public
---Purpose: Returns the current number of groups in the
-- structure <me>.
---Category: Inquire methods
HighlightColor ( me )
returns Color from Quantity
is static;
---Level: Public
---Purpose: Returns the highlight color for the Highlight method
-- with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
---Category: Inquire methods
IsDeleted ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns Standard_True if the structure <me> is deleted.
-- <me> is deleted after the call Remove (me).
---Category: Inquire methods
IsDisplayed ( me )
returns Boolean from Standard
is virtual;
---Level: Public
---Purpose: Returns the display indicator for the structure <me>.
---Category: Inquire methods
IsEmpty ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns Standard_True if the structure <me> is empty.
-- Warning: A structure is empty if :
-- it do not have group or all the groups are empties
-- and it do not have descendant or all the descendants
-- are empties.
---Category: Inquire methods
IsInfinite ( me )
returns Boolean from Standard
is static;
---Level: Internal
---Purpose: Returns Standard_True if the structure <me> is infinite.
---Category: Inquire methods
IsHighlighted ( me )
returns Boolean from Standard
is virtual;
---Level: Public
---Purpose: Returns the highlight indicator for the structure <me>.
---Category: Inquire methods
IsSelectable ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns the detectability indicator for the structure <me>.
---Category: Inquire methods
IsRotated ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns Standard_True if the structure <me> is rotated.
-- <=> The transformation != Identity, != Scale, != Translation.
---Category: Inquire methods
IsTransformed ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns Standard_True if the structure <me> is transformed.
-- <=> The transformation != Identity.
---Category: Inquire methods
IsVisible ( me )
returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns the visibility indicator for the structure <me>.
---Category: Inquire methods
Line3dAspect ( me )
returns AspectLine3d from Graphic3d
is static;
---Level: Public
---Purpose: Returns the values of the current default attributes.
---Category: Inquire methods
Marker3dAspect ( me )
returns AspectMarker3d from Graphic3d
is static;
---Purpose: Returns the current group of graphic attributes used
-- for 3d marker primitives.
MinMaxValues ( me;
XMin, YMin, ZMin : out Real from Standard;
XMax, YMax, ZMax : out Real from Standard )
is static;
---Level: Public
---Purpose: Returns the coordinates of the boundary box
-- of the structure <me>.
-- Warning: If the structure <me> is empty or infinite then :
-- XMin = YMin = ZMin = RealFirst ().
-- XMax = YMax = ZMax = RealLast ().
---Category: Inquire methods
PrimitivesAspect ( me;
CTXL : out AspectLine3d from Graphic3d;
CTXT : out AspectText3d from Graphic3d;
CTXM : out AspectMarker3d from Graphic3d;
CTXF : out AspectFillArea3d from Graphic3d )
is static;
---Level: Public
---Purpose: Returns the current values of the default attributes.
---Category: Inquire methods
Text3dAspect ( me )
returns AspectText3d from Graphic3d
is static;
---Level: Public
---Purpose: Returns the values of the current default attributes.
---Category: Inquire methods
Type ( me;
ElementNumber : Integer from Standard )
returns TypeOfPrimitive from Graphic3d
is static;
---Level: Public
---Purpose: Returns the primitive type stored in the structure
-- element <ElementNumber>.
-- Initialises the exploration of this primitive.
-- If the structure element is not a primitive, returns
-- Graphic3d_TOP_UNDEFINED.
-- Warning: The structure element number is given by
-- Visual3d_ViewManager::Pick method.
---Category: Inquire methods
Visual ( me )
returns TypeOfStructure from Graphic3d
is static;
---Level: Public
---Purpose: Returns the visualisation mode for the structure <me>.
---Category: Inquire methods
----------------------------------------------------
-- Category: Methods to manage the structure network
----------------------------------------------------
-----------------------------------------------------
-- Summary of Structure Hierarchies --
-- --
-- The root is the top of a structure hierarchy --
-- or structure network. --
-- --
-- The attributes of a parent structure are passed --
-- passed to its descendants. --
-- --
-- The attributes of the descendant structures --
-- don't affect the parent. --
-- --
-- Recursive structure networks are not supported. --
-----------------------------------------------------
AcceptConnection ( myclass;
AStructure1 : Structure from Graphic3d;
AStructure2 : Structure from Graphic3d;
AType : TypeOfConnection from Graphic3d )
returns Boolean from Standard;
---Level: Internal
---Purpose: Returns Standard_True if the connection is possible between
-- <AStructure1> and <AStructure2> without a creation
-- of a cycle.
--
-- It's not possible to call the method
-- AStructure1->Connect (AStructure2, TypeOfConnection)
-- if
-- - the set of all ancestors of <AStructure1> contains
-- <AStructure1> and if the
-- TypeOfConnection == TOC_DESCENDANT
-- - the set of all descendants of <AStructure1> contains
-- <AStructure2> and if the
-- TypeOfConnection == TOC_ANCESTOR
---Category: Methods to manage the structure network
Ancestors ( me; SG: in out MapOfStructure from Graphic3d )
is static;
---Level: Internal
---Purpose: Returns the group of structures to which <me> is connected.
---Category: Methods to manage the structure network
Connect ( me : mutable;
AStructure : Structure from Graphic3d;
AType : TypeOfConnection from Graphic3d;
WithCheck : Boolean from Standard = Standard_False );
---Level: Public
---Purpose: If Atype is TOC_DESCENDANT then add <AStructure>
-- as a child structure of <me>.
-- If Atype is TOC_ANCESTOR then add <AStructure>
-- as a parent structure of <me>.
-- The connection propagates Display, Highlight, Erase,
-- Remove, and stacks the transformations.
-- No connection if the graph of the structures
-- contains a cycle and <WithCheck> is Standard_True;
---Category: Methods to manage the structure network
Descendants ( me; SG : in out MapOfStructure from Graphic3d )
is static;
---Level: Internal
---Purpose: Returns the group of structures connected to <me>.
---Category: Methods to manage the structure network
Disconnect ( me : mutable;
AStructure : Structure from Graphic3d )
is static;
---Level: Public
---Purpose: Suppress the connection between <AStructure> and <me>.
---Category: Methods to manage the structure network
DisconnectAll ( me : mutable;
AType : TypeOfConnection from Graphic3d )
is static;
---Level: Public
---Purpose: If Atype is TOC_DESCENDANT then suppress all
-- the connections with the child structures of <me>.
-- If Atype is TOC_ANCESTOR then suppress all
-- the connections with the parent structures of <me>.
---Category: Methods to manage the structure network
Network ( myclass;
AStructure : Structure from Graphic3d;
AType : TypeOfConnection from Graphic3d;
ASet : in out MapOfStructure from Graphic3d );
---Level: Internal
---Purpose: Returns <ASet> the group of structures :
-- - directly or indirectly connected to <AStructure> if the
-- TypeOfConnection == TOC_DESCENDANT
-- - to which <AStructure> is directly or indirectly connected
-- if the TypeOfConnection == TOC_ANCESTOR
---Category: Methods to manage the structure network
SetOwner ( me : mutable;
Owner : Address from Standard )
is static;
---Level: Advanced
Owner ( me )
returns Address from Standard
is static;
---Level: Advanced
SetHLRValidation ( me : mutable;
AFlag : Boolean from Standard )
is static;
---Level: Advanced
HLRValidation ( me )
returns Boolean from Standard
is static;
---Level: Advanced
-----------------------------------------------------------
-- Category: Methods to manage the structure transformation
-----------------------------------------------------------
Composition ( me )
returns TypeOfComposition from Graphic3d
is static;
---Level: Public
---Purpose: Returns the type of composition applied to matrices
-- of transformation of <me>.
---Category: Methods to manage the structure transformation
SetTransform ( me : mutable;
AMatrix : Array2OfReal from TColStd;
AType : TypeOfComposition from Graphic3d )
---Level: Public
---Purpose: Modifies the current local modelling transformation
-- in the structure <me>.
--
-- It is defined as a 4*4 real matrix.
--
-- -------------------
-- | a11 a12 a13 t1 |
-- | a21 a22 a23 t2 |
-- | a31 a32 a33 t3 |
-- | 0 0 0 1 |
-- -------------------
--
-- TypeOfComposition : TOC_REPLACE
-- TOC_POSTCONCATENATE
--
-- Then the modified Local Modelling Transformation is composed
-- with the current Global Modelling Transformation to create a
-- new Composite Modelling Transformation.
--
-- The compose type specifies the role of the current local
-- modelling transformation (L) in composing the new value for
-- the current local modelling transformation (L'), which is
-- then combined with the current global modelling transforma-
-- tion (G) to calculate the new composite modelling transfor-
-- mation (C).
--
-- TOC_REPLACE
-- The transformation matrix (T) replaces the value of
-- current local modelling transformation (L).
--
-- L' <- T
-- C <- G x L'
--
-- TOC_POSTCONCATENATE
-- The current local modelling transformation (L) is multiplied
-- by the transformation matrix (T):
--
-- L' <- T x L
-- C <- G x L'
--
-- Category: Methods to manage the structure transformation
-- Warning: Raises TransformError if the matrix is not a 4x4 matrix.
raises TransformError from Graphic3d is static;
-- Transform ( me : mutable;
Transform ( me;
AMatrix : in out Array2OfReal from TColStd )
is static;
---Level: Public
---Purpose: Returns the transformation associated with
-- the structure <me>.
---Category: Methods to manage the structure transformation
SetTransformPersistence( me : mutable;
AFlag : TransModeFlags from Graphic3d;
APoint : Pnt from gp )
---Level: Public
---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
is static;
SetTransformPersistence( me : mutable;
AFlag : TransModeFlags from Graphic3d )
-- Calls previous method with point (0,0,0)
is static;
TransformPersistenceMode( me )
returns TransModeFlags from Graphic3d
---Level: Public
---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
is static;
TransformPersistencePoint( me )
returns Pnt from gp
---Level: Public
---Purpose: Get the current point of relative modelling transform persistence
is static;
----------------------------
-- Category: Private methods
----------------------------
Add ( me : mutable;
AGroup : Group from Graphic3d )
is static private;
---Level: Internal
---Purpose: Inserts in the structure <me>, the group <G>.
-- It will be erased at the next screen update.
---Category: Private methods
ComputeVisual ( me )
returns TypeOfStructure from Graphic3d
is static;
---Level: Internal
---Category: Private methods
GroupsWithFacet ( me : mutable;
ADelta : Integer from Standard )
is static private;
---Level: Internal
---Purpose: Manages the number of groups in the structure <me>
-- which contains facet.
-- Polygons, Triangles or Quadrangles.
-- <ADelta> = +1 or -1
---Category: Private methods
Exploration ( me )
is static;
---Level: Internal
---Purpose: Prints informations about the structure <me>.
---Category: Private methods
GraphicClear ( me : mutable;
WithDestruction : Boolean from Standard )
is static;
---Level: Internal
---Purpose: Clears the structure <me>.
---Category: Private methods
GraphicConnect ( me : mutable;
ADaughter : Structure from Graphic3d )
is static;
---Level: Internal
---Purpose:
---Category: Private methods
GraphicDisconnect ( me : mutable;
ADaughter : Structure from Graphic3d )
is static;
---Level: Internal
---Purpose:
---Category: Private methods
GraphicHighlight ( me : mutable;
Method : TypeOfHighlightMethod from Aspect )
is static;
---Level: Internal
---Purpose: Highlights the structure <me>.
---Category: Private methods
GraphicTransform ( me : mutable;
AMatrix : Array2OfReal from TColStd )
is static;
---Level: Internal
---Purpose:
---Category: Private methods
GraphicUnHighlight ( me : mutable )
is static;
---Level: Internal
---Purpose: Suppress the highlight for the structure <me>.
---Category: Private methods
GroupLabels ( me : mutable;
LB, LE : in out Integer from Standard )
is static private;
---Level: Internal
---Purpose: Returns the labels for a new group in the structure <me>.
---Category: Private methods
Identification ( me )
returns Integer from Standard
is static;
---Level: Internal
---Purpose: Returns the identification number of the structure <me>.
---Category: Private methods
MinMaxCoord ( me;
XMin, YMin, ZMin : out Real from Standard;
XMax, YMax, ZMax : out Real from Standard )
is static private;
---Level: Internal
---Purpose: Returns the extreme coordinates found in the
-- structure <me>.
-- Warning: If the structure <me> is empty or infinite then :
-- XMin = YMin = ZMin = RealFirst ().
-- XMax = YMax = ZMax = RealLast ().
---Category: Private methods
Plot ( me : mutable;
aPlotter : Plotter from Graphic3d )
is virtual;
---Level: Internal
---Category: Private methods
PrintNetwork ( myclass;
AStructure : Structure from Graphic3d;
AType : TypeOfConnection from Graphic3d );
---Level: Internal
---Purpose: Prints informations about the network associated
-- with the structure <AStructure>.
---Category: Private methods
Remove ( me : mutable;
APtr : Address from Standard;
AType : TypeOfConnection from Graphic3d )
is static;
---Level: Internal
---Purpose: Suppress the adress <APtr> in the list
-- of descendants or in the list of ancestors.
---Category: Private methods
Remove ( me : mutable;
AGroup : Group from Graphic3d )
is static private;
---Level: Internal
---Purpose: Suppress in the structure <me>, the group <AGroup>.
-- It will be erased at the next screen update.
---Category: Private methods
SetComputeVisual ( me : mutable;
AVisual : TypeOfStructure from Graphic3d )
is static;
---Level: Internal
---Category: Private methods
StructureManager ( me )
returns StructureManager from Graphic3d
is static private;
---Level: Internal
---Purpose: Returns the manager to which <me> is associated.
---Category: Private methods
Transforms ( myclass;
ATrsf : Array2OfReal from TColStd;
X, Y, Z : Real from Standard;
NewX, NewY, NewZ : out Real from Standard );
---Level: Internal
---Purpose: Transforms <X>, <Y>, <Z> with the transformation <ATrsf>.
---Category: Private methods
Transforms ( myclass;
ATrsf : Array2OfReal from TColStd;
Coord : Vector from Graphic3d )
returns Vector from Graphic3d;
---Level: Internal
---Purpose: Transforms <Coord> with the transformation <ATrsf>.
---Category: Private methods
Transforms ( myclass;
ATrsf : Array2OfReal from TColStd;
Coord : Vertex from Graphic3d )
returns Vertex from Graphic3d;
---Level: Internal
---Purpose: Transforms <Coord> with the transformation <ATrsf>.
---Category: Private methods
Update ( me )
is static private;
---Level: Internal
---Purpose: Calls the Update method of the StructureManager which
-- contains the Structure <me>.
---Category: Private methods
UpdateStructure ( me : mutable;
CTXL : AspectLine3d from Graphic3d;
CTXT : AspectText3d from Graphic3d;
CTXM : AspectMarker3d from Graphic3d;
CTXF : AspectFillArea3d from Graphic3d )
is static private;
---Level: Internal
---Purpose: Updates the c structure associated to <me>.
---Category: Private methods
CStructure ( me )
returns Address from Standard
is static;
---Level: Internal
---Purpose: Returns the c structure associated to <me>.
---Category: Private methods
--
--
fields
--
-- Class : Graphic3d_Structure
--
-- Purpose : Declaration of variables specific to
-- graphic structures.
-- Reminder : A structure is defined in a manager.
-- It is a sequence of groups of primitives.
--
-- the associated C structure
MyCStructure : CStructure from Graphic3d;
-- the group identifier generator
MyGroupGenId : GenId from Aspect;
-- the structures to which the structure is attached
MyAncestors : SequenceOfAddress from TColStd;
-- the structures attached to the structure
MyDescendants : SequenceOfAddress from TColStd;
-- the sequence of groups
MyGroups : SequenceOfGroup from Graphic3d;
-- the graphic driver used
MyGraphicDriver : GraphicDriver from Graphic3d;
-- the highlight method of the structure
MyHighlightColor : Color from Quantity;
MyHighlightMethod : TypeOfHighlightMethod from Aspect;
-- the manager accepting the structure
MyPtrStructureManager : Address from Standard is protected;
MyFirstPtrStructureManager : Address from Standard is protected;
MyOwner : Address from Standard;
-- the type of visualisation accepted by the structure
MyVisual : TypeOfStructure from Graphic3d;
MyComputeVisual : TypeOfStructure from Graphic3d is protected;
friends
-- a lot of methods of Group use the methods of Structure
class Group from Graphic3d
end Structure;
|