b47d4a798a1d7247e890225a7756ce4c5277dc09
[occt.git] / src / Select3D / Select3D_SensitiveBox.cdl
1 -- Created on: 1995-04-13
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23
24 class SensitiveBox   from Select3D 
25 inherits SensitiveEntity from Select3D
26
27         ---Purpose: A framework to define selection by a sensitive box.         
28
29 uses
30     Pnt              from gp,
31     Pnt2d            from gp,
32     Box              from Bnd,
33     Box2d            from Bnd,
34     Projector        from Select3D,
35     Lin              from gp,
36     EntityOwner      from SelectBasics,
37     ListOfBox2d      from SelectBasics,
38     Array1OfPnt2d    from TColgp,
39     Location         from TopLoc
40
41 is
42
43
44     Create (OwnerId      : EntityOwner from SelectBasics;
45             BoundingBox  : Box from Bnd)
46     returns mutable SensitiveBox;
47         ---Purpose: Constructs a sensitive box object defined by the
48         -- owner OwnerId, and the bounding box BoundingBox.
49     Create (OwnerId         : EntityOwner from SelectBasics;
50             XMin,YMin,ZMin,
51             XMax,YMax,ZMax  : Real)
52     returns mutable SensitiveBox;
53         ---     Purpose: Constructs a sensitive box object defined by the
54         -- owner OwnerId, and the coordinates Xmin, YMin, ZMin, XMax, YMax, ZMax.
55         -- Xmin, YMin and ZMin define the minimum point in
56         -- the front lower left hand corner of the box,
57         -- and   XMax, YMax   and ZMax define the maximum
58         -- point in the back upper right hand corner of the box.     
59             
60     Project (me:mutable;aProjector : Projector from Select3D) 
61     is redefined static;
62         ---Level: Public 
63         ---Purpose: projection of the sensitive primitive in order to
64         --          get 2D boxes for the Sort Algorithm
65     
66     Areas   (me:mutable ; boxes : in out ListOfBox2d from SelectBasics) 
67     is redefined static;
68         ---Level: Public 
69         ---Purpose: gives the 2D boxes which represent the Box in the 
70         --          selection process...
71
72     GetConnected(me:mutable;aLocation: Location from TopLoc)
73     returns SensitiveEntity from Select3D is redefined static;
74     
75     Matches(me  :mutable; 
76             X,Y : Real from Standard;
77             aTol: Real from Standard;
78             DMin: out Real from Standard) 
79     returns Boolean
80     is static;
81         ---Level: Public 
82         ---Purpose: 
83         --          
84     
85     Matches (me  :mutable; 
86              XMin,YMin,XMax,YMax : Real from Standard;
87              aTol: Real from Standard)
88     returns Boolean is redefined static;
89      
90     Matches (me  :mutable; 
91              Polyline:Array1OfPnt2d from TColgp;
92              aBox:Box2d from Bnd;
93              aTol: Real from Standard) 
94     returns Boolean
95     is redefined virtual;
96         ---Level: Public 
97     
98    
99     ComputeDepth(me;EyeLine: Lin from gp) 
100     returns Real from Standard is redefined static;
101
102     Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual;
103
104     Box(me) returns Box from Bnd;
105     ---Purpose: Returns the sensitive 3D box used at the time of construction.
106     ---C++: inline
107     ---C++: return const &
108
109
110     ProjectBox(me:mutable;aPrj: Projector from Select3D;aBox:Box from Bnd)
111     is static private;
112
113 fields
114
115     mybox3d   : Box   from Bnd;
116     mybox2d   : Box2d from Bnd;
117
118 end SensitiveBox;
119
120
121
122
123
124
125
126
127
128