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
8 class SensitiveGroup from Select3D inherits SensitiveEntity from Select3D
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.
20 Projector from Select3D,
22 EntityOwner from SelectBasics,
23 SensitiveEntity from Select3D,
24 ListOfSensitive from Select3D,
25 ListOfBox2d from SelectBasics,
26 Array1OfPnt2d from TColgp,
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.
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.
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.
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.
56 Remove(me:mutable; aSensitive :SensitiveEntity from Select3D);
59 ---Purpose: Removes all sensitive entities from the list used at the
60 -- time of construction, or added using the function Add.
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.
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.
79 Project (me:mutable;aProjector : Projector from Select3D)
82 ---Purpose: projection of the sensitive primitive in order to
83 -- get 2D boxes for the Sort Algorithm
85 Areas (me:mutable ; boxes : in out ListOfBox2d from SelectBasics)
88 ---Purpose: gives the 2D boxes which represent the segment in the
89 -- selection process...
92 MaxBoxes(me) returns Integer from Standard is redefined static;
94 GetConnected(me:mutable;aLocation: Location from TopLoc)
95 returns SensitiveEntity from Select3D is redefined static;
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...
104 X,Y : Real from Standard;
105 aTol: Real from Standard;
106 DMin: out Real from Standard)
110 ---Purpose: projection of the sensitive primitive in order to
111 -- get 2D boxes for the Sort Algorithm
113 Matches (me :mutable;
114 XMin,YMin,XMax,YMax : Real from Standard;
115 aTol: Real from Standard)
119 Matches (me :mutable;
120 Polyline:Array1OfPnt2d from TColgp;
122 aTol: Real from Standard)
124 is redefined virtual;
128 ComputeDepth(me;EyeLine: Lin from gp)
129 returns Real from Standard is redefined static;
130 ---Purpose: returns the depth of the touched entity
133 SetLastPrj(me:mutable;aPrj:Projector from Select3D) is redefined virtual;
135 Set(me:mutable;TheOwnerId: EntityOwner from SelectBasics) is redefined static;
136 ---Purpose: Sets the owner for all entities in group
139 returns ListOfSensitive from Select3D;
140 ---Purpose: Gets group content
142 ---C++: return const&
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;