Commit | Line | Data |
---|---|---|
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. | |
ceae62f0 A |
12 | -- In some cases this class can raise Standard_ConstructionError and |
13 | -- Standard_OutOfRange exceptions. For more details see Select3D_SensitivePoly. | |
7fd59977 | 14 | |
15 | uses | |
16 | EntityOwner from SelectBasics, | |
17 | Projector from Select3D, | |
18 | Lin from gp, | |
19 | ListOfBox2d from SelectBasics, | |
20 | Array1OfPnt from TColgp, | |
21 | HArray1OfPnt from TColgp, | |
22 | Array1OfPnt2d from TColgp, | |
23 | Box2d from Bnd, | |
24 | TypeOfSensitivity from Select3D, | |
ac04d101 SA |
25 | Location from TopLoc, |
26 | SensitiveEntity from Select3D | |
7fd59977 | 27 | |
ceae62f0 A |
28 | raises |
29 | ConstructionError from Standard, | |
30 | OutOfRange from Standard | |
31 | ||
7fd59977 | 32 | is |
33 | ||
34 | Create (OwnerId : EntityOwner from SelectBasics; | |
35 | ThePoints : Array1OfPnt from TColgp; | |
36 | Sensitivity : TypeOfSensitivity = Select3D_TOS_INTERIOR) | |
37 | returns mutable SensitiveFace; | |
38 | ---Level: Public | |
39 | ---Purpose: Constructs a sensitive face object defined by the | |
40 | -- owner OwnerId, the array of points ThePoints, and | |
41 | -- the sensitivity type Sensitivity. | |
42 | -- The array of points is the outer polygon of the geometric face. | |
43 | ||
44 | Create (OwnerId : EntityOwner from SelectBasics; | |
45 | ThePoints : HArray1OfPnt from TColgp; | |
46 | Sensitivity : TypeOfSensitivity = Select3D_TOS_INTERIOR) | |
47 | returns mutable SensitiveFace; | |
48 | ---Level: Public | |
49 | ---Purpose: Constructs a sensitive face object defined by the | |
50 | -- owner OwnerId, the array of points ThePoints, and | |
51 | -- the sensitivity type Sensitivity. | |
52 | -- The array of points is the outer polygon of the geometric face. | |
ac04d101 | 53 | |
7fd59977 | 54 | Matches(me :mutable; |
55 | X,Y : Real from Standard; | |
56 | aTol: Real from Standard; | |
57 | DMin: out Real from Standard) | |
58 | returns Boolean | |
59 | is redefined virtual; | |
60 | ||
61 | Matches (me :mutable; | |
62 | XMin,YMin,XMax,YMax : Real from Standard; | |
63 | aTol: Real from Standard) | |
64 | returns Boolean | |
65 | is redefined virtual; | |
66 | ---Level: Public | |
67 | ||
68 | Matches (me :mutable; | |
69 | Polyline:Array1OfPnt2d from TColgp; | |
70 | aBox:Box2d from Bnd; | |
71 | aTol: Real from Standard) | |
72 | returns Boolean | |
73 | is redefined virtual; | |
74 | ---Level: Public | |
75 | ||
76 | ||
77 | ComputeDepth(me;EyeLine: Lin from gp) | |
78 | returns Real from Standard is redefined virtual; | |
79 | ---Level: Public | |
80 | ---Purpose: Computes the depth values for all 3D points defining this face and returns | |
81 | -- the minimal value among them. | |
82 | -- If the "minimal depth" approach is not suitable and gives wrong detection results | |
83 | -- in some particular case, a custom sensitive face class can be implemented at application level | |
84 | -- that overrides default ComputeDepth() behavior. | |
85 | ||
ac04d101 SA |
86 | Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual; |
87 | ||
88 | GetConnected(me: mutable; theLocation : Location from TopLoc) | |
89 | returns SensitiveEntity from Select3D | |
90 | is redefined virtual; | |
91 | ---Level: Public | |
92 | ---Purpose: Returns the copy of this | |
7fd59977 | 93 | |
94 | ||
95 | fields | |
96 | ||
97 | mytype : TypeOfSensitivity; | |
98 | myautointer : Boolean; | |
99 | myDetectedIndex : Integer from Standard; | |
100 | end SensitiveFace; |