e92cacba211d3d69cb3635f30df69980a1335ae2
[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-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 SensitiveBox   from Select3D 
18 inherits SensitiveEntity from Select3D
19
20         ---Purpose: A framework to define selection by a sensitive box.         
21
22 uses
23     Pnt              from gp,
24     Pnt2d            from gp,
25     Box              from Bnd,
26     Box2d            from Bnd,
27     Projector        from Select3D,
28     Lin              from gp,
29     EntityOwner      from SelectBasics,
30     ListOfBox2d      from SelectBasics,
31     PickArgs         from SelectBasics,
32     Array1OfPnt2d    from TColgp,
33     Location         from TopLoc
34
35 is
36
37
38     Create (OwnerId      : EntityOwner from SelectBasics;
39             BoundingBox  : Box from Bnd)
40     returns SensitiveBox;
41         ---Purpose: Constructs a sensitive box object defined by the
42         -- owner OwnerId, and the bounding box BoundingBox.
43     Create (OwnerId         : EntityOwner from SelectBasics;
44             XMin,YMin,ZMin,
45             XMax,YMax,ZMax  : Real)
46     returns SensitiveBox;
47         ---     Purpose: Constructs a sensitive box object defined by the
48         -- owner OwnerId, and the coordinates Xmin, YMin, ZMin, XMax, YMax, ZMax.
49         -- Xmin, YMin and ZMin define the minimum point in
50         -- the front lower left hand corner of the box,
51         -- and   XMax, YMax   and ZMax define the maximum
52         -- point in the back upper right hand corner of the box.     
53             
54     Project (me:mutable;aProjector : Projector from Select3D) 
55     is redefined static;
56         ---Level: Public 
57         ---Purpose: projection of the sensitive primitive in order to
58         --          get 2D boxes for the Sort Algorithm
59     
60     Areas   (me:mutable ; boxes : in out ListOfBox2d from SelectBasics) 
61     is redefined static;
62         ---Level: Public 
63         ---Purpose: gives the 2D boxes which represent the Box in the 
64         --          selection process...
65
66     GetConnected(me:mutable;aLocation: Location from TopLoc)
67     returns SensitiveEntity from Select3D is redefined static;
68
69     Matches (me : mutable;
70              thePickArgs : PickArgs from SelectBasics;
71              theMatchDMin, theMatchDepth : out Real from Standard)
72     returns Boolean is redefined static;
73     ---Level: Public
74     ---Purpose: Checks whether the sensitive entity matches the picking
75     -- detection area (close to the picking line).
76     -- For details please refer to base class declaration.
77
78     Matches (me  :mutable; 
79              XMin,YMin,XMax,YMax : Real from Standard;
80              aTol: Real from Standard)
81     returns Boolean is redefined static;
82      
83     Matches (me  :mutable; 
84              Polyline:Array1OfPnt2d from TColgp;
85              aBox:Box2d from Bnd;
86              aTol: Real from Standard) 
87     returns Boolean
88     is redefined virtual;
89         ---Level: Public 
90     
91    
92     ComputeDepth(me;EyeLine: Lin from gp) 
93     returns Real from Standard;
94
95     Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual;
96
97     Box(me) returns Box from Bnd;
98     ---Purpose: Returns the sensitive 3D box used at the time of construction.
99     ---C++: inline
100     ---C++: return const &
101
102
103     ProjectBox(me:mutable;aPrj: Projector from Select3D;aBox:Box from Bnd)
104     is static private;
105
106 fields
107
108     mybox3d   : Box   from Bnd;
109     mybox2d   : Box2d from Bnd;
110
111 end SensitiveBox;
112
113
114
115
116
117
118
119
120
121