7fd59977 |
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 | |
25 | is |
26 | |
27 | Create (OwnerId : EntityOwner from SelectBasics; |
28 | ThePoints : Array1OfPnt from TColgp; |
29 | Sensitivity : TypeOfSensitivity = Select3D_TOS_INTERIOR) |
30 | returns mutable SensitiveFace; |
31 | ---Level: Public |
32 | ---Purpose: Constructs a sensitive face object defined by the |
33 | -- owner OwnerId, the array of points ThePoints, and |
34 | -- the sensitivity type Sensitivity. |
35 | -- The array of points is the outer polygon of the geometric face. |
36 | |
37 | Create (OwnerId : EntityOwner from SelectBasics; |
38 | ThePoints : HArray1OfPnt from TColgp; |
39 | Sensitivity : TypeOfSensitivity = Select3D_TOS_INTERIOR) |
40 | returns mutable SensitiveFace; |
41 | ---Level: Public |
42 | ---Purpose: Constructs a sensitive face object defined by the |
43 | -- owner OwnerId, the array of points ThePoints, and |
44 | -- the sensitivity type Sensitivity. |
45 | -- The array of points is the outer polygon of the geometric face. |
46 | |
47 | Matches(me :mutable; |
48 | X,Y : Real from Standard; |
49 | aTol: Real from Standard; |
50 | DMin: out Real from Standard) |
51 | returns Boolean |
52 | is redefined virtual; |
53 | |
54 | Matches (me :mutable; |
55 | XMin,YMin,XMax,YMax : Real from Standard; |
56 | aTol: Real from Standard) |
57 | returns Boolean |
58 | is redefined virtual; |
59 | ---Level: Public |
60 | |
61 | Matches (me :mutable; |
62 | Polyline:Array1OfPnt2d from TColgp; |
63 | aBox:Box2d from Bnd; |
64 | aTol: Real from Standard) |
65 | returns Boolean |
66 | is redefined virtual; |
67 | ---Level: Public |
68 | |
69 | |
70 | ComputeDepth(me;EyeLine: Lin from gp) |
71 | returns Real from Standard is redefined virtual; |
72 | ---Level: Public |
73 | ---Purpose: Computes the depth values for all 3D points defining this face and returns |
74 | -- the minimal value among them. |
75 | -- If the "minimal depth" approach is not suitable and gives wrong detection results |
76 | -- in some particular case, a custom sensitive face class can be implemented at application level |
77 | -- that overrides default ComputeDepth() behavior. |
78 | |
79 | Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual; |
80 | |
81 | |
82 | fields |
83 | |
84 | mytype : TypeOfSensitivity; |
85 | myautointer : Boolean; |
86 | myDetectedIndex : Integer from Standard; |
87 | end SensitiveFace; |