0024070: OpenGL capped object-level clipping planes
[occt.git] / src / Select3D / Select3D_SensitiveSegment.cdl
... / ...
CommitLineData
1-- Created on: 1995-01-24
2-- Created by: Mister rmi
3-- Copyright (c) 1995-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
21
22
23class SensitiveSegment from Select3D
24inherits SensitiveEntity from Select3D
25
26 ---Purpose: A framework to define sensitive zones along a segment
27 -- One gives the 3D start and end point;
28 -- the maximum number of 2D boxes given
29 -- by this entity may be set by the user
30 -- if the projected segment is
31 -- vertical or horizontal, one needs only 1 box.
32 -- for a pi/4 angle -> MaxNumber 2D boxes
33
34uses
35 Pnt from gp,
36 Pnt2d from gp,
37 Projector from Select3D,
38 Lin from gp,
39 EntityOwner from SelectBasics,
40 ListOfBox2d from SelectBasics,
41 PickArgs from SelectBasics,
42 Array1OfPnt2d from TColgp,
43 Box2d from Bnd,
44 Location from TopLoc,
45 Pnt from Select3D,
46 Pnt2d from Select3D
47
48
49is
50
51
52 Create (OwnerId : EntityOwner from SelectBasics;
53 FirstP,LastP : Pnt from gp;
54 MaxRect : Integer = 1)
55 returns mutable SensitiveSegment;
56 ---Purpose: Constructs the sensitive segment object defined by
57 -- the owner OwnerId, the points FirstP, LastP and the
58 -- maximum number of sensitive bounding boxes MaxRect.
59
60 Set (me:mutable; MaxRect : Integer) is static;
61 ---Purpose: Sets the maximum number of sensitive rectangles MaxRect.
62 ---C++: inline
63
64
65
66 StartPoint (me : mutable ; aPt : Pnt from gp) is static;
67 ---Level: Public
68 ---Purpose: changes the start Point of the Segment;
69 ---C++: inline
70
71
72
73 EndPoint (me : mutable ; aPt : Pnt from gp) is static;
74 ---Level: Public
75 ---Purpose: changes the end point of the segment
76 ---C++: inline
77
78
79 StartPoint (me) returns Pnt from gp is static;
80 ---Level: Public
81 ---Purpose: gives the 3D start Point of the Segment
82 ---C++: inline
83
84
85 EndPoint(me) returns Pnt from gp is static;
86 ---Level: Public
87 ---Purpose: gives the 3D End Point of the Segment
88 ---C++: inline
89
90 StartPoint2d (me) returns Pnt2d from gp is static;
91 ---Level: Public
92 ---Purpose: gives the 3D start Point of the Segment
93 ---C++: inline
94
95
96 EndPoint2d(me) returns Pnt2d from gp is static;
97 ---Level: Public
98 ---Purpose: gives the 3D End Point of the Segment
99 ---C++: inline
100
101 Project (me:mutable;aProjector : Projector from Select3D)
102 is redefined virtual;
103 ---Level: Public
104 ---Purpose: projection of the sensitive primitive in order to
105 -- get 2D boxes for the Sort Algorithm
106
107
108 Areas (me:mutable ; boxes : in out ListOfBox2d from SelectBasics)
109 is redefined static;
110 ---Level: Public
111 ---Purpose: gives the 2D boxes which represent the segment in the
112 -- selection process...
113
114 GetConnected(me:mutable;aLocation: Location from TopLoc)
115 returns SensitiveEntity from Select3D is redefined static;
116
117 Matches (me : mutable;
118 thePickArgs : PickArgs from SelectBasics;
119 theMatchDMin, theMatchDepth : out Real from Standard)
120 returns Boolean is redefined static;
121 ---Level: Public
122 ---Purpose: Checks whether the sensitive entity matches the picking
123 -- detection area (close to the picking line).
124 -- For details please refer to base class declaration.
125
126 Matches (me :mutable;
127 XMin,YMin,XMax,YMax : Real from Standard;
128 aTol: Real from Standard)
129 returns Boolean
130 is static;
131
132 Matches (me :mutable;
133 Polyline:Array1OfPnt2d from TColgp;
134 aBox:Box2d from Bnd;
135 aTol: Real from Standard)
136 returns Boolean
137 is redefined virtual;
138 ---Level: Public
139
140
141 ComputeDepth(me;EyeLine: Lin from gp)
142 returns Real from Standard;
143
144 MaxBoxes(me) returns Integer is redefined static;
145 ---Level: Public
146 ---Purpose:returns <mymaxrect>
147 ---C++: inline
148
149 Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual;
150
151fields
152
153 mymaxrect : Integer;
154 mystart : Pnt from Select3D;
155 myend : Pnt from Select3D;
156
157 myprojstart : Pnt2d from Select3D; -- computed at convert time
158 myprojend : Pnt2d from Select3D; -- computed at convert time
159
160end SensitiveSegment;
161
162
163
164
165
166
167
168