0025265: Perspective projection - selecting front point of two
[occt.git] / src / Select3D / Select3D_SensitiveGroup.cdl
1 -- Created on: 1998-04-16
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class SensitiveGroup from Select3D inherits SensitiveEntity from Select3D
18
19         ---Purpose: A framework to define selection of a sensitive group
20         --          by a sensitive entity which is a set of 3D sensitive entities.
21         --          Remark: 2 modes are possible for rectangle selection
22         --          the group is considered selected
23         --          1) when all the entities inside are selected in the rectangle
24         --          2) only one entity inside is selected by the rectangle
25         --          By default the "Match All entities" mode is set.
26
27 uses
28     Pnt                      from gp,
29     Projector                from Select3D,
30     Lin                      from gp,
31     EntityOwner              from SelectBasics,
32     SensitiveEntity          from Select3D,
33     ListOfSensitive          from Select3D,
34     ListOfBox2d              from SelectBasics,
35     PickArgs                 from SelectBasics,
36     Array1OfPnt2d            from TColgp,
37     Box2d                    from Bnd,
38     Location                 from TopLoc
39
40
41 is
42
43     Create (OwnerId      : EntityOwner from SelectBasics;
44             MatchAll     : Boolean from Standard = Standard_True)
45     returns SensitiveGroup from Select3D;
46         ---Purpose: Constructs an empty sensitive group object.
47         -- This is a set of sensitive 3D entities. The sensitive
48         -- entities will be defined using the function Add to fill
49         -- the entity owner OwnerId. If MatchAll is false, nothing can be added.
50
51     Create(OwnerId       : EntityOwner from SelectBasics;
52            TheList       : in out ListOfSensitive from Select3D;
53            MatchAll      : Boolean from Standard = Standard_True)
54     returns SensitiveGroup from Select3D;
55         ---Purpose: Constructs a sensitive group object defined by the list
56         -- TheList and the entity owner OwnerId. If MatchAll is false, nothing is done.
57
58     Add (me   :mutable; LL: in out ListOfSensitive from Select3D);
59         ---Purpose: Adds the list of sensitive entities LL to the empty
60         -- sensitive group object created at construction time.
61         
62     Add (me   :mutable;aSensitive : SensitiveEntity from Select3D);
63         ---Purpose: Adds the sensitive entity aSensitive to the non-empty
64         -- sensitive group object created at construction time.
65
66     Remove(me:mutable; aSensitive :SensitiveEntity from Select3D);
67
68     Clear(me:mutable) ;
69         ---Purpose: Removes all sensitive entities from the list used at the
70         -- time of construction, or added using the function Add.
71
72     IsIn(me;aSensitive: SensitiveEntity from Select3D)
73     returns Boolean from Standard;
74         ---Purpose: Returns true if the sensitive entity aSensitive is in
75         -- the list used at the time of construction, or added using the function Add.
76     Set(me:mutable; MustMatchAllEntities: Boolean from Standard);
77         ---Purpose: Sets the requirement that all sensitive entities in the
78         -- list used at the time of construction, or added using
79         -- the function Add must be matched.
80         ---C++: inline
81     MustMatchAll(me) returns Boolean from Standard;
82         ---Purpose: Returns true if all sensitive entities in the list used
83         -- at the time of construction, or added using the function Add must be matched.
84         ---C++: inline
85
86
87
88
89     Project (me:mutable;aProjector : Projector from Select3D) 
90     is redefined static;
91         ---Level: Public 
92         ---Purpose: projection of the sensitive primitive in order to
93         --          get 2D boxes for the Sort Algorithm
94
95     Areas   (me:mutable ; boxes : in out ListOfBox2d from SelectBasics) 
96     is redefined static;
97         ---Level: Public 
98         ---Purpose: gives the 2D boxes which represent the segment in the 
99         --          selection process...
100
101
102     MaxBoxes(me) returns Integer from Standard is redefined static;
103
104     GetConnected(me:mutable;aLocation: Location from TopLoc)
105     returns SensitiveEntity from Select3D is redefined static;
106
107
108     SetLocation(me:mutable;aLoc:Location from TopLoc) is redefined static;
109         ---Purpose:  propagation of location on all the sensitive inside...
110     ResetLocation(me:mutable) is redefined static;
111         ---Purpose:  propagation of location on all the sensitive inside...    
112
113     Matches (me : mutable;
114              thePickArgs : PickArgs from SelectBasics;
115              theMatchDMin, theMatchDepth : out Real from Standard)
116     returns Boolean is redefined static;
117     ---Level: Public
118     ---Purpose: Checks whether the sensitive entity matches the picking
119     -- detection area (close to the picking line).
120     -- For details please refer to base class declaration.
121
122     Matches (me  :mutable; 
123              XMin,YMin,XMax,YMax : Real from Standard;
124              aTol: Real from Standard) 
125     returns Boolean
126     is static;
127      
128     Matches (me  :mutable; 
129              Polyline:Array1OfPnt2d from TColgp;
130              aBox:Box2d from Bnd;
131              aTol: Real from Standard) 
132     returns Boolean
133     is redefined virtual;
134         ---Level: Public 
135
136     Set(me:mutable;TheOwnerId: EntityOwner from SelectBasics) is redefined static; 
137     ---Purpose: Sets the owner for all entities in group 
138      
139     GetEntities(me)
140     returns ListOfSensitive from Select3D; 
141     ---Purpose: Gets group content 
142     ---C++: inline
143     ---C++: return const&
144
145
146 fields
147     myList         : ListOfSensitive from Select3D;
148     myMustMatchAll : Boolean from Standard;
149 end SensitiveGroup;
150