7fd59977 |
1 | -- File: Select3D_SensitiveTriangle.cdl |
2 | -- Created: Wed May 14 16:37:59 1997 |
3 | -- Author: Robert COUBLANC |
4 | -- <rob@robox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1997 |
6 | |
7 | |
8 | class SensitiveTriangle from Select3D |
9 | inherits SensitivePoly from Select3D |
10 | |
11 | ---Purpose: A framework to define selection of triangles in a view. |
12 | -- This comes into play in the detection of meshing and triangulation in surfaces. |
13 | |
14 | uses |
15 | EntityOwner from SelectBasics, |
16 | Projector from Select3D, |
17 | Lin from gp, |
18 | ListOfBox2d from SelectBasics, |
19 | Array1OfPnt2d from TColgp, |
20 | Box2d from Bnd, |
21 | XY from gp, |
22 | Pnt from gp, |
23 | TypeOfSensitivity from Select3D, |
24 | Location from TopLoc |
25 | |
26 | is |
27 | Create (OwnerId : EntityOwner from SelectBasics; |
28 | P1,P2,P3 : Pnt from gp; |
29 | Sensitivity : TypeOfSensitivity = Select3D_TOS_INTERIOR) |
30 | returns mutable SensitiveTriangle; |
31 | ---Level: Public |
32 | ---Purpose: Constructs a sensitive triangle object defined by the |
33 | -- owner OwnerId, the points P1, P2, P3, and the type of sensitivity Sensitivity. |
34 | |
35 | Matches(me :mutable; |
36 | X,Y : Real from Standard; |
37 | aTol: Real from Standard; |
38 | DMin: out Real from Standard) |
39 | returns Boolean |
40 | is redefined virtual; |
41 | |
42 | Matches (me :mutable; |
43 | XMin,YMin,XMax,YMax : Real from Standard; |
44 | aTol: Real from Standard) |
45 | returns Boolean |
46 | is redefined virtual; |
47 | ---Level: Public |
48 | |
49 | Matches (me :mutable; |
50 | Polyline:Array1OfPnt2d from TColgp; |
51 | aBox:Box2d from Bnd; |
52 | aTol: Real from Standard) |
53 | returns Boolean |
54 | is redefined virtual; |
55 | ---Level: Public |
56 | |
57 | |
58 | ComputeDepth(me;EyeLine: Lin from gp) |
59 | returns Real from Standard is redefined static; |
60 | |
61 | |
62 | Points3D(me; P1,P2,P3 : out Pnt from gp) ; |
63 | ---Purpose: Returns the 3D points P1, P2, P3 used at the time of construction. |
64 | Center3D (me) returns Pnt from gp; |
65 | ---Purpose: Returns the center point of the sensitive triangle created at construction time. |
66 | Center2D (me) returns XY from gp; |
67 | ---Purpose: WARNING : the returned Values are the original values |
68 | -- without the stored location (if there's one). |
69 | -- To get the genuine value, One must apply this location |
70 | -- (Method Location() ) |
71 | |
72 | |
73 | |
74 | |
75 | Status(me; |
76 | X,Y : Real from Standard; |
77 | aTol : Real from Standard ; |
78 | Dmin : out Real from Standard) |
79 | returns Integer from Standard; |
80 | |
81 | Status (myclass; |
82 | p0,p1,p2: XY from gp ; |
83 | aPoint : XY from gp ; |
84 | aTol : Real from Standard; |
85 | Dmin : out Real from Standard) returns Integer from Standard; |
86 | ---Purpose: Dmin gives the distance between the cdg and aPoint return |
87 | |
88 | Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual; |
89 | |
90 | |
91 | fields |
92 | mytype : TypeOfSensitivity from Select3D; |
93 | end SensitiveTriangle; |