0022627: Change OCCT memory management defaults
[occt.git] / src / Select3D / Select3D_SensitiveGroup.cdl
1 -- File:        Select3D_SensitiveGroup.cdl
2 -- Created:     Thu Apr 16 14:57:09 1998
3 -- Author:      Robert COUBLANC
4 --              <rob@robox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1998
6
7
8 class SensitiveGroup from Select3D inherits SensitiveEntity from Select3D
9
10         ---Purpose: A framework to define selection of a sensitive group
11         --          by a sensitive entity which is a set of 3D sensitive entities.
12         --          Remark: 2 modes are possible for rectangle selection
13         --          the group is considered selected
14         --          1) when all the entities inside are selected in the rectangle
15         --          2) only one entity inside is selected by the rectangle
16         --          By default the "Match All entities" mode is set.
17
18 uses
19     Pnt                      from gp,
20     Projector                from Select3D,
21     Lin                      from gp,
22     EntityOwner              from SelectBasics,
23     SensitiveEntity          from Select3D,
24     ListOfSensitive          from Select3D,
25     ListOfBox2d              from SelectBasics,
26     Array1OfPnt2d            from TColgp,
27     Box2d                    from Bnd,
28     Location                 from TopLoc
29
30
31 is
32
33     Create (OwnerId      : EntityOwner from SelectBasics;
34             MatchAll     : Boolean from Standard = Standard_True)
35     returns mutable SensitiveGroup from Select3D;
36         ---Purpose: Constructs an empty sensitive group object.
37         -- This is a set of sensitive 3D entities. The sensitive
38         -- entities will be defined using the function Add to fill
39         -- the entity owner OwnerId. If MatchAll is false, nothing can be added.
40
41     Create(OwnerId       : EntityOwner from SelectBasics;
42            TheList       : in out ListOfSensitive from Select3D;
43            MatchAll      : Boolean from Standard = Standard_True)
44     returns mutable SensitiveGroup from Select3D;
45         ---Purpose: Constructs a sensitive group object defined by the list
46         -- TheList and the entity owner OwnerId. If MatchAll is false, nothing is done.
47
48     Add (me   :mutable; LL: in out ListOfSensitive from Select3D);
49         ---Purpose: Adds the list of sensitive entities LL to the empty
50         -- sensitive group object created at construction time.
51         
52     Add (me   :mutable;aSensitive : SensitiveEntity from Select3D);
53         ---Purpose: Adds the sensitive entity aSensitive to the non-empty
54         -- sensitive group object created at construction time.
55
56     Remove(me:mutable; aSensitive :SensitiveEntity from Select3D);
57
58     Clear(me:mutable) ;
59         ---Purpose: Removes all sensitive entities from the list used at the
60         -- time of construction, or added using the function Add.
61
62     IsIn(me;aSensitive: SensitiveEntity from Select3D)
63     returns Boolean from Standard;
64         ---Purpose: Returns true if the sensitive entity aSensitive is in
65         -- the list used at the time of construction, or added using the function Add.
66     Set(me:mutable; MustMatchAllEntities: Boolean from Standard);
67         ---Purpose: Sets the requirement that all sensitive entities in the
68         -- list used at the time of construction, or added using
69         -- the function Add must be matched.
70         ---C++: inline
71     MustMatchAll(me) returns Boolean from Standard;
72         ---Purpose: Returns true if all sensitive entities in the list used
73         -- at the time of construction, or added using the function Add must be matched.
74         ---C++: inline
75
76
77
78
79     Project (me:mutable;aProjector : Projector from Select3D) 
80     is redefined static;
81         ---Level: Public 
82         ---Purpose: projection of the sensitive primitive in order to
83         --          get 2D boxes for the Sort Algorithm
84
85     Areas   (me:mutable ; boxes : in out ListOfBox2d from SelectBasics) 
86     is redefined static;
87         ---Level: Public 
88         ---Purpose: gives the 2D boxes which represent the segment in the 
89         --          selection process...
90
91
92     MaxBoxes(me) returns Integer from Standard is redefined static;
93
94     GetConnected(me:mutable;aLocation: Location from TopLoc)
95     returns SensitiveEntity from Select3D is redefined static;
96
97
98     SetLocation(me:mutable;aLoc:Location from TopLoc) is redefined static;
99         ---Purpose:  propagation of location on all the sensitive inside...
100     ResetLocation(me:mutable) is redefined static;
101         ---Purpose:  propagation of location on all the sensitive inside...    
102
103     Matches(me  :mutable; 
104             X,Y : Real from Standard;
105             aTol: Real from Standard;
106             DMin: out Real from Standard) 
107     returns Boolean
108     is  redefined static;
109         ---Level: Public 
110         ---Purpose: projection of the sensitive primitive in order to
111         --          get 2D boxes for the Sort Algorithm
112
113     Matches (me  :mutable; 
114              XMin,YMin,XMax,YMax : Real from Standard;
115              aTol: Real from Standard) 
116     returns Boolean
117     is static;
118      
119     Matches (me  :mutable; 
120              Polyline:Array1OfPnt2d from TColgp;
121              aBox:Box2d from Bnd;
122              aTol: Real from Standard) 
123     returns Boolean
124     is redefined virtual;
125         ---Level: Public 
126     
127
128     ComputeDepth(me;EyeLine: Lin from gp) 
129     returns Real from Standard is redefined static;
130         ---Purpose: returns the depth of the touched entity
131
132     
133     SetLastPrj(me:mutable;aPrj:Projector from Select3D) is redefined virtual;
134
135     Set(me:mutable;TheOwnerId: EntityOwner from SelectBasics) is redefined static; 
136     ---Purpose: Sets the owner for all entities in group 
137      
138     GetEntities(me)
139     returns ListOfSensitive from Select3D; 
140     ---Purpose: Gets group content 
141     ---C++: inline
142     ---C++: return const&
143
144
145 fields
146     myList         : ListOfSensitive from Select3D;
147     myMustMatchAll : Boolean from Standard;
148     myLastRank     : Integer from Standard;
149     myLastTol      : ShortReal from Standard;
150     myX,myY        : ShortReal from Standard;
151 end SensitiveGroup;
152