0022819: Redesign of OpenGl driver
[occt.git] / src / Select3D / Select3D_SensitiveFace.cdl
1 -- File:    Select3D_SensitiveFace.cdl
2 -- Created: Fri Mar 24 16:01:23 1995
3 -- Author:  Robert COUBLANC
4 --      <rob@fidox>
5 ---Copyright:    Matra Datavision 1995
6
7
8 class SensitiveFace from Select3D 
9 inherits SensitivePoly from Select3D
10
11     ---Purpose: Sensitive Entity to make a face selectable.
12
13 uses
14     EntityOwner       from SelectBasics,
15     Projector         from Select3D,
16     Lin               from gp,
17     ListOfBox2d       from SelectBasics,
18     Array1OfPnt       from TColgp,
19     HArray1OfPnt      from TColgp,
20     Array1OfPnt2d     from TColgp,
21     Box2d             from Bnd,
22     TypeOfSensitivity from Select3D,
23     Location          from TopLoc, 
24     SensitiveEntity   from Select3D
25
26 is
27
28     Create (OwnerId      : EntityOwner from SelectBasics;
29             ThePoints    : Array1OfPnt from TColgp;
30             Sensitivity  : TypeOfSensitivity = Select3D_TOS_INTERIOR)
31      returns mutable SensitiveFace;
32         ---Level: Public 
33         ---Purpose: Constructs a sensitive face object defined by the
34         -- owner OwnerId, the array of points ThePoints, and
35         -- the sensitivity type Sensitivity.
36         -- The array of points is the outer polygon of the geometric face.
37
38     Create (OwnerId      : EntityOwner from SelectBasics;
39             ThePoints    : HArray1OfPnt from TColgp;
40             Sensitivity  : TypeOfSensitivity = Select3D_TOS_INTERIOR)
41      returns mutable SensitiveFace;
42         ---Level: Public 
43         ---Purpose: Constructs a sensitive face object defined by the
44         -- owner OwnerId, the array of points ThePoints, and
45         -- the sensitivity type Sensitivity.
46         -- The array of points is the outer polygon of the geometric face.
47    
48     Matches(me  :mutable; 
49             X,Y : Real from Standard;
50             aTol: Real from Standard;
51             DMin: out Real from Standard) 
52     returns Boolean
53     is redefined virtual;
54
55     Matches (me  :mutable; 
56              XMin,YMin,XMax,YMax : Real from Standard;
57              aTol: Real from Standard) 
58     returns Boolean
59     is redefined virtual;
60     ---Level: Public 
61      
62     Matches (me  :mutable; 
63              Polyline:Array1OfPnt2d from TColgp;
64              aBox:Box2d from Bnd;
65              aTol: Real from Standard) 
66     returns Boolean
67     is redefined virtual;
68     ---Level: Public 
69     
70
71     ComputeDepth(me;EyeLine: Lin from gp) 
72     returns Real from Standard is redefined virtual;
73     ---Level: Public
74     ---Purpose: Computes the depth values for all 3D points defining this face and returns
75     -- the minimal value among them. 
76     -- If the "minimal depth" approach is not suitable and gives wrong detection results
77     -- in some particular case, a custom sensitive face class can be implemented at application level
78     -- that overrides default ComputeDepth() behavior.
79
80     Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual; 
81
82     GetConnected(me: mutable; theLocation : Location from TopLoc) 
83     returns SensitiveEntity from Select3D 
84     is redefined virtual; 
85         ---Level: Public 
86         ---Purpose: Returns the copy of this
87
88
89 fields
90
91     mytype          : TypeOfSensitivity;
92     myautointer     : Boolean;
93     myDetectedIndex : Integer from Standard;
94 end SensitiveFace;