Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1996-12-18 |
2 | -- Created by: Robert COUBLANC | |
3 | -- Copyright (c) 1996-1999 Matra Datavision | |
973c2be1 | 4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 5 | -- |
973c2be1 | 6 | -- This file is part of Open CASCADE Technology software library. |
b311480e | 7 | -- |
d5f74e42 | 8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published | |
973c2be1 | 10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT | |
12 | -- distribution for complete text of the license and disclaimer of any warranty. | |
b311480e | 13 | -- |
973c2be1 | 14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. | |
b311480e | 16 | |
7fd59977 | 17 | --Modified by |
18 | -- rob : Dec 17 1997 -> Update Method Added + Use in Deviation Angle... | |
7fd59977 | 19 | -- rob : Feb 05 1998 -> UpdateOnlySelection, UpdateOnlyPrs |
7fd59977 | 20 | -- Apr 02 1998 -> Select Methods has been added a boolean updateviewer. |
21 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible i | |
22 | -- Quantity_Color instead the restricted NameOfColor. | |
23 | -- Add SetCurrentFacingModel() methods | |
7fd59977 | 24 | -- GG : IMP140200 Add SetSelectedAspect() method |
25 | -- GG : 25/05/00 BUC60688 Add SetSensitivity() methods | |
26 | -- VSV : 22/05/01 Add Selection by polygon | |
27 | -- SAV : Add DisplayFromCollector() method | |
7fd59977 | 28 | -- ZSV : IMP160701 Add InitDetected(),MoreDetected(),NextDetected(), |
29 | -- DetectedCurrentShape(),DetectedCurrentObject() | |
30 | -- methods | |
31 | -- GG : IMP051001 Add SetZDetection() and ZDetection() methods | |
32 | -- SAV : OCC172 : Delete() redefined to remove selection objects from | |
33 | -- the static map. | |
34 | -- SAN : OCC4895 22/03/04 High-level interface for controlling polygon offsets | |
7fd59977 | 35 | -- SLN : SetToHilightSelected method added |
36 | ||
7fd59977 | 37 | |
38 | ||
39 | class InteractiveContext from AIS inherits TShared from MMgt | |
40 | ||
41 | ---Purpose: The Interactive Context allows you to manage | |
42 | -- graphic behavior and selection of Interactive Objects | |
43 | -- in one or more viewers. Class methods make this | |
44 | -- highly transparent. | |
45 | -- It is essential to remember that an Interactive Object | |
46 | -- which is already known by the Interactive Context | |
47 | -- must be modified using Context methods. You can | |
48 | -- only directly call the methods available for an | |
49 | -- Interactive Object if it has not been loaded into an | |
50 | -- Interactive Context. | |
51 | -- You must distinguish two states in the Interactive Context: | |
52 | -- - No Open Local Context, also known as the Neutral Point. | |
53 | -- - One or several open local contexts, each | |
54 | -- representing a temporary state of selection and presentation. | |
55 | -- Some methods can only be used in open Local | |
56 | -- Context; others in closed Local Context; others do | |
57 | -- not have the same behavior in one state as in the other. | |
58 | -- The possiblities of use for local contexts are | |
59 | -- numerous depending on the type of operation that | |
60 | -- you want to perform, for example: | |
61 | -- - working on all visualized interactive objects, | |
62 | -- - working on only a few objects, | |
63 | -- - working on a single object. | |
64 | -- 1. When you want ot work on one type of entity, you | |
65 | -- should open a local context with the option | |
66 | -- UseDisplayedObjects set to false. DisplayedObjects | |
67 | -- allows you to recover the visualized Interactive | |
68 | -- Objects which have a given Type and | |
69 | -- Signature from Neutral Point. | |
70 | -- 2. You must keep in mind the fact that when you open | |
71 | -- a Local Context with default options: | |
72 | -- - The Interactive Objects visualized at Neutral Point | |
73 | -- are activated with their default selection mode. You | |
74 | -- must deactivate those which you do not want ot use. | |
75 | -- - The Shape type Interactive Objects are | |
76 | -- automatically decomposed into sub-shapes when | |
77 | -- standard activation modes are launched. | |
78 | -- - The "temporary" Interactive Objects present in the | |
79 | -- Local Contexts are not automatically taken into | |
80 | -- account. You have to load them manually if you | |
81 | -- want to use them. | |
82 | -- - The stages could be the following: | |
83 | -- - Open a Local Context with the right options; | |
84 | -- - Load/Visualize the required complementary | |
85 | -- objects with the desired activation modes. | |
86 | -- - Activate Standard modes if necessary | |
87 | -- - Create its filters and add them to the Local Context | |
88 | -- - Detect/Select/recover the desired entities | |
89 | -- - Close the Local Context with the adequate index. | |
90 | -- - It is useful to create an interactive editor, to which | |
91 | -- you pass the Interactive Context. This will take care | |
92 | -- of setting up the different contexts of | |
93 | -- selection/presentation according to the operation | |
94 | -- which you want to perform. | |
95 | ||
96 | uses | |
97 | Address from Standard, | |
98 | Viewer from V3d, | |
99 | View from V3d, | |
100 | NameOfColor from Quantity, | |
101 | Color from Quantity, | |
102 | Ratio from Quantity, | |
103 | Drawer from Prs3d, | |
104 | ExtendedString from TCollection, | |
105 | AsciiString from TCollection, | |
106 | Shape from TopoDS, | |
107 | SelectionManager from SelectMgr, | |
108 | PresentationManager3d from PrsMgr, | |
109 | ViewerSelector3d from StdSelect, | |
3c982548 | 110 | SensitivityMode from StdSelect, |
7fd59977 | 111 | MapOfInteractive from AIS, |
112 | InteractiveObject from AIS, | |
113 | DisplayMode from AIS, | |
114 | Drawer from AIS, | |
115 | NameOfMaterial from Graphic3d, | |
116 | --NameOfPhysicalMaterial from Graphic3d, | |
117 | Filter from SelectMgr, | |
118 | ListOfFilter from SelectMgr, | |
119 | OrFilter from SelectMgr, | |
120 | IndexedMapOfOwner from SelectMgr, | |
121 | ShapeEnum from TopAbs, | |
122 | ListOfInteractive from AIS, | |
123 | SequenceOfInteractive from AIS, | |
124 | ListOfInteger from TColStd, | |
125 | DataMapOfIOStatus from AIS, | |
126 | LocalContext from AIS, | |
127 | DisplayStatus from AIS, | |
128 | DataMapOfILC from AIS, | |
129 | ClearMode from AIS, | |
130 | KindOfInteractive from AIS, | |
131 | TypeOfIso from AIS, | |
132 | StatusOfDetection from AIS, | |
133 | StatusOfPick from AIS, | |
134 | LineAspect from Prs3d, | |
135 | BasicAspect from Prs3d, | |
136 | Location from TopLoc, | |
137 | EntityOwner from SelectMgr, | |
138 | TypeOfFacingModel from Aspect, | |
7fd59977 | 139 | Array1OfPnt2d from TColgp, |
140 | Transformation from Geom | |
141 | ||
142 | is | |
143 | ||
144 | Create(MainViewer:Viewer from V3d) | |
145 | returns mutable InteractiveContext from AIS; | |
146 | ---Purpose: | |
147 | -- Constructs the interactive context object defined by | |
148 | -- the principal viewer MainViewer. | |
7fd59977 | 149 | |
150 | Delete(me) is redefined; | |
151 | ||
7fd59977 | 152 | ---Category: General DISPLAY SERVICES |
153 | SetAutoActivateSelection( me: mutable; Auto : Boolean from Standard ); | |
154 | GetAutoActivateSelection( me ) returns Boolean from Standard; | |
155 | ||
156 | ||
157 | Display(me : mutable; | |
158 | anIobj : InteractiveObject from AIS; | |
159 | updateviewer : Boolean from Standard = Standard_True); | |
160 | ---Purpose: Controls the choice between the using the display | |
161 | -- and selection modes of open local context which you | |
162 | -- have defined and activating those available by default. | |
163 | -- If a local context is open and if updateviewer equals | |
164 | -- Standard_False, the Interactive Object anIobj is | |
165 | -- displayed in the default active mode. This will be the | |
166 | -- object's default display mode, if there is one. | |
167 | -- Otherwise, it will be the context mode. The Interactive | |
168 | -- Object's default selection mode is activated. In | |
169 | -- general, this is 0. | |
170 | -- This syntax has the same behavior as local context, | |
171 | -- open or closed. If you want to view the object in open | |
172 | -- local context without selection, use the syntax below, | |
173 | -- setting aSelectionMode to -1. | |
174 | ||
175 | Display(me : mutable; | |
176 | anIobj : InteractiveObject from AIS; | |
177 | amode : Integer from Standard ; | |
178 | aSelectionMode : Integer from Standard ; | |
179 | updateviewer : Boolean from Standard = Standard_True; | |
180 | allowdecomposition : Boolean from Standard = Standard_True); | |
181 | ---Purpose: Controls the choice between the using the display | |
182 | -- and selection modes of open local context which you | |
183 | -- have defined and activating those available by default. | |
184 | -- If no Local Context is opened. and the Interactive | |
185 | -- Object aniobj has no display mode of its own, the | |
186 | -- default display mode, 0, is used. Likewise, if aniobj | |
187 | -- has no selection mode of its own, the default one, 0, is used. | |
188 | -- If a local context is open and if updateviewer equals | |
189 | -- Standard_False, the presentation of the Interactive | |
190 | -- Object activates the selection mode; the object is | |
191 | -- displayed but no viewer will be updated. | |
192 | -- If aSelectionMode equals -1, anIobj will not be | |
193 | -- activated: it will be displayed but will not be selectable. | |
194 | -- Use this if you want to view the object in open local | |
195 | -- context without selection. Note: This option is only | |
196 | -- available in Local Context. | |
197 | -- If allowDecomposition equals true, anIObj can have | |
198 | -- subshapes detected by selection mechanisms. anIObj | |
199 | -- must be able to give a shape selection modes which | |
200 | -- fit the AIS_Shape selection modes: | |
201 | -- - vertices: 1 | |
202 | -- - edges: 2 | |
203 | -- - wires: 3. | |
204 | ||
205 | Load(me:mutable; | |
206 | aniobj : InteractiveObject from AIS; | |
207 | SelectionMode : Integer from Standard = -1; | |
208 | AllowDecomp : Boolean from Standard = Standard_False); | |
209 | ---Purpose: Allows you to load the Interactive Object aniobj | |
210 | -- with a given selection mode SelectionMode, and/or | |
211 | -- with the desired decomposition option, whether the | |
212 | -- object is visualized or not. If AllowDecomp = | |
213 | -- Standard_True and, if the interactive object is of | |
214 | -- the "Shape" type, these "standard" selection | |
215 | -- modes will be automatically activated as a function | |
216 | -- of the modes present in the Local Context. | |
217 | -- The loaded objects will be selectable but | |
218 | -- displayable in highlighting only when detected by the Selector. | |
219 | -- This method is available only when Local Contexts are open. | |
220 | ||
221 | ||
222 | Erase(me : mutable; | |
223 | aniobj : InteractiveObject from AIS; | |
eb4320f2 | 224 | updateviewer : Boolean from Standard = Standard_True); |
225 | ---Purpose: Hides the object. The object's presentations are simply | |
226 | -- flagged as invisible and therefore excluded from redrawing. | |
227 | -- To show hidden objects, use Display(). | |
228 | ||
229 | EraseAll (me : mutable; | |
230 | updateviewer: Boolean from Standard = Standard_True); | |
231 | ---Purpose: Hides all objects. The object's presentations are simply | |
232 | -- flagged as invisible and therefore excluded from redrawing. | |
233 | -- To show all hidden objects, use DisplayAll(). | |
234 | ||
235 | DisplayAll(me : mutable; | |
236 | updateviewer: Boolean from Standard = Standard_True); | |
237 | ---Purpose: Displays all hidden objects. | |
238 | ||
239 | EraseSelected(me: mutable; | |
240 | updateviewer: Boolean from Standard = Standard_True); | |
7fd59977 | 241 | ---Purpose: |
eb4320f2 | 242 | -- Hides selected objects. The object's presentations are simply |
243 | -- flagged as invisible and therefore excluded from redrawing. | |
244 | -- To show hidden objects, use Display(). | |
7fd59977 | 245 | |
246 | DisplaySelected(me:mutable;updateviewer:Boolean from Standard = Standard_True); | |
247 | ---Purpose: Displays selected objects if a local context is open. | |
248 | -- Displays current objects if there is no active local context. | |
249 | -- Objects selected when there is no open local context | |
250 | -- are called current objects; those selected in open | |
251 | -- local context, selected objects. | |
252 | -- If a local context is open and if updateviewer equals | |
253 | -- Standard_False, the presentation of the Interactive | |
254 | -- Object activates the selection mode; the object is | |
255 | -- displayed but no viewer will be updated. | |
256 | ||
257 | ||
258 | KeepTemporary(me : mutable; | |
259 | anIObj : InteractiveObject from AIS; | |
260 | InWhichLocal: Integer from Standard = -1) | |
261 | returns Boolean from Standard; | |
262 | ---Purpose: Changes the status of a temporary object. It will be | |
263 | -- kept at the neutral point, i.e. put in the list of | |
264 | -- displayed objects along withwith its temporary | |
265 | -- attributes. These include display mode and | |
266 | -- selection mode, for example. | |
267 | -- Returns true if done. | |
268 | -- inWhichLocal gives the local context in which anIObj | |
269 | -- is displayed. By default, the index -1 refers to the last | |
270 | -- Local Context opened. | |
271 | ||
272 | Clear(me : mutable; | |
273 | aniobj : InteractiveObject from AIS; | |
274 | updateviewer : Boolean from Standard = Standard_True); | |
275 | ---Purpose: Removes the interactive object aniobj from all viewers. | |
276 | -- If a local context is open and if updateviewer equals | |
277 | -- Standard_False, the presentation of the Interactive | |
278 | -- Object activates the selection mode; the object is | |
279 | -- displayed but no viewer will be updated. | |
280 | ||
281 | ClearPrs( me :mutable; | |
282 | aniobj : InteractiveObject from AIS; | |
283 | aMode : Integer from Standard = 0; | |
284 | updateviewer : Boolean from Standard = Standard_True); | |
285 | ---Purpose: Empties the graphic presentation of the mode | |
286 | -- indexed by aMode. | |
287 | -- If a local context is open and if updateviewer equals | |
288 | -- Standard_False, the presentation of the Interactive | |
289 | -- Object activates the selection mode; the object is | |
290 | -- displayed but no viewer will be updated. | |
291 | -- Warning | |
292 | -- Removes anIobj. anIobj is still active if it was | |
293 | -- previously activated. | |
294 | ||
295 | Remove(me:mutable; | |
296 | aniobj : InteractiveObject from AIS; | |
297 | updateviewer : Boolean from Standard = Standard_True); | |
298 | ---Purpose: Removes aniobj from every viewer. aniobj is no | |
299 | -- longer referenced in the Context. | |
300 | -- If a local context is open and if updateviewer equals | |
301 | -- Standard_False, the presentation of the Interactive | |
302 | -- Object activates the selection mode; the object is | |
303 | -- displayed but no viewer will be updated. | |
304 | ||
305 | RemoveAll(me:mutable; | |
306 | updateviewer : Boolean from Standard = Standard_True); | |
307 | ---Purpose: Removes all the objects from all opened Local Contexts | |
308 | -- and from the Neutral Point | |
309 | ||
310 | ||
311 | Hilight(me:mutable; | |
312 | aniobj : InteractiveObject from AIS; | |
313 | updateviewer: Boolean from Standard = Standard_True); | |
314 | ---Purpose: | |
315 | -- Updates the display in the viewer to take dynamic | |
316 | -- detection into account. On dynamic detection by the | |
317 | -- mouse cursor, sensitive primitives are highlighted. | |
318 | -- The highlight color of entities detected by mouse | |
319 | -- movement is white by default. | |
320 | -- If a local context is open and if updateviewer equals | |
321 | -- Standard_False, the presentation of the Interactive | |
322 | -- Object activates the selection mode; the object is | |
323 | -- displayed but no viewer will be updated. | |
324 | ||
325 | HilightWithColor(me:mutable; | |
326 | aniobj :InteractiveObject from AIS; | |
327 | aCol : NameOfColor from Quantity; | |
328 | updateviewer: Boolean from Standard = Standard_True); | |
329 | ---Purpose: | |
330 | -- Changes the color of all the lines of the object in view, | |
331 | -- aniobj. It paints these lines the color passed as the | |
332 | -- argument, aCol. | |
333 | -- If a local context is open and if updateviewer equals | |
334 | -- Standard_False, the presentation of the Interactive | |
335 | -- Object activates the selection mode; the object is | |
336 | -- displayed but no viewer will be updated. | |
337 | ||
338 | Unhilight(me:mutable; | |
339 | aniobj : InteractiveObject from AIS; | |
340 | updateviewer: Boolean from Standard = Standard_True); | |
341 | ---Purpose: | |
342 | -- Removes hilighting from the entity aniobj. Updates the viewer. | |
343 | -- If a local context is open and if updateviewer equals | |
344 | -- Standard_False, the presentation of the Interactive | |
345 | -- Object activates the selection mode; the object is | |
346 | -- displayed but no viewer will be updated. | |
347 | ||
348 | SetDisplayPriority(me:mutable; | |
349 | anIobj: InteractiveObject from AIS; | |
350 | aPriority : Integer from Standard); | |
351 | ---Purpose: Sets the display priority aPriority of the seen parts | |
352 | -- presentation of the entity anIobj. | |
353 | ||
59f45b7c | 354 | SetZLayer( me : mutable; |
355 | theIObj : InteractiveObject from AIS; | |
356 | theLayerId : Integer from Standard ); | |
357 | ---Purpose: Set Z layer id for interactive object. The layer can be | |
358 | -- specified for displayed object only. The Z layers can be used to display | |
359 | -- temporarily presentations of some object in front of the other objects | |
360 | -- in the scene. The ids for Z layers are generated by V3d_Viewer. | |
361 | -- Note that Z layers differ from under-/overlayer in V3d_View: | |
362 | -- under-/overlayer are intended for specific 2D drawings that appear | |
363 | -- behind/in front of all 3D presentations, while SetZLayer() method | |
364 | -- applies to regular 3D presentations and does not imply any specific | |
365 | -- drawing methods. | |
366 | ||
367 | GetZLayer( me; | |
368 | theIObj : InteractiveObject from AIS ) | |
369 | returns Integer from Standard; | |
370 | ---Purpose: Get Z layer id set for displayed interactive object. | |
371 | -- If the object doesn't exists in context or has no computed presentations, | |
372 | -- the method returns -1. | |
373 | ||
7fd59977 | 374 | Redisplay(me : mutable; |
375 | aniobj : InteractiveObject from AIS; | |
376 | updateviewer : Boolean from Standard = Standard_True; | |
377 | allmodes : Boolean from Standard = Standard_False); | |
378 | ---Purpose: Recomputes the seen parts presentation of the entity | |
379 | -- aniobj. If allmodes equals true, all presentations are | |
380 | -- present in the object even if unseen. | |
381 | -- If a local context is open and if updateviewer equals | |
382 | -- Standard_False, the presentation of the Interactive | |
383 | -- Object activates the selection mode; the object is | |
384 | -- displayed but no viewer will be updated. | |
385 | ||
386 | Redisplay(me : mutable; | |
387 | aTypeOfObject: KindOfInteractive from AIS; | |
388 | Signature : Integer from Standard =-1; | |
389 | updateviewer : Boolean from Standard = Standard_True); | |
390 | ---Purpose: Recomputes the Prs/Selection of displayed objects of | |
391 | -- a given type and a given signature. | |
392 | -- if signature = -1 doesnt take signature criterion. | |
393 | ||
394 | ||
395 | RecomputePrsOnly(me:mutable; | |
396 | anIobj : InteractiveObject from AIS; | |
397 | updateviewer : Boolean from Standard = Standard_True; | |
398 | allmodes : Boolean from Standard = Standard_False); | |
399 | ---Purpose: Recomputes the displayed presentations, flags the others | |
400 | -- Doesn't update presentations | |
401 | ||
402 | ||
403 | ||
404 | RecomputeSelectionOnly(me:mutable; | |
405 | anIObj : InteractiveObject from AIS); | |
406 | ---Purpose: Recomputes the active selections, flags the others | |
407 | -- Doesn't update presentations | |
408 | ||
f3889691 | 409 | Update (me : mutable; |
410 | theIObj : InteractiveObject from AIS; | |
411 | theUpdateViewer : Boolean from Standard = Standard_True); | |
412 | ---Purpose: Updates displayed interactive object by checking and | |
413 | -- recomputing its flagged as "to be recomputed" presentation | |
414 | -- and selection structures. This method does not force any | |
415 | -- recomputation on its own. The method recomputes selections | |
416 | -- even if they are loaded without activation in particular selector. | |
7fd59977 | 417 | |
418 | SetDisplayMode(me : mutable; | |
419 | aniobj : InteractiveObject from AIS; | |
420 | aMode : Integer from Standard; | |
421 | updateviewer: Boolean from Standard = Standard_True); | |
422 | ||
423 | ---Purpose: | |
424 | -- Sets the display mode of seen Interactive Objects. | |
425 | -- aMode provides the display mode index of the entity aniobj. | |
426 | -- If updateviewer equals Standard_True, the | |
427 | -- predominant mode aMode will overule the context mode. | |
428 | -- If a local context is open and if updateviewer equals | |
429 | -- Standard_False, the presentation of the Interactive | |
430 | -- Object returns to the default selection mode; the | |
431 | -- object is displayed but no viewer will be updated. | |
432 | -- Note that display mode 3 is only used if you have an | |
433 | -- AIS_Textured Shape. | |
434 | ||
435 | ||
436 | UnsetDisplayMode(me : mutable; | |
437 | aniobj : InteractiveObject from AIS; | |
438 | updateviewer: Boolean from Standard = Standard_True); | |
439 | ---Purpose: | |
440 | -- Unsets the display mode of seen Interactive Objects. | |
441 | -- aMode provides the display mode index of the entity aniobj. | |
442 | -- If updateviewer equals Standard_True, the | |
443 | -- predominant mode aMode will overule the context mode. | |
444 | -- If a local context is open and if updateviewer equals | |
445 | -- Standard_False, the presentation of the Interactive | |
446 | -- Object returns to the default selection mode; the | |
447 | -- object is displayed but no viewer will be updated. | |
448 | SetSelectionMode(me:mutable; | |
449 | aniobj:InteractiveObject from AIS; | |
450 | aMode :Integer from Standard); | |
451 | ---Purpose: | |
452 | -- Sets the selection mode of Interactive Objects. | |
453 | -- aMode provides the selection mode index of the entity aniobj. | |
454 | UnsetSelectionMode(me : mutable; | |
455 | aniobj : InteractiveObject from AIS); | |
456 | ---Purpose: | |
457 | -- Removes selection mode from Interactive Objects. | |
458 | -- aMode provides the selection mode index of the entity aniobj. | |
459 | ||
3c982548 | 460 | SetSensitivityMode(me : mutable; |
461 | aMode : SensitivityMode from StdSelect) is static; | |
462 | ---Level: Public | |
463 | ---Purpose: Sets the selection sensitivity mode. SM_WINDOW mode | |
464 | -- uses the specified pixel tolerance to compute the sensitivity | |
465 | -- value, SM_VIEW mode allows to define the sensitivity manually. | |
466 | ||
467 | SensitivityMode(me) returns SensitivityMode from StdSelect; | |
468 | ---Level: Public | |
469 | ---Purpose: Returns the selection sensitivity mode. | |
470 | ||
7fd59977 | 471 | SetSensitivity(me:mutable; |
472 | aPrecision: Real from Standard); | |
473 | ---Level: Public | |
474 | ---Purpose: Sets the sensitivity aPrecision | |
475 | -- according to the view size for the current context or local | |
476 | -- context if any is activated. | |
477 | -- Sets the sensitivity aPrecision in pixels for the current context | |
478 | -- or local context if any is activated. By default, this | |
479 | -- sensitivity is equal to 4 pixels. | |
480 | -- When a local context is open, the defined sensitivity applies to | |
481 | -- this local context instead of the main context. | |
482 | ||
3c982548 | 483 | Sensitivity (me) returns Real from Standard; |
484 | ---Level: Public | |
485 | ---Purpose: Returns the selection sensitivity value. | |
486 | ||
487 | SetPixelTolerance(me:mutable; | |
7fd59977 | 488 | aPrecision: Integer from Standard = 4); |
489 | ---Level: Public | |
490 | ---Purpose: Define the current selection pixel sensitivity | |
491 | -- for this context or local context if any one is activated. | |
492 | -- Warning: When a local context is open the sensitivity is apply on it | |
493 | -- instead on the main context. | |
494 | ||
3c982548 | 495 | PixelTolerance(me) returns Integer from Standard; |
496 | ---Level: Public | |
497 | ---Purpose: Returns the pixel tolerance. | |
498 | ||
7fd59977 | 499 | ---Category: put locations on objects.... |
500 | -- | |
501 | ||
502 | SetLocation(me:mutable; | |
503 | aniobj : InteractiveObject from AIS; | |
504 | aLocation : Location from TopLoc); | |
505 | ---Purpose: Puts the location aLocation on the initial graphic | |
506 | -- representation and the selection for the entity aniobj. | |
507 | -- In other words, aniobj is visible and selectable at a | |
508 | -- position other than initial position. | |
509 | -- Graphic and selection primitives are not recomputed. | |
510 | -- To clean the view correctly, you must reset the previous location. | |
511 | ||
512 | ResetLocation(me : mutable; | |
513 | aniobj : InteractiveObject from AIS); | |
514 | ---Purpose: Puts the entity aniobj back into its initial position. | |
515 | ||
516 | ||
517 | ||
518 | HasLocation(me; | |
519 | aniobj : InteractiveObject from AIS) | |
520 | returns Boolean from Standard; | |
521 | ---Purpose: | |
522 | -- Returns true if the entity aniobj has a location. | |
523 | ||
524 | Location(me; | |
525 | aniobj : InteractiveObject from AIS) | |
526 | returns Location from TopLoc; | |
527 | ---Purpose: | |
528 | -- Returns the location of the entity aniobj. | |
529 | ---C++: return const& | |
530 | ||
531 | ||
532 | ||
533 | SetCurrentFacingModel(me: mutable; | |
534 | aniobj : InteractiveObject from AIS; | |
535 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE); | |
536 | ---Purpose: change the current facing model apply on polygons for | |
537 | -- SetColor(), SetTransparency(), SetMaterial() methods | |
538 | -- default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is | |
539 | -- applying both on the front and back face. | |
540 | ||
541 | SetColor(me : mutable; | |
542 | aniobj : InteractiveObject from AIS; | |
543 | aColor : NameOfColor from Quantity; | |
544 | updateviewer : Boolean from Standard = Standard_True); | |
545 | ||
546 | SetColor(me : mutable; | |
547 | aniobj : InteractiveObject from AIS; | |
548 | aColor : Color from Quantity; | |
549 | updateviewer : Boolean from Standard = Standard_True); | |
550 | ---Purpose: | |
551 | -- Sets the color of the selected entity. | |
552 | -- If a local context is open and if updateviewer equals | |
553 | -- Standard_False, the presentation of the Interactive | |
554 | -- Object activates the selection mode; the object is | |
555 | -- displayed but no viewer will be updated. | |
556 | ||
557 | UnsetColor(me :mutable; | |
558 | aniobj : InteractiveObject from AIS; | |
559 | updateviewer : Boolean from Standard = Standard_True); | |
560 | --- Purpose: Removes the color selection for the selected entity. | |
561 | -- If a local context is open and if updateviewer equals | |
562 | -- Standard_False, the presentation of the Interactive | |
563 | -- Object activates the selection mode; the object is | |
564 | -- displayed but no viewer will be updated. | |
565 | ||
566 | SetWidth(me:mutable; | |
567 | aniobj : InteractiveObject from AIS; | |
568 | aValue:Real from Standard; | |
569 | updateviewer : Boolean from Standard = Standard_True) is virtual; | |
570 | ---Purpose: | |
571 | -- Sets the width of the entity aniobj. | |
572 | -- If a local context is open and if updateviewer equals | |
573 | -- Standard_False, the presentation of the Interactive | |
574 | -- Object activates the selection mode; the object is | |
575 | -- displayed but no viewer will be updated. | |
576 | ||
577 | UnsetWidth(me:mutable; | |
578 | aniobj : InteractiveObject from AIS; | |
579 | updateviewer : Boolean from Standard = Standard_True) is virtual; | |
580 | ---Purpose: | |
581 | -- Removes the width setting of the entity aniobj. | |
582 | -- If a local context is open and if updateviewer equals | |
583 | -- Standard_False, the presentation of the Interactive | |
584 | -- Object activates the selection mode; the object is | |
585 | -- displayed but no viewer will be updated. | |
586 | ||
587 | SetMaterial(me:mutable; | |
588 | aniobj : InteractiveObject from AIS; | |
589 | aName:NameOfMaterial from Graphic3d; | |
590 | --aName:NameOfPhysicalMaterial from Graphic3d; | |
591 | updateviewer : Boolean from Standard = Standard_True); | |
592 | ---Purpose: | |
593 | -- Provides the type of material setting for the view of | |
594 | -- the entity aniobj. | |
595 | -- The range of settings includes: BRASS, BRONZE, | |
596 | -- GOLD, PEWTER, SILVER, STONE. | |
597 | -- If a local context is open and if updateviewer equals | |
598 | -- Standard_False, the presentation of the Interactive | |
599 | -- Object activates the selection mode; the object is | |
600 | -- displayed but no viewer will be updated. | |
601 | ||
602 | UnsetMaterial(me : mutable; | |
603 | anObj : InteractiveObject from AIS; | |
604 | updateviewer : Boolean from Standard = Standard_True); | |
605 | ---Purpose: | |
606 | -- Removes the type of material setting for viewing the | |
607 | -- entity aniobj. | |
608 | -- If a local context is open and if updateviewer equals | |
609 | -- Standard_False, the presentation of the Interactive | |
610 | -- Object activates the selection mode; the object is | |
611 | -- displayed but no viewer will be updated. | |
612 | ||
613 | SetTransparency(me:mutable; | |
614 | aniobj : InteractiveObject from AIS; | |
615 | aValue : Real from Standard=0.6; | |
616 | updateviewer : Boolean from Standard = Standard_True); | |
617 | ---Purpose: Provides the transparency settings for viewing the | |
618 | -- entity aniobj. The transparency value aValue may be | |
619 | -- between 0.0, opaque, and 1.0, fully transparent. | |
620 | -- If a local context is open and if updateviewer equals | |
621 | -- Standard_False, the presentation of the Interactive | |
622 | -- Object activates the selection mode; the object is | |
623 | -- displayed but no viewer will be updated. | |
624 | ||
625 | UnsetTransparency(me : mutable; | |
626 | aniobj : InteractiveObject from AIS; | |
627 | updateviewer : Boolean from Standard = Standard_True); | |
628 | ---Purpose: | |
629 | -- Removes the transparency settings for viewing the | |
630 | -- entity aniobj. The transparency value aValue may be | |
631 | -- between 0.0, opaque, and 1.0, fully transparent. | |
632 | -- If a local context is open and if updateviewer equals | |
633 | -- Standard_False, the presentation of the Interactive | |
634 | -- Object activates the selection mode; the object is | |
635 | -- displayed but no viewer will be updated. | |
7fd59977 | 636 | |
637 | SetLocalAttributes(me : mutable; | |
638 | aniobj : InteractiveObject from AIS; | |
639 | aDrawer : Drawer from AIS; | |
640 | updateviewer : Boolean from Standard = Standard_True); | |
641 | --- Purpose: | |
642 | -- Sets the attributes of the interactive object aniobj by | |
643 | -- plugging the attribute manager aDrawer into the local | |
644 | -- context. The graphic attributes of aDrawer such as | |
645 | -- visualization mode, color, and material, are then used | |
646 | -- to display aniobj. | |
647 | -- If a local context is open and if updateviewer equals | |
648 | -- Standard_False, the presentation of the Interactive | |
649 | -- Object activates the selection mode; the object is | |
650 | -- displayed but no viewer will be updated. | |
651 | ||
652 | UnsetLocalAttributes(me : mutable; | |
653 | anObj : InteractiveObject from AIS; | |
654 | updateviewer : Boolean from Standard = Standard_True); | |
655 | ---Purpose: | |
656 | -- Removes the settings for local attributes of the entity | |
657 | -- anObj and returns to the Neutral Point attributes or | |
658 | -- those of the previous local context. | |
659 | -- If a local context is open and if updateviewer equals | |
660 | -- Standard_False, the presentation of the Interactive | |
661 | -- Object activates the selection mode; the object is | |
662 | -- displayed but no viewer will be updated. | |
663 | ||
664 | ||
665 | SetPolygonOffsets ( me : mutable; | |
666 | anObj : InteractiveObject from AIS; | |
667 | aMode : Integer from Standard; | |
60be1f9b | 668 | aFactor : ShortReal from Standard = 1.0; |
669 | aUnits : ShortReal from Standard = 0.0; | |
7fd59977 | 670 | updateviewer : Boolean from Standard = Standard_True ) is static; |
671 | ---Purpose: Sets up polygon offsets for the given AIS_InteractiveObject. | |
672 | -- It simply calls anObj->SetPolygonOffsets() | |
673 | ||
674 | ||
675 | HasPolygonOffsets ( me; | |
676 | anObj : InteractiveObject from AIS ) | |
677 | returns Boolean from Standard | |
678 | is static; | |
679 | ---Level: Public | |
680 | ---Purpose: simply calls anObj->HasPolygonOffsets() | |
681 | ---Category: Inquire methods | |
682 | ||
683 | PolygonOffsets ( me; | |
684 | anObj : InteractiveObject from AIS; | |
685 | aMode : out Integer from Standard; | |
60be1f9b | 686 | aFactor : out ShortReal from Standard; |
687 | aUnits : out ShortReal from Standard ) is static; | |
7fd59977 | 688 | ---Level: Public |
689 | ---Purpose: Retrieves current polygon offsets settings for <anObj>. | |
690 | ---Category: Inquire methods | |
691 | ||
692 | ||
693 | SetTrihedronSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True); | |
694 | ---Purpose: Sets the size aSize of the trihedron. | |
695 | -- Is used to change the default value 100 mm for | |
696 | -- display of trihedra. | |
697 | -- Use of this function in one of your own interactive | |
698 | -- objects requires a call to the Compute function of the | |
699 | -- new class. This will recalculate the presentation for | |
700 | -- every trihedron displayed. | |
701 | -- If a local context is open and if updateviewer equals | |
702 | -- Standard_False, the presentation of the Interactive | |
703 | -- Object activates the selection mode; the object is | |
704 | -- displayed but no viewer will be updated. | |
705 | ||
706 | TrihedronSize(me) returns Real from Standard; | |
707 | ---Purpose: returns the current value of trihedron size. | |
708 | ||
709 | ||
710 | SetPlaneSize(me:mutable;aSizeX,aSizeY:Real from Standard;updateviewer: Boolean from Standard = Standard_True); | |
711 | ---Purpose: | |
712 | -- Sets the plane size defined by the length in the X | |
713 | -- direction XSize and that in the Y direction YSize. | |
714 | -- If a local context is open and if updateviewer equals | |
715 | -- Standard_False, the presentation of the Interactive | |
716 | -- Object activates the selection mode; the object is | |
717 | -- displayed but no viewer will be updated. | |
718 | ||
719 | SetPlaneSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True); | |
720 | ---Purpose: | |
721 | -- Sets the plane size aSize. | |
722 | -- If a local context is open and if updateviewer equals | |
723 | -- Standard_False, the presentation of the Interactive | |
724 | -- Object activates the selection mode; the object is | |
725 | -- displayed but no viewer will be updated. | |
726 | -- May be used if PlaneSize returns true. | |
727 | ||
728 | PlaneSize(me; XSize,YSize:out Real from Standard) returns Boolean from Standard; | |
729 | ---Purpose: Returns true if the length in the X direction XSize is | |
730 | -- the same as that in the Y direction YSize. | |
731 | ||
732 | DisplayStatus (me; anIobj: InteractiveObject from AIS) | |
733 | returns DisplayStatus from AIS; | |
734 | ---Purpose: Returns the display status of the entity anIobj. | |
735 | -- This will be one of the following: | |
736 | -- - DS_Displayed displayed in main viewer | |
eb4320f2 | 737 | -- - DS_Erased hidden in main viewer |
7fd59977 | 738 | -- - DS_Temporary temporarily displayed |
739 | -- - DS_None nowhere displayed. | |
740 | ||
741 | DisplayedModes (me;aniobj: InteractiveObject from AIS) | |
742 | returns ListOfInteger from TColStd; | |
743 | ---C++: return const & | |
744 | ---Purpose: | |
745 | -- Returns the list of active display modes for the entity aniobj. | |
746 | ||
747 | IsDisplayed(me; anIobj:InteractiveObject from AIS) returns Boolean from Standard; | |
748 | ---Purpose: Returns true if anIobj is displayed in the interactive context. | |
749 | ||
750 | IsDisplayed(me; | |
751 | aniobj: InteractiveObject from AIS; | |
752 | aMode : Integer from Standard) | |
753 | returns Boolean from Standard; | |
754 | ||
755 | IsHilighted(me;aniobj : InteractiveObject from AIS) | |
756 | returns Boolean from Standard; | |
757 | ||
758 | IsHilighted(me; | |
759 | anIobj : InteractiveObject from AIS; | |
760 | WithColor: out Boolean from Standard; | |
761 | theHiCol : out NameOfColor from Quantity) | |
762 | returns Boolean from Standard; | |
763 | ---Purpose: if <anIObj> is hilighted with a specific color | |
764 | -- <WithColor> will be returned TRUE | |
765 | -- <theHiCol> gives the name of the hilightcolor | |
766 | ||
7fd59977 | 767 | DisplayPriority(me;anIobj: InteractiveObject from AIS) |
768 | returns Integer from Standard; | |
769 | ---Purpose: | |
770 | -- Returns the display priority of the entity anIobj. This | |
771 | -- will be display mode of anIobj if it is in the main | |
eb4320f2 | 772 | -- viewer. |
7fd59977 | 773 | |
774 | HasColor(me; aniobj: InteractiveObject from AIS) | |
775 | returns Boolean from Standard; | |
776 | ---Purpose: | |
777 | -- Returns true if a view of the Interactive Object aniobj has color. | |
778 | Color(me;aniobj:InteractiveObject from AIS) | |
779 | returns NameOfColor from Quantity; | |
780 | ||
781 | Color(me; aniobj: InteractiveObject from AIS; | |
782 | acolor: out Color from Quantity); | |
783 | ---Purpose: | |
784 | -- Returns the color Color of the entity aniobj in the interactive context. | |
785 | Width(me; | |
786 | aniobj : InteractiveObject from AIS) | |
787 | returns Real from Standard is virtual; | |
788 | ---Purpose: | |
789 | -- Returns the width of the Interactive Object aniobj in | |
790 | -- the interactive context. | |
791 | ||
792 | Status(me; | |
793 | anObj : InteractiveObject from AIS; | |
794 | astatus : in out ExtendedString from TCollection); | |
795 | ---Purpose: | |
796 | -- Returns the status astatus of the Interactive Context | |
797 | -- for the view of the Interactive Object anObj. | |
798 | ||
799 | UpdateCurrentViewer(me:mutable); | |
800 | ---Purpose: | |
801 | -- Updates the current viewer, the viewer in Neutral Point. | |
802 | -- Objects selected when there is no open local context | |
803 | -- are called current objects; those selected in open | |
804 | -- local context, selected objects. | |
805 | ||
7fd59977 | 806 | ---Category: General Attributes for the session |
807 | ||
808 | DisplayMode(me) returns Integer from Standard; | |
809 | ---C++: inline | |
810 | ---Purpose: Returns the display mode setting. | |
811 | -- Note that mode 3 is only used. | |
812 | ||
813 | HilightColor(me) returns NameOfColor from Quantity; -- dynamic selection | |
814 | ---C++: inline | |
815 | ---Purpose: | |
816 | -- Returns the name of the color used to show | |
817 | -- highlighted entities, that is, entities picked out by the mouse. | |
818 | ||
819 | SelectionColor(me) returns NameOfColor from Quantity; | |
820 | ---C++: inline | |
821 | ---Purpose: | |
822 | -- Returns the name of the color used to show selected entities. | |
823 | -- By default, this is Quantity_NOC_GRAY80. | |
824 | ||
825 | PreSelectionColor(me) returns NameOfColor from Quantity; | |
826 | ---C++: inline | |
827 | ---Purpose: Returns the name of the color used to show preselection. | |
828 | -- By default, this is Quantity_NOC_GREEN. | |
829 | ||
830 | DefaultColor(me) returns NameOfColor from Quantity; | |
831 | ---C++: inline | |
832 | ---Purpose: | |
833 | -- Returns the name of the color used by default. | |
834 | -- By default, this is Quantity_NOC_GOLDENROD. | |
835 | ||
836 | SubIntensityColor(me) returns NameOfColor from Quantity; | |
837 | ---C++: inline | |
838 | ---Purpose: | |
839 | -- Returns the name of the color used to show that an | |
840 | -- object is not currently selected. | |
841 | -- By default, this is Quantity_NOC_GRAY40. | |
842 | ||
843 | SetHilightColor(me:mutable;aHiCol:NameOfColor from Quantity); | |
844 | ---C++: inline | |
845 | ---Purpose: | |
846 | -- Sets the color used to show highlighted entities, that | |
847 | -- is, entities picked by the mouse. | |
848 | -- By default, this is Quantity_NOC_CYAN1. | |
849 | ||
850 | SelectionColor(me:mutable;aCol:NameOfColor from Quantity); | |
851 | ---C++: inline | |
852 | ---Purpose: | |
853 | -- Sets the color used to show selected entities. | |
854 | -- By default, this is Quantity_NOC_GRAY80. | |
855 | ||
856 | SetPreselectionColor(me:mutable;aCol:NameOfColor from Quantity); | |
857 | ---C++: inline | |
858 | ---Purpose: | |
859 | -- Allows you to set the color used to show preselection. | |
860 | -- By default, this is Quantity_NOC_GREEN. | |
861 | -- A preselected entity is one which has been selected | |
862 | -- as the domain of application of a function such as a fillet. | |
863 | ||
864 | SetSubIntensityColor(me:mutable;aCol:NameOfColor from Quantity); | |
865 | ---C++: inline | |
866 | ---Purpose: | |
867 | -- Sets the color used to show that an object is not currently selected. | |
868 | -- By default, this is Quantity_NOC_GRAY40. | |
869 | ||
870 | SetDisplayMode(me:mutable;AMode: DisplayMode from AIS; | |
871 | updateviewer: Boolean from Standard = Standard_True); | |
872 | ---Purpose: | |
873 | -- Sets the display mode of seen Interactive Objects. | |
874 | -- aMode provides the display mode index of the entity aniobj. | |
875 | -- If updateviewer equals Standard_True, the | |
876 | -- predominant mode aMode will overule the context mode. | |
877 | -- If a local context is open and if updateviewer equals | |
878 | -- Standard_False, the presentation of the Interactive | |
879 | -- Object returns to the default selection mode; the | |
880 | -- object is displayed but no viewer will be updated. | |
881 | -- Note that display mode 3 is only used if you have an | |
882 | -- AIS_Textured Shape. | |
883 | ||
884 | ||
885 | SetDeviationCoefficient(me : mutable; | |
886 | aniobj : InteractiveObject from AIS; | |
887 | aCoefficient : Real from Standard ; | |
888 | updateviewer : Boolean from Standard = Standard_True); | |
889 | --- Purpose: | |
890 | -- Sets the deviation coefficient aCoefficient. | |
891 | -- Drawings of curves or patches are made with respect | |
892 | -- to a maximal chordal deviation. A Deviation coefficient | |
893 | -- is used in the shading display mode. The shape is | |
894 | -- seen decomposed into triangles. These are used to | |
895 | -- calculate reflection of light from the surface of the | |
896 | -- object. The triangles are formed from chords of the | |
897 | -- curves in the shape. The deviation coefficient | |
898 | -- aCoefficient gives the highest value of the angle with | |
899 | -- which a chord can deviate from a tangent to a curve. | |
900 | -- If this limit is reached, a new triangle is begun. | |
901 | -- This deviation is absolute and is set through the | |
902 | -- method: SetMaximalChordialDeviation. The default | |
903 | -- value is 0.001. | |
904 | -- In drawing shapes, however, you are allowed to ask | |
905 | -- for a relative deviation. This deviation will be: | |
906 | -- SizeOfObject * DeviationCoefficient. | |
907 | -- default 0.001 | |
908 | ||
909 | SetDeviationAngle(me : mutable; | |
910 | aniobj : InteractiveObject from AIS; | |
911 | anAngle : Real from Standard ; | |
912 | updateviewer : Boolean from Standard = Standard_True); | |
913 | ||
914 | SetAngleAndDeviation(me : mutable; | |
915 | aniobj : InteractiveObject from AIS; | |
916 | anAngle : Real from Standard ; | |
917 | updateviewer : Boolean from Standard = Standard_True); | |
918 | ---Purpose: Calls the AIS_Shape SetAngleAndDeviation to set | |
919 | -- both Angle and Deviation coefficients | |
920 | SetHLRDeviationCoefficient(me : mutable; | |
921 | aniobj : InteractiveObject from AIS; | |
922 | aCoefficient : Real from Standard ; | |
923 | updateviewer : Boolean from Standard = Standard_True); | |
924 | ---Purpose: | |
925 | -- Sets the deviation coefficient aCoefficient for | |
926 | -- removal of hidden lines created by different | |
927 | -- viewpoints in different presentations. The Default value is 0.02. | |
928 | ||
929 | SetHLRDeviationAngle(me : mutable; | |
930 | aniobj : InteractiveObject from AIS; | |
931 | anAngle : Real from Standard ; | |
932 | updateviewer : Boolean from Standard = Standard_True); | |
933 | ||
934 | ||
935 | SetHLRAngleAndDeviation(me : mutable; | |
936 | aniobj : InteractiveObject from AIS; | |
937 | anAngle : Real from Standard ; | |
938 | updateviewer : Boolean from Standard = Standard_True); | |
939 | ---Purpose : Computes a HLRAngle and a | |
940 | -- HLRDeviationCoefficient by means of the angle | |
941 | -- anAngle and sets the corresponding methods in the | |
942 | -- default drawing tool with these values. | |
943 | -- | |
944 | ||
945 | SetDeviationCoefficient(me: mutable; aCoefficient: Real from Standard); | |
946 | ---Purpose: Sets the deviation coefficient aCoefficient. | |
947 | -- Drawings of curves or patches are made with respect | |
948 | -- to a maximal chordal deviation. A Deviation coefficient | |
949 | -- is used in the shading display mode. The shape is | |
950 | -- seen decomposed into triangles. These are used to | |
951 | -- calculate reflection of light from the surface of the | |
952 | -- object. The triangles are formed from chords of the | |
953 | -- curves in the shape. The deviation coefficient | |
954 | -- aCoefficient gives the highest value of the angle with | |
955 | -- which a chord can deviate from a tangent to a curve. | |
956 | -- If this limit is reached, a new triangle is begun. | |
957 | -- This deviation is absolute and is set through the | |
958 | -- method: SetMaximalChordialDeviation. The default | |
959 | -- value is 0.001. | |
960 | -- In drawing shapes, however, you are allowed to ask | |
961 | -- for a relative deviation. This deviation will be: | |
962 | -- SizeOfObject * DeviationCoefficient. | |
963 | -- default 0.001 | |
964 | ||
965 | DeviationCoefficient(me) returns Real from Standard ; | |
966 | ---Purpose: Returns the deviation coefficient. | |
967 | -- Drawings of curves or patches are made with respect | |
968 | -- to a maximal chordal deviation. A Deviation coefficient | |
969 | -- is used in the shading display mode. The shape is | |
970 | -- seen decomposed into triangles. These are used to | |
971 | -- calculate reflection of light from the surface of the | |
972 | -- object. The triangles are formed from chords of the | |
973 | -- curves in the shape. The deviation coefficient gives | |
974 | -- the highest value of the angle with which a chord can | |
975 | -- deviate from a tangent to a curve. If this limit is | |
976 | -- reached, a new triangle is begun. | |
977 | -- This deviation is absolute and is set through | |
978 | -- AIS_Drawer::SetMaximalChordialDeviation. The | |
979 | -- default value is 0.001. | |
980 | -- In drawing shapes, however, you are allowed to ask | |
981 | -- for a relative deviation. This deviation will be: | |
982 | -- SizeOfObject * DeviationCoefficient. | |
983 | ||
984 | SetDeviationAngle(me : mutable; anAngle : Real from Standard) ; | |
985 | ---Purpose: default 6degrees | |
986 | DeviationAngle(me) returns Real from Standard ; | |
987 | ||
988 | SetHLRDeviationCoefficient(me: mutable; aCoefficient: Real from Standard); | |
989 | ---Purpose: Sets the deviation coefficient aCoefficient for | |
990 | -- removal of hidden lines created by different | |
991 | -- viewpoints in different presentations. The Default value is 0.02. | |
992 | HLRDeviationCoefficient(me) returns Real from Standard ; | |
993 | ---Purpose: | |
994 | -- Returns the real number value of the hidden line | |
995 | -- removal deviation coefficient. | |
996 | -- A Deviation coefficient is used in the shading display | |
997 | -- mode. The shape is seen decomposed into triangles. | |
998 | -- These are used to calculate reflection of light from the | |
999 | -- surface of the object. | |
1000 | -- The triangles are formed from chords of the curves in | |
1001 | -- the shape. The deviation coefficient give the highest | |
1002 | -- value of the angle with which a chord can deviate | |
1003 | -- from a tangent to a curve. If this limit is reached, a | |
1004 | -- new triangle is begun. | |
1005 | -- To find the hidden lines, hidden line display mode | |
1006 | -- entails recalculation of the view at each different | |
1007 | -- projector perspective. | |
1008 | -- Because hidden lines entail calculations of more than | |
1009 | -- usual complexity to decompose them into these | |
1010 | -- triangles, a deviation coefficient allowing greater | |
1011 | -- tolerance is used. This increases efficiency in calculation. | |
1012 | -- The Default value is 0.02. | |
1013 | ||
1014 | SetHLRAngle(me: mutable; anAngle: Real from Standard); | |
1015 | ---Purpose: Sets the HLR angle anAngle. | |
1016 | HLRAngle(me) returns Real from Standard | |
1017 | is static; | |
1018 | --- Purpose: | |
1019 | -- Returns the real number value of the deviation angle | |
1020 | -- in hidden line removal views in this interactive context. | |
1021 | -- The default value is 20*PI/180. | |
1022 | ||
1023 | SetHLRAngleAndDeviation(me: mutable; anAngle: Real from Standard); | |
1024 | ---Purpose: compute with anangle a HLRAngle and a HLRDeviationCoefficient | |
1025 | -- and set them in myHLRAngle and in myHLRDeviationCoefficient | |
1026 | -- of myDefaultDrawer ; | |
1027 | -- anAngle is in radian ; ( 1 deg < angle in deg < 20 deg) | |
1028 | ||
1029 | HiddenLineAspect(me) returns mutable LineAspect from Prs3d | |
1030 | ---Purpose: Initializes hidden line aspect in the default drawing tool, or Drawer. | |
1031 | -- The default values are: | |
1032 | -- Color: Quantity_NOC_YELLOW | |
1033 | -- Type of line: Aspect_TOL_DASH | |
1034 | -- Width: 1. | |
1035 | is static; | |
1036 | ||
1037 | SetHiddenLineAspect(me; anAspect: LineAspect from Prs3d) | |
1038 | is static; | |
1039 | --- Purpose: | |
1040 | -- Sets the hidden line aspect anAspect. | |
1041 | -- anAspect defines display attributes for hidden lines in | |
1042 | -- HLR projections. | |
1043 | ||
1044 | DrawHiddenLine(me) returns Boolean from Standard | |
1045 | ---Purpose: returns Standard_True if the hidden lines are to be drawn. | |
1046 | -- By default the hidden lines are not drawn. | |
1047 | is static; | |
1048 | ||
1049 | EnableDrawHiddenLine(me) | |
1050 | ---Purpose: | |
1051 | is static; | |
1052 | ||
1053 | DisableDrawHiddenLine(me) | |
1054 | ---Purpose: | |
1055 | is static; | |
1056 | ||
1057 | ||
1058 | SetIsoNumber(me : mutable; | |
1059 | NbIsos : Integer from Standard; | |
1060 | WhichIsos : TypeOfIso from AIS = AIS_TOI_Both); | |
1061 | ---Purpose: Sets the number of U and V isoparameters displayed. | |
1062 | ||
1063 | IsoNumber(me : mutable; | |
1064 | WhichIsos : TypeOfIso from AIS = AIS_TOI_Both) | |
1065 | returns Integer from Standard; | |
1066 | ---Purpose: Returns the number of U and V isoparameters displayed. | |
1067 | ||
1068 | ||
1069 | IsoOnPlane(me:mutable; SwitchOn :Boolean from Standard); | |
1070 | ---Purpose: Returns True if drawing isoparameters on planes is enabled. | |
1071 | IsoOnPlane(me) returns Boolean from Standard; | |
1072 | ---Purpose: Returns True if drawing isoparameters on planes is enabled. | |
1073 | ||
1074 | ---Purpose: if <forUIsos> = False, | |
1075 | ||
1076 | SetSelectedAspect ( me : mutable; anAspect: any BasicAspect from Prs3d; | |
1077 | globalChange: Boolean from Standard = Standard_True; | |
1078 | updateViewer: Boolean from Standard = Standard_True) | |
1079 | is static; | |
1080 | ---Level: Public | |
1081 | ---Purpose: Sets the graphic basic aspect to the current presentation of | |
1082 | -- ALL selected objects. | |
1083 | -- When <globalChange> is TRUE , the full object presentation | |
1084 | -- is changed. | |
1085 | -- When <globalChange> is FALSE , only the current group | |
1086 | -- of the object presentation is changed. | |
eb4320f2 | 1087 | -- Updates the viewer when <updateViewer> is TRUE |
7fd59977 | 1088 | ---Category: Graphic attributes management |
1089 | ||
1090 | ---Category: GRAPHIC DETECTION / SELECTION | |
1091 | ||
679ecdee | 1092 | MoveTo (me : mutable; |
1093 | theXPix, theYPix : Integer from Standard; | |
1094 | theView : View from V3d; | |
1095 | theToRedrawOnUpdate : Boolean from Standard = Standard_True) | |
7fd59977 | 1096 | returns StatusOfDetection from AIS; |
679ecdee | 1097 | ---Purpose: Relays mouse position in pixels theXPix and theYPix to the interactive context selectors. |
1098 | -- This is done by the view theView passing this position to the main viewer and updating it. | |
1099 | -- Functions in both Neutral Point and local contexts. | |
1100 | -- If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object. | |
7fd59977 | 1101 | |
1102 | HasNextDetected(me) returns Boolean from Standard; | |
1103 | ---Purpose: returns True if other entities were detected in the | |
1104 | -- last mouse detection | |
1105 | ||
679ecdee | 1106 | HilightNextDetected (me : mutable; |
1107 | theView : View from V3d; | |
1108 | theToRedrawImmediate : Boolean from Standard = Standard_True) | |
7fd59977 | 1109 | returns Integer from Standard; |
1110 | ---Purpose: if more than 1 object is detected by the selector, | |
1111 | -- only the "best" owner is hilighted at the mouse position. | |
1112 | -- This Method allows the user to hilight one after another | |
1113 | -- the other detected entities. | |
1114 | -- if The method select is called, the selected entity | |
1115 | -- will be the hilighted one! | |
1116 | -- returns the Rank of hilighted entity | |
1117 | -- WARNING : Loop Method. When all the detected entities | |
1118 | -- have been hilighted , the next call will hilight | |
1119 | -- the first one again | |
1120 | ||
679ecdee | 1121 | HilightPreviousDetected (me : mutable; |
1122 | theView : View from V3d; | |
1123 | theToRedrawImmediate : Boolean from Standard = Standard_True) | |
7fd59977 | 1124 | returns Integer from Standard; |
1125 | ---Purpose: Same as previous methods in reverse direction... | |
1126 | ||
1127 | Select(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d; | |
1128 | updateviewer: Boolean from Standard = Standard_True) | |
1129 | returns StatusOfPick from AIS; | |
1130 | ---Purpose: Selects everything found in the bounding rectangle | |
1131 | -- defined by the pixel minima and maxima, XPMin, | |
1132 | -- YPMin, XPMax, and YPMax in the view, aView | |
1133 | -- The objects detected are passed to the main viewer, | |
1134 | -- which is then updated. | |
1135 | ||
1136 | Select(me:mutable; Polyline:Array1OfPnt2d from TColgp;aView:View from V3d; | |
1137 | updateviewer: Boolean from Standard = Standard_True) | |
1138 | returns StatusOfPick from AIS; | |
1139 | ---Purpose: polyline selection; clears the previous picked list | |
1140 | ||
1141 | Select(me : mutable; | |
1142 | updateviewer: Boolean from Standard = Standard_True) | |
1143 | returns StatusOfPick from AIS; | |
1144 | ---Purpose: Stores and hilights the previous detected; Unhilights | |
1145 | -- the previous picked. | |
1146 | ||
1147 | ShiftSelect(me : mutable; | |
1148 | updateviewer : Boolean from Standard = Standard_True) | |
1149 | returns StatusOfPick from AIS; | |
1150 | ---Purpose: adds the last detected to the list of previous picked. | |
1151 | -- if the last detected was already declared as picked, | |
1152 | -- removes it from the Picked List. | |
1153 | ||
1154 | ShiftSelect( me : mutable; Polyline : Array1OfPnt2d from TColgp; aView : View from V3d; | |
1155 | updateviewer : Boolean from Standard = Standard_True) | |
1156 | returns StatusOfPick from AIS; | |
1157 | ---Purpose: adds the last detected to the list of previous picked. | |
1158 | -- if the last detected was already declared as picked, | |
1159 | -- removes it from the Picked List. | |
1160 | ||
1161 | ||
1162 | ShiftSelect(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d; | |
1163 | updateviewer : Boolean from Standard = Standard_True) | |
1164 | returns StatusOfPick from AIS; | |
1165 | ---Purpose: rectangle of selection ; adds new detected entities into the | |
1166 | -- picked list, removes the detected entities that were already stored... | |
1167 | ||
1168 | SetToHilightSelected(me: mutable; toHilight: Boolean from Standard); | |
1169 | ---C++: inline | |
1170 | ---Purpose: Specify whether selected object must be hilighted when mouse cursor | |
1171 | --- is moved above it (in MoveTo method). By default this value is false and | |
1172 | --- selected object is not hilighted in this case. | |
1173 | ||
1174 | ToHilightSelected(me) returns Boolean from Standard; | |
1175 | ---C++: inline | |
1176 | ---Purpose: Return value specified whether selected object must be hilighted | |
1177 | --- when mouse cursor is moved above it | |
1178 | ||
1179 | ||
1180 | ---Category: non interactive actions about Selection | |
1181 | -- 2 categories are distinct: | |
1182 | -- - Current Objects | |
1183 | -- - Selected Objects | |
1184 | -- a Current object is the object picked | |
1185 | -- at neutral Point. | |
1186 | -- The Selected objects are objects picked | |
1187 | -- when a local context is opened | |
1188 | ||
1189 | ||
1190 | SetCurrentObject(me:mutable; | |
1191 | aniobj: InteractiveObject from AIS; | |
1192 | updateviewer : Boolean from Standard = Standard_True); | |
1193 | --- Purpose: | |
1194 | -- Updates the view of the current object in open context. | |
1195 | -- Objects selected when there is no open local context | |
1196 | -- are called current objects; those selected in open | |
1197 | -- local context, selected objects. | |
1198 | -- If a local context is open and if updateviewer equals | |
1199 | -- Standard_False, the presentation of the Interactive | |
1200 | -- Object activates the selection mode; the object is | |
1201 | -- displayed but no viewer will be updated. | |
1202 | ||
1203 | AddOrRemoveCurrentObject(me:mutable; | |
1204 | aniobj : InteractiveObject from AIS; | |
1205 | updateviewer : Boolean from Standard = Standard_True); | |
1206 | ---Purpose: | |
1207 | -- Allows you to add a current object to the list of current | |
1208 | -- objects or remove it from that list. | |
1209 | -- Objects selected when there is no open local context | |
1210 | -- are called current objects; those selected in open | |
1211 | -- local context, selected objects. | |
1212 | -- If a local context is open and if updateviewer equals | |
1213 | -- Standard_False, the presentation of the Interactive | |
1214 | -- Object activates the selection mode; the object is | |
1215 | -- displayed but no viewer will be updated. | |
1216 | UpdateCurrent (me:mutable); | |
1217 | ---Purpose: Updates the list of current objects, i.e. hilights new | |
1218 | -- current objects, removes hilighting from former current objects. | |
1219 | -- Objects selected when there is no open local context | |
1220 | -- are called current objects; those selected in open | |
1221 | -- local context, selected objects. | |
1222 | -- | |
1223 | ||
1224 | WasCurrentTouched(me) returns Boolean from Standard; | |
1225 | ---Purpose: | |
1226 | -- Returns the current selection touched by the cursor. | |
1227 | -- Objects selected when there is no open local context | |
1228 | -- are called current objects; those selected in open | |
1229 | -- local context, selected objects. | |
1230 | ---C++: inline | |
1231 | ||
1232 | SetOkCurrent(me:mutable); | |
1233 | ---C++: inline | |
1234 | ||
1235 | IsCurrent(me;aniobj: InteractiveObject from AIS) returns Boolean from Standard; | |
1236 | --- Purpose: | |
1237 | -- Returns true if there is a non-null interactive object in Neutral Point. | |
1238 | -- Objects selected when there is no open local context | |
1239 | -- are called current objects; those selected in open | |
1240 | -- local context, selected objects. | |
1241 | ||
1242 | InitCurrent(me:mutable); | |
1243 | --- Purpose: | |
1244 | -- Initializes a scan of the current selected objects in | |
1245 | -- Neutral Point. | |
1246 | -- Objects selected when there is no open local context | |
1247 | -- are called current objects; those selected in open | |
1248 | -- local context, selected objects. | |
1249 | ||
1250 | MoreCurrent(me) returns Boolean from Standard; | |
1251 | --- Purpose: | |
1252 | -- Returns true if there is another object found by the | |
1253 | -- scan of the list of current objects. | |
1254 | -- Objects selected when there is no open local context | |
1255 | -- are called current objects; those selected in open | |
1256 | -- local context, selected objects. | |
1257 | ||
1258 | NextCurrent(me:mutable); | |
1259 | ---Purpose: | |
1260 | -- Continues the scan to the next object in the list of | |
1261 | -- current objects. | |
1262 | -- Objects selected when there is no open local context | |
1263 | -- are called current objects; those selected in open | |
1264 | -- local context, selected objects. | |
1265 | ||
1266 | Current(me) returns InteractiveObject from AIS; | |
1267 | ---Purpose: | |
1268 | -- Returns the current interactive object. | |
1269 | -- Objects selected when there is no open local context | |
1270 | -- are called current objects; those selected in open | |
1271 | -- local context, selected objects. | |
1272 | ||
1273 | NbCurrents(me:mutable) returns Integer from Standard; | |
1274 | ||
1275 | FirstCurrentObject(me:mutable) returns InteractiveObject from AIS; | |
1276 | ---Purpose: | |
1277 | -- Returns the first current object in the list of current objects. | |
1278 | -- Objects selected when there is no open local context | |
1279 | -- are called current objects; those selected in open | |
1280 | -- local context, selected objects. | |
1281 | ||
1282 | HilightCurrents(me : mutable; | |
1283 | updateviewer : Boolean from Standard=Standard_True); | |
1284 | ---Purpose: | |
1285 | --- Highlights current objects. | |
1286 | -- Objects selected when there is no open local context | |
1287 | -- are called current objects; those selected in open | |
1288 | -- local context, selected objects. | |
1289 | -- If a local context is open and if updateviewer equals | |
1290 | -- Standard_False, the presentation of the Interactive | |
1291 | -- Object activates the selection mode; the object is | |
1292 | -- displayed but no viewer will be updated. | |
1293 | ||
1294 | UnhilightCurrents(me : mutable; | |
1295 | updateviewer : Boolean from Standard=Standard_True); | |
1296 | ---Purpose: | |
1297 | -- Removes highlighting from current objects. | |
1298 | -- Objects selected when there is no open local context | |
1299 | -- are called current objects; those selected in open | |
1300 | -- local context, selected objects. | |
1301 | -- If a local context is open and if updateviewer equals | |
1302 | -- Standard_False, the presentation of the Interactive | |
1303 | -- Object activates the selection mode; the object is | |
1304 | -- displayed but no viewer will be updated. | |
1305 | ||
1306 | ClearCurrents(me:mutable; | |
1307 | updateviewer : Boolean from Standard=Standard_True); | |
1308 | ---Purpose: | |
1309 | -- Empties previous current objects in order to get the | |
1310 | -- current objects detected by the selector using | |
1311 | -- UpdateCurrent. | |
1312 | -- Objects selected when there is no open local context | |
1313 | -- are called current objects; those selected in open | |
1314 | -- local context, selected objects. | |
1315 | -- If a local context is open and if updateviewer equals | |
1316 | -- Standard_False, the presentation of the Interactive | |
1317 | -- Object activates the selection mode; the object is | |
1318 | -- displayed but no viewer will be updated. | |
1319 | ||
1320 | SetSelected(me:mutable;aniObj: InteractiveObject from AIS; | |
1321 | updateviewer : Boolean from Standard=Standard_True); | |
1322 | ---Purpose: Puts the interactive object aniObj in the list of | |
1323 | -- selected objects. | |
1324 | -- If a local context is open and if updateviewer equals | |
1325 | -- Standard_False, the presentation of the Interactive | |
1326 | -- Object activates the selection mode; the object is | |
1327 | -- displayed but no viewer will be updated. | |
1328 | ||
1329 | SetSelectedCurrent(me:mutable); | |
1330 | ---Purpose: puts the selected list in the current objects List. | |
1331 | UpdateSelected(me:mutable; | |
1332 | updateviewer : Boolean from Standard=Standard_True); | |
1333 | ---Purpose: updates the list of selected objects | |
1334 | -- i.e. hilights the new selected | |
1335 | -- unhilights old selected objects | |
1336 | AddOrRemoveSelected(me:mutable; | |
1337 | aniobj : InteractiveObject from AIS; | |
1338 | updateviewer : Boolean from Standard=Standard_True); | |
1339 | ---Purpose:Allows you to add a selected object to the list of | |
1340 | -- selected objects or remove it from that list. This entity | |
1341 | -- can be an Interactive Object aniobj or its owner | |
1342 | -- aShape as can be seen in the two syntaxes above. | |
1343 | -- Objects selected when there is no open local context | |
1344 | -- are called current objects; those selected in open | |
1345 | -- local context, selected objects. | |
1346 | -- If a local context is open and if updateviewer equals | |
1347 | -- Standard_False, the presentation of the Interactive | |
1348 | -- Object activates the selection mode; the object is | |
1349 | -- displayed but no viewer will be updated. | |
1350 | ||
1351 | HilightSelected(me : mutable; | |
1352 | updateviewer : Boolean from Standard=Standard_True); | |
1353 | ---Purpose: | |
1354 | -- Highlights selected objects. | |
1355 | -- Objects selected when there is no open local context | |
1356 | -- are called current objects; those selected in open | |
1357 | -- local context, selected objects. | |
1358 | -- If a local context is open and if updateviewer equals | |
1359 | -- Standard_False, the presentation of the Interactive | |
1360 | -- Object activates the selection mode; the object is | |
1361 | -- displayed but no viewer will be updated. | |
1362 | ||
1363 | UnhilightSelected(me : mutable; | |
1364 | updateviewer : Boolean from Standard=Standard_True); | |
1365 | ---Purpose: | |
1366 | -- Removes highlighting from selected objects. | |
1367 | -- Objects selected when there is no open local context | |
1368 | -- are called current objects; those selected in open | |
1369 | -- local context, selected objects. | |
1370 | -- If a local context is open and if updateviewer equals | |
1371 | -- Standard_False, the presentation of the Interactive | |
1372 | -- Object activates the selection mode; the object is | |
1373 | -- displayed but no viewer will be updated. | |
1374 | ||
1375 | ClearSelected(me:mutable; | |
1376 | updateviewer : Boolean from Standard=Standard_True); | |
1377 | ---Purpose: | |
1378 | -- Empties previous selected objects in order to get the | |
1379 | -- selected objects detected by the selector using | |
1380 | -- UpdateSelected. | |
1381 | -- Objects selected when there is no open local context | |
1382 | -- are called current objects; those selected in open | |
1383 | -- local context, selected objects. | |
1384 | -- If a local context is open and if updateviewer equals | |
1385 | -- Standard_False, the presentation of the Interactive | |
1386 | -- Object activates the selection mode; the object is | |
1387 | -- displayed but no viewer will be updated. | |
1388 | ||
1389 | AddOrRemoveSelected(me:mutable;aShape:Shape from TopoDS; | |
1390 | updateviewer : Boolean from Standard=Standard_True); | |
1391 | ---Purpose: No right to Add a selected Shape (Internal Management | |
1392 | -- of shape Selection). | |
1393 | -- A Previous selected shape may only be removed. | |
1394 | ||
1395 | ||
1396 | AddOrRemoveSelected(me:mutable;anOwner : EntityOwner from SelectMgr; | |
1397 | updateviewer: Boolean from Standard=Standard_True); | |
1398 | ---Purpose: allows to add/remove in the selected list the entities | |
1399 | -- represented by <anOwner> in the selection process. | |
1400 | ||
1401 | ---Category: Selection Process | |
1402 | ||
1403 | IsSelected(me;aniobj: InteractiveObject from AIS) returns Boolean from Standard; | |
1404 | --- Purpose: | |
1405 | -- Finds the selected object aniobj in local context and | |
1406 | -- returns its name. | |
1407 | -- Objects selected when there is no open local context | |
1408 | -- are called current objects; those selected in open | |
1409 | -- local context, selected objects. | |
1410 | ||
1411 | InitSelected(me:mutable); | |
1412 | ---Purpose: | |
1413 | -- Initializes a scan of the selected objects in local context. | |
1414 | -- Objects selected when there is no open local context | |
1415 | -- are called current objects; those selected in open | |
1416 | -- local context, selected objects. | |
1417 | ||
1418 | MoreSelected(me) returns Boolean from Standard; | |
1419 | ---Purpose: | |
1420 | -- Returns true if there is another object found by the | |
1421 | -- scan of the list of selected objects. | |
1422 | -- Objects selected when there is no open local context | |
1423 | -- are called current objects; those selected in open | |
1424 | -- local context, selected objects. | |
1425 | ||
1426 | ||
1427 | NextSelected(me:mutable); | |
1428 | ---Purpose: | |
1429 | -- Continues the scan to the next object in the list of | |
1430 | -- selected objects. | |
1431 | -- Objects selected when there is no open local context | |
1432 | -- are called current objects; those selected in open | |
1433 | -- local context, selected objects. | |
1434 | ||
1435 | NbSelected(me:mutable) returns Integer from Standard; | |
1436 | ||
1437 | HasSelectedShape(me) returns Boolean from Standard; | |
1438 | --- Purpose: | |
1439 | -- Returns true if the interactive context has a shape | |
1440 | -- selected in it which results from the decomposition of | |
1441 | -- another entity in local context. | |
1442 | -- If HasSelectedShape returns true, SelectedShape | |
1443 | -- returns the shape which has been shown to be | |
1444 | -- selected. Interactive returns the Interactive Object | |
1445 | -- from which the shape has been selected. | |
1446 | -- If HasSelectedShape returns false, Interactive | |
1447 | -- returns the interactive entity selected by the click of the mouse. | |
1448 | ||
1449 | SelectedShape(me) returns Shape from TopoDS; | |
1450 | ---Purpose: | |
1451 | -- Returns the selected shape in the open local context. | |
1452 | -- Objects selected when there is no open local context | |
1453 | -- are called current objects; those selected in open | |
1454 | -- local context, selected objects. | |
1455 | ||
1456 | SelectedOwner(me) returns EntityOwner from SelectMgr; | |
1457 | ---Purpose: | |
1458 | -- Returns the owner of the selected entity resulting | |
1459 | -- from the decomposition of another entity in local context. | |
1460 | ||
1461 | EntityOwners(me; theOwners : out IndexedMapOfOwner from SelectMgr; | |
1462 | theIObj : InteractiveObject from AIS; | |
1463 | theMode : Integer from Standard = -1); | |
1464 | ---Purpose: Returns a collection containing all entity owners | |
1465 | --- created for the interactive object <theIObj> in | |
1466 | --- the selection mode theMode (in all active modes | |
1467 | --- if the Mode == -1) | |
1468 | ||
1469 | Interactive(me) returns InteractiveObject from AIS; | |
1470 | ---Purpose: Returns the location of the selected Interactive Object. | |
1471 | SelectedInteractive(me) returns InteractiveObject from AIS; | |
1472 | ||
1473 | HasApplicative(me) returns Boolean from Standard; | |
1474 | --- Purpose: | |
1475 | -- Returns true if the applicative object has an owner | |
1476 | -- from Interactive attributed to it. | |
1477 | ||
1478 | Applicative(me) returns Transient from Standard; | |
1479 | ---Purpose: | |
1480 | -- Returns the owner of the applicative entity detected | |
1481 | -- in interactive context. The owner can be a shape for | |
1482 | -- a set of sub-shapes or a sub-shape for sub-shapes | |
1483 | -- which it is composed of. | |
1484 | ||
1485 | ---Category: information about detection... | |
1486 | ||
1487 | HasDetected (me) returns Boolean from Standard; | |
1488 | ---Purpose: | |
1489 | -- Returns true if there is a mouse-detected entity in local context. | |
1490 | -- If there is no open local context, the objects selected | |
1491 | -- are called current objects; selected objects if there is | |
1492 | -- one. Iterators allow entities to be recovered in either | |
1493 | -- case. This method is one of a set which allows you to | |
1494 | -- manipulate the objects which have been placed in these two lists. | |
1495 | ||
1496 | HasDetectedShape(me) returns Boolean from Standard; | |
1497 | ---Purpose: | |
1498 | -- Returns true if there is a detected shape in local context. | |
1499 | -- If there is no open local context, the objects selected | |
1500 | -- are called current objects; selected objects if there is | |
1501 | -- one. Iterators allow entities to be recovered in either | |
1502 | -- case. This method is one of a set which allows you to | |
1503 | -- manipulate the objects which have been placed in these two lists. | |
1504 | ||
1505 | DetectedShape (me) returns Shape from TopoDS; | |
1506 | ---Purpose: | |
1507 | -- Returns the shape detected in local context. | |
1508 | -- If there is no open local context, the objects selected | |
1509 | -- are called current objects; selected objects if there is | |
1510 | -- one. Iterators allow entities to be recovered in either | |
1511 | -- case. This method is one of a set which allows you to | |
1512 | -- manipulate the objects which have been placed in these two lists. | |
1513 | ---C++: return const & | |
1514 | ||
1515 | DetectedInteractive(me) returns InteractiveObject from AIS; | |
1516 | ---Purpose: | |
1517 | -- Returns the interactive objects last detected in open context. | |
1518 | -- If there is no open local context, the objects selected | |
1519 | -- are called current objects; selected objects if there is | |
1520 | -- one. Iterators allow entities to be recovered in either | |
1521 | -- case. This method is one of a set which allows you to | |
1522 | -- manipulate the objects which have been placed in these two lists. | |
1523 | ||
1524 | DetectedOwner(me) returns EntityOwner from SelectMgr; | |
1525 | ---Purpose: returns the owner of the detected sensitive primitive. | |
1526 | ||
1527 | InitDetected(me: mutable); | |
1528 | ||
1529 | MoreDetected(me) returns Boolean from Standard; | |
1530 | NextDetected(me: mutable); | |
1531 | DetectedCurrentShape(me) returns Shape from TopoDS; | |
1532 | ---C++: return const & | |
1533 | DetectedCurrentObject(me) returns InteractiveObject from AIS; | |
1534 | ||
1535 | ---Category: SPECIFIC LOCAL CONTEXT ACTIONS. | |
1536 | ||
1537 | ||
1538 | ||
1539 | OpenLocalContext(me : mutable; | |
1540 | UseDisplayedObjects : Boolean from Standard = Standard_True; | |
1541 | AllowShapeDecomposition : Boolean from Standard = Standard_True; | |
1542 | AcceptEraseOfObjects : Boolean from Standard = Standard_False; | |
1543 | BothViewers : Boolean from Standard = Standard_False) | |
1544 | returns Integer from Standard; | |
1545 | ---Purpose: | |
1546 | -- Opens local contexts and specifies how this is to be | |
1547 | -- done. The options listed above function in the following manner: | |
1548 | -- - UseDisplayedObjects -allows you to load or not | |
1549 | -- load the interactive objects visualized at Neutral | |
1550 | -- Point in the local context which you open. If false, | |
1551 | -- the local context is empty after being opened. If | |
1552 | -- true, the objects at Neutral Point are loaded by their | |
1553 | -- default selection mode. | |
1554 | -- - AllowShapeDecomposition -AIS_Shape allows or | |
1555 | -- prevents decomposition in standard shape location | |
1556 | -- mode of objects at Neutral Point which are | |
1557 | -- type-"privileged". This Flag is only taken into | |
1558 | -- account when UseDisplayedObjects is true. | |
1559 | -- - AcceptEraseOfObjects -authorises other local | |
1560 | -- contexts to erase the interactive objects present in | |
1561 | -- this context. This option is rarely used. | |
1562 | -- - BothViewers - Has no use currently defined. | |
1563 | -- This method returns the index of the created local | |
1564 | -- context. It should be kept and used to close the context. | |
1565 | -- Opening a local context allows you to prepare an | |
1566 | -- environment for temporary presentations and | |
1567 | -- selections which will disappear once the local context is closed. | |
1568 | -- You can open several local contexts, but only the last | |
1569 | -- one will be active. | |
1570 | ||
1571 | ||
1572 | ||
1573 | CloseLocalContext(me:mutable; | |
1574 | Index : Integer from Standard = -1; | |
1575 | updateviewer:Boolean from Standard=Standard_True); | |
1576 | ---Purpose: Allows you to close local contexts. For greater | |
1577 | -- security, you should close the context with the | |
1578 | -- index Index given on opening. | |
1579 | -- When you close a local context, the one before, | |
1580 | -- which is still on the stack, reactivates. If none is | |
1581 | -- left, you return to Neutral Point. | |
1582 | -- If a local context is open and if updateviewer | |
1583 | -- equals Standard_False, the presentation of the | |
1584 | -- Interactive Object activates the selection mode; the | |
1585 | -- object is displayed but no viewer will be updated. | |
1586 | -- Warning | |
1587 | -- When the index isn't specified, the current context | |
1588 | -- is closed. This option can be dangerous, as other | |
1589 | -- Interactive Functions can open local contexts | |
1590 | -- without necessarily warning the user. | |
1591 | ||
1592 | IndexOfCurrentLocal(me) returns Integer from Standard; | |
1593 | ---Purpose: returns -1 if no opened local context. | |
1594 | ||
1595 | CloseAllContexts (me:mutable;updateviewer:Boolean from Standard = Standard_True); | |
1596 | ---Purpose: | |
1597 | -- Allows you to close all local contexts at one go and | |
1598 | -- return to Neutral Point. | |
1599 | -- If a local context is open and if updateviewer equals | |
1600 | -- Standard_False, the presentation of the Interactive | |
1601 | -- Object activates the selection mode; the object is | |
1602 | -- displayed but no viewer will be updated. | |
1603 | ||
1604 | ResetOriginalState(me:mutable;updateviewer:Boolean from Standard = Standard_True); | |
1605 | ---Level: Internal | |
1606 | ---Purpose: to be used only with no opened | |
1607 | -- local context.. displays and activates objects in their | |
1608 | -- original state before local contexts were opened... | |
1609 | ||
1610 | ClearLocalContext(me:mutable;TheMode : ClearMode from AIS = AIS_CM_All); | |
1611 | ---Purpose: clears Objects/Filters/Activated Modes list in the current opened | |
1612 | -- local context. | |
1613 | ||
1614 | ||
1615 | UseDisplayedObjects(me:mutable); | |
1616 | NotUseDisplayedObjects(me:mutable); | |
1617 | ---Purpose: when a local Context is opened, one is able to | |
1618 | -- use/not use the displayed objects at neutral point | |
1619 | -- at anytime. | |
1620 | ||
1621 | ||
1622 | ||
1623 | ---Category: Immediate Mode : Used For Simulation | |
1624 | -- | |
1625 | -- CAUTION | |
1626 | -- 1] NO UPDATE OF VIEWER MUST BE DONE | |
1627 | -- BETWEEN BeginImmediateDraw() and EndImmediateDraw() | |
1628 | -- 2] Available only Inside Opened Local Contexts. | |
1629 | -- 3} During the Immediate Mode Displays, no Selection | |
1630 | -- is available. | |
1631 | -- | |
1632 | -- How To Use It? | |
1633 | -- | |
1634 | -- 1. BeginImmediateDraw() | |
1635 | -- 2. ImmediateAdd (Iobj,mode) | |
1636 | -- | |
1637 | -- 4.EndImmediateDraw() draws all the stored objects... | |
1638 | -- | |
1639 | ||
679ecdee | 1640 | BeginImmediateDraw (me : mutable) |
1641 | returns Boolean from Standard; | |
7fd59977 | 1642 | ---Purpose: initializes the list of presentations to be displayed |
1643 | -- returns False if No Local COnte | |
1644 | ||
679ecdee | 1645 | ImmediateAdd (me : mutable; |
1646 | theObj : InteractiveObject from AIS; | |
1647 | theMode : Integer from Standard = 0) | |
7fd59977 | 1648 | returns Boolean from Standard; |
1649 | ---Purpose: returns True if <anIObj> has been stored in the list. | |
1650 | ||
679ecdee | 1651 | EndImmediateDraw (me : mutable; |
1652 | theView : View from V3d) | |
7fd59977 | 1653 | returns Boolean from Standard; |
1654 | ---Purpose: returns True if the immediate display has been done. | |
679ecdee | 1655 | |
1656 | EndImmediateDraw (me : mutable) | |
7fd59977 | 1657 | returns Boolean from Standard; |
679ecdee | 1658 | ---Purpose: Uses the First Active View of Main Viewer! |
7fd59977 | 1659 | -- returns True if the immediate display has been done. |
1660 | ||
1661 | IsImmediateModeOn(me) returns Boolean from Standard; | |
1662 | ||
7fd59977 | 1663 | ---Category: Activation/Deactivation of Selection Modes. |
1664 | ||
7fd59977 | 1665 | SetAutomaticHilight(me:mutable;aStatus:Boolean); |
1666 | ---Purpose: | |
1667 | -- Sets the highlighting status aStatus of detected and | |
1668 | -- selected entities. | |
1669 | -- Whether you are in Neutral Point or local context, this | |
1670 | -- is automatically managed by the Interactive Context. | |
1671 | -- This function allows you to disconnect the automatic mode. | |
1672 | AutomaticHilight(me) returns Boolean from Standard; | |
1673 | ---Purpose: | |
1674 | -- Returns true if the automatic highlight mode is active | |
1675 | -- in an open context. | |
1676 | ||
1677 | SetZDetection(me:mutable; aStatus:Boolean = Standard_False); | |
1678 | ---Purpose: Enables/Disables the Z detection. | |
1679 | -- If TRUE the detection echo can be partially hidden by the | |
1680 | -- detected object. | |
1681 | ---Warning: The hidden part of the object is not visible but | |
1682 | -- stay selectable. | |
1683 | ||
1684 | ZDetection(me) returns Boolean; | |
1685 | ---Purpose: Retrieves the Z detection state. | |
1686 | ||
1687 | Activate(me : mutable; | |
1688 | anIobj : InteractiveObject from AIS; | |
1689 | aMode : Integer from Standard = 0); | |
1690 | ---Purpose: Activates the selection mode aMode whose index is | |
1691 | -- given, for the given interactive entity anIobj. | |
1692 | ||
1693 | ||
1694 | Deactivate(me :mutable; | |
1695 | anIObj : InteractiveObject from AIS); | |
1696 | ---Purpose: Deactivates all the activated selection modes | |
1697 | -- of an object. | |
1698 | ||
1699 | Deactivate(me : mutable; | |
1700 | anIobj : InteractiveObject from AIS; | |
1701 | aMode : Integer from Standard); | |
1702 | ---Purpose: | |
1703 | -- Deactivates all the activated selection modes of the | |
1704 | -- interactive object anIobj with a given selection mode aMode. | |
1705 | ||
1706 | ActivatedModes(me; | |
1707 | anIobj : InteractiveObject from AIS; | |
1708 | theList : in out ListOfInteger from TColStd); | |
1709 | ---Purpose: | |
1710 | -- Returns the list of activated selection modes in an open context. | |
1711 | ||
1712 | SetShapeDecomposition( me:mutable; | |
1713 | anIobj : InteractiveObject from AIS; | |
1714 | aStatus: Boolean from Standard); | |
1715 | ---Purpose: to be Used only with opened local context and | |
1716 | -- if <anIobj> is of type shape... | |
1717 | -- if <aStatus> = True <anIobj> will be sensitive to | |
1718 | -- shape selection modes activation. | |
1719 | -- = False, <anIobj> will not be senstive | |
1720 | -- any more. | |
1721 | -- | |
1722 | ||
1723 | SetTemporaryAttributes(me : mutable; | |
1724 | anObj : InteractiveObject from AIS; | |
1725 | aDrawer : Drawer from Prs3d; | |
1726 | updateviewer : Boolean = Standard_True); | |
1727 | ||
1728 | ---Purpose: | |
1729 | -- Sets the temporary graphic attributes of the entity | |
1730 | -- anObj. These are provided by the attribute manager | |
1731 | -- aDrawer and are valid for a particular local context only. | |
1732 | -- If a local context is open and if updateviewer equals | |
1733 | -- Standard_False, the presentation of the Interactive | |
1734 | -- Object activates the selection mode; the object is | |
1735 | -- displayed but no viewer will be updated. | |
1736 | ||
1737 | SubIntensityOn(me : mutable; | |
1738 | aniobj : InteractiveObject from AIS; | |
1739 | updateviewer : Boolean from Standard =Standard_True); | |
1740 | ---Purpose: | |
1741 | -- Highlights, and removes highlights from, the displayed | |
1742 | -- object aniobj which is displayed at Neutral Point with | |
1743 | -- subintensity color; available only for active local | |
1744 | -- context. There is no effect if there is no local context. | |
1745 | -- If a local context is open and if updateviewer equals | |
1746 | -- Standard_False, the presentation of the Interactive | |
1747 | -- Object activates the selection mode; the object is | |
1748 | -- displayed but no viewer will be updated. | |
1749 | ||
1750 | SubIntensityOff(me : mutable; | |
1751 | aniobj : InteractiveObject from AIS; | |
1752 | updateviewer : Boolean from Standard =Standard_True); | |
1753 | ---Purpose: | |
1754 | -- Removes the subintensity option for the entity aniobj. | |
1755 | -- If a local context is open and if updateviewer equals | |
1756 | -- Standard_False, the presentation of the Interactive | |
1757 | -- Object activates the selection mode; the object is | |
1758 | -- displayed but no viewer will be updated. | |
1759 | ||
1760 | SubIntensityOn(me:mutable; | |
1761 | updateviewer : Boolean from Standard = Standard_True); | |
1762 | ---Purpose: hilights/unhilights displayed objects which are displayed at | |
1763 | -- neutral state with subintensity color; | |
1764 | -- available only for active local context. | |
1765 | -- No effect if no local context. | |
1766 | ||
1767 | ||
1768 | SubIntensityOff(me:mutable; | |
1769 | updateviewer : Boolean from Standard = Standard_True); | |
1770 | ---Purpose: removes subintensity option for all objects. | |
1771 | ||
1772 | ||
1773 | ||
1774 | ||
1775 | ||
1776 | ||
1777 | ||
1778 | ---Category: FILTERS | |
1779 | -- | |
1780 | -- | |
1781 | -- | |
1782 | ||
1783 | AddFilter(me :mutable; aFilter : Filter from SelectMgr); | |
1784 | ---Purpose: Allows you to add the filter aFilter to Neutral Point or | |
1785 | -- to a local context if one or more selection modes have been activated. | |
1786 | -- Only type filters may be active in Neutral Point. | |
1787 | ||
1788 | RemoveFilter(me:mutable;aFilter : Filter from SelectMgr); | |
1789 | ||
1790 | ---Purpose: | |
1791 | -- Removes a filter from Neutral Point or a local context | |
1792 | -- if one or more selection modes have been activated. | |
1793 | -- Only type filters are activated in Neutral Point. | |
1794 | ||
1795 | RemoveFilters(me:mutable); | |
1796 | ---Purpose: Remove a filter to Neutral Point or a local context if | |
1797 | -- one or more selection modes have been activated. | |
1798 | -- Only type filters are active in Neutral Point. | |
1799 | ||
1800 | ActivateStandardMode(me:mutable; aStandardActivation : ShapeEnum from TopAbs); | |
1801 | ---Purpose: Provides an alternative to the Display methods when | |
1802 | -- activating specific selection modes. This has the | |
1803 | -- effect of activating the corresponding selection mode | |
1804 | -- aStandardActivation for all objects in Local Context | |
1805 | -- which accept decomposition into sub-shapes. | |
1806 | -- Every new Object which has been loaded into the | |
1807 | -- interactive context and which answers these | |
1808 | -- decomposition criteria is automatically activated | |
1809 | -- according to these modes. | |
1810 | -- Warning | |
1811 | -- If you have opened a local context by loading an | |
1812 | -- object with the default options | |
1813 | -- (<AllowShapeDecomposition >= Standard_True), all | |
1814 | -- objects of the "Shape" type are also activated with | |
1815 | -- the same modes. You can act on the state of these | |
1816 | -- "Standard" objects by using SetShapeDecomposition(Status). | |
1817 | ||
1818 | ||
1819 | DeactivateStandardMode (me:mutable; aStandardActivation : ShapeEnum from TopAbs); | |
1820 | ---Purpose: | |
1821 | -- Provides an alternative to the Display methods when | |
1822 | -- deactivating specific selection modes. This has the | |
1823 | -- effect of deactivating the corresponding selection | |
1824 | -- mode aStandardActivation for all objects in Local | |
1825 | -- Context which accept decomposition into sub-shapes. | |
1826 | ||
1827 | ActivatedStandardModes(me) returns ListOfInteger from TColStd; | |
1828 | ---Purpose: | |
1829 | -- Returns the list of activated standard selection modes | |
1830 | -- available in a local context. | |
1831 | ---C++: return const& | |
1832 | ||
1833 | Filters(me) returns ListOfFilter from SelectMgr; | |
1834 | ---Purpose: | |
1835 | -- Returns the list of filters active in a local context. | |
1836 | ---C++: return const& | |
1837 | ||
1838 | ||
1839 | ---Category: INFORMATION METHODS - GET FIELDS | |
1840 | ||
1841 | DefaultDrawer(me) returns any Drawer from Prs3d; | |
1842 | ---Purpose: | |
1843 | -- Returns the default attribute manager. | |
1844 | -- This contains all the color and line attributes which | |
1845 | -- can be used by interactive objects which do not have | |
1846 | -- their own attributes. | |
1847 | ---C++: inline | |
1848 | ---C++: return const & | |
1849 | ||
1850 | CurrentViewer(me) returns any Viewer from V3d; | |
1851 | ---C++: return const & | |
1852 | ---C++: inline | |
1853 | ---Purpose: Returns the current viewer. | |
1854 | ||
1855 | DisplayedObjects(me; | |
1856 | aListOfIO : in out ListOfInteractive from AIS; | |
1857 | OnlyFromNeutral : Boolean from Standard = Standard_False); | |
1858 | ---Purpose: Returns the list of displayed objects of a particular | |
1859 | -- Type WhichKind and Signature WhichSignature. By | |
1860 | -- Default, WhichSignature equals -1. This means that | |
1861 | -- there is a check on type only. | |
1862 | ||
1863 | DisplayedObjects(me; | |
1864 | WhichKind :KindOfInteractive from AIS; | |
1865 | WhichSignature :Integer from Standard; | |
1866 | aListOfIO : in out ListOfInteractive from AIS; | |
1867 | OnlyFromNeutral : Boolean from Standard = Standard_False); | |
1868 | ---Purpose: gives the list of displayed objects of a particular | |
1869 | -- Type and signature. | |
1870 | -- by Default, <WhichSignature> = -1 means | |
1871 | -- control only on <WhichKind>. | |
1872 | ||
7fd59977 | 1873 | ErasedObjects (me;theListOfIO : in out ListOfInteractive from AIS); |
1874 | ---Purpose: | |
eb4320f2 | 1875 | -- Returns the list theListOfIO of erased objects (hidden objects) |
7fd59977 | 1876 | -- particular Type WhichKind and Signature WhichSignature. |
1877 | -- By Default, WhichSignature equals 1. This means | |
1878 | -- that there is a check on type only. | |
1879 | ||
1880 | ErasedObjects (me; | |
1881 | WhichKind :KindOfInteractive from AIS; | |
1882 | WhichSignature :Integer from Standard; | |
1883 | theListOfIO : in out ListOfInteractive from AIS); | |
eb4320f2 | 1884 | ---Purpose: gives the list of erased objects (hidden objects) |
7fd59977 | 1885 | -- Type and signature |
1886 | -- by Default, <WhichSignature> = -1 means | |
1887 | -- control only on <WhichKind>. | |
1888 | ||
1889 | ObjectsByDisplayStatus (me;theStatus : DisplayStatus from AIS; | |
1890 | theListOfIO : in out ListOfInteractive from AIS); | |
1891 | ---Purpose: | |
1892 | -- Returns the list theListOfIO of objects with indicated display status | |
1893 | -- particular Type WhichKind and Signature WhichSignature. | |
1894 | -- By Default, WhichSignature equals 1. This means | |
1895 | -- that there is a check on type only. | |
1896 | ||
1897 | ObjectsByDisplayStatus (me; | |
1898 | WhichKind :KindOfInteractive from AIS; | |
1899 | WhichSignature :Integer from Standard; | |
1900 | theStatus : DisplayStatus from AIS; | |
1901 | theListOfIO : in out ListOfInteractive from AIS); | |
1902 | ---Purpose: gives the list of objects with indicated display status | |
1903 | -- Type and signature | |
1904 | -- by Default, <WhichSignature> = -1 means | |
1905 | -- control only on <WhichKind>. | |
1906 | ||
1907 | ObjectsInside(me; | |
1908 | aListOfIO : in out ListOfInteractive from AIS; | |
1909 | WhichKind : KindOfInteractive from AIS = AIS_KOI_None; | |
1910 | WhichSignature : Integer from Standard = -1); | |
1911 | ---Purpose: fills <aListOfIO> with objects of a particular | |
1912 | -- Type and Signature with no consideration of display status. | |
1913 | -- by Default, <WhichSignature> = -1 means | |
1914 | -- control only on <WhichKind>. | |
1915 | -- if <WhichKind> = AIS_KOI_None and <WhichSignature> = -1, | |
1916 | -- all the objects are put into the list. | |
1917 | ||
1918 | ||
1919 | HasOpenedContext(me) returns Boolean from Standard; | |
1920 | ---Purpose: Returns true if there is an open context. | |
1921 | ---C++: inline | |
1922 | ||
1923 | CurrentName(me) returns AsciiString from TCollection; | |
1924 | ---Purpose: | |
1925 | -- Returns the name of the current selected entity in Neutral Point. | |
1926 | -- Objects selected when there is no open local context | |
1927 | -- are called current objects; those selected in open | |
1928 | -- local context, selected objects. | |
1929 | ---C++: inline | |
1930 | ---C++: return const& | |
1931 | ||
1932 | SelectionName(me) returns AsciiString from TCollection; | |
1933 | ---Purpose: | |
1934 | -- Returns the name of the current selected entity in | |
1935 | -- open local context. | |
1936 | -- Objects selected when there is no open local context | |
1937 | -- are called current objects; those selected in open | |
1938 | -- local context, selected objects. | |
1939 | ---C++: return const& | |
1940 | ||
1941 | DomainOfMainViewer(me) returns CString from Standard; | |
1942 | ---Purpose: Returns the domain name of the main viewer. | |
eb4320f2 | 1943 | |
7fd59977 | 1944 | ---Category: Internal |
1945 | ||
1bd2fa67 A |
1946 | ---Category: Internal |
1947 | ||
1948 | LocalContext(me) returns LocalContext from AIS; | |
1949 | ---Level: Internal | |
1950 | ---Purpose: | |
1951 | -- This method is only intended for advanced operation, particularly with | |
1952 | -- the aim to improve performance when many objects have to be selected | |
1953 | -- together. Otherwise, you should use other (non-internal) methods of | |
1954 | -- class AIS_InteractiveContext without trying to obtain an instance of | |
1955 | -- AIS_LocalContext. | |
1956 | ---C++: inline | |
1957 | ||
7fd59977 | 1958 | SelectionManager(me) returns any SelectionManager from SelectMgr; |
1959 | ---C++: inline | |
1960 | ---C++: return const & | |
1961 | ||
1962 | MainPrsMgr (me) returns any PresentationManager3d from PrsMgr; | |
1963 | ---C++: inline | |
1964 | ---C++: return const & | |
7fd59977 | 1965 | |
1966 | MainSelector(me) returns any ViewerSelector3d from StdSelect; | |
1967 | ---C++: inline | |
1968 | ---C++: return const & | |
1969 | LocalSelector(me) returns any ViewerSelector3d from StdSelect; | |
1970 | ||
eb4320f2 | 1971 | PurgeDisplay(me:mutable) |
7fd59977 | 1972 | returns Integer from Standard; |
1973 | ---Level: Internal | |
1974 | ---Purpose: Clears all the structures which don't | |
1975 | -- belong to objects displayed at neutral point | |
1976 | -- only effective when no Local Context is opened... | |
1977 | -- returns the number of removed structures from the viewers. | |
1978 | ||
1979 | ||
1980 | HighestIndex(me) returns Integer from Standard; | |
1981 | ||
1982 | DisplayActiveAreas(me:mutable;aView:View from V3d) ; | |
1983 | ||
1984 | ClearActiveAreas (me :mutable; | |
1985 | aView: View from V3d) is static; | |
1986 | ---Level: Internal | |
1987 | ||
1988 | DisplayActiveSensitive(me:mutable;aView : View from V3d) is static; | |
1989 | ||
1990 | ClearActiveSensitive(me:mutable;aView:View from V3d) is static; | |
1991 | ||
1992 | ||
1993 | ||
1994 | DisplayActiveSensitive(me:mutable; | |
1995 | anObject: InteractiveObject from AIS; | |
1996 | aView : View from V3d) is static; | |
1997 | DisplayActiveAreas(me:mutable; | |
1998 | anObject: InteractiveObject from AIS; | |
1999 | aView : View from V3d) is static; | |
2000 | ||
2001 | GetDefModes(me; | |
2002 | anIobj : InteractiveObject from AIS; | |
2003 | Dmode,HiMod,SelMode : in out Integer from Standard) is static private; | |
2004 | ||
2005 | ||
2006 | EraseGlobal(me : mutable; | |
eb4320f2 | 2007 | anObj : InteractiveObject from AIS; |
2008 | updateviewer : Boolean from Standard = Standard_True) is static private; | |
7fd59977 | 2009 | |
2010 | ClearGlobal(me : mutable; | |
2011 | anObj : InteractiveObject from AIS; | |
2012 | updateviewer : Boolean from Standard = Standard_True) is static private; | |
2013 | ||
2014 | ClearGlobalPrs(me : mutable; | |
2015 | anObj : InteractiveObject from AIS; | |
2016 | aMode : Integer from Standard; | |
2017 | updateviewer : Boolean from Standard = Standard_True) is static private; | |
2018 | ||
2019 | ||
2020 | ---Category: Private Methods | |
2021 | ||
2022 | IsInLocal(me; | |
2023 | anObject : InteractiveObject from AIS; | |
2024 | TheIndex : in out Integer from Standard) | |
2025 | returns Boolean from Standard; | |
2026 | ---Purpose: returns if possible, | |
2027 | -- the first local context where the object is seen | |
2028 | ||
2029 | ||
2030 | InitAttributes(me:mutable) is static private; | |
2031 | ||
2032 | ||
2033 | PurgeViewer(me:mutable;Vwr:Viewer from V3d) | |
2034 | returns Integer from Standard is static private; | |
2035 | ||
2036 | fields | |
2037 | ||
2038 | myObjects : DataMapOfIOStatus from AIS; | |
2039 | ||
2040 | -- the viewers, prsmgr, selectors | |
2041 | mgrSelector : SelectionManager from SelectMgr; | |
2042 | ||
2043 | myMainPM : PresentationManager3d from PrsMgr; | |
2044 | myMainVwr : Viewer from V3d; | |
2045 | myMainSel : ViewerSelector3d from StdSelect; | |
2046 | ||
7fd59977 | 2047 | -- the selection and current objects. |
2048 | ||
2049 | mySelectionName : AsciiString from TCollection; | |
2050 | myCurrentName : AsciiString from TCollection; | |
2051 | ||
2052 | myLastPicked : InteractiveObject from AIS; | |
2053 | myLastinMain : InteractiveObject from AIS; | |
7fd59977 | 2054 | |
2055 | ||
2056 | myWasLastMain : Boolean from Standard; | |
2057 | myCurrentTouched : Boolean from Standard; | |
2058 | mySelectedTouched : Boolean from Standard; | |
2059 | myToHilightSelected : Boolean from Standard; | |
2060 | ||
2061 | -- the neutral point filter... | |
2062 | ||
2063 | myFilters : OrFilter from SelectMgr; | |
2064 | ||
2065 | -- the attributes of session... | |
2066 | ||
2067 | myDefaultDrawer : Drawer from Prs3d; | |
2068 | myDefaultColor : NameOfColor from Quantity; -- for shading.... | |
2069 | myHilightColor : NameOfColor from Quantity; | |
2070 | mySelectionColor : NameOfColor from Quantity; | |
2071 | myPreselectionColor : NameOfColor from Quantity; | |
2072 | mySubIntensity : NameOfColor from Quantity; | |
2073 | myDisplayMode : Integer from Standard; | |
2074 | ||
2075 | -- The Local Context... | |
2076 | ||
2077 | myLocalContexts : DataMapOfILC from AIS; | |
2078 | myCurLocalIndex : Integer from Standard; | |
2079 | mylastmoveview : View from V3d; | |
2080 | ||
2081 | -- the detected objects. | |
2082 | myAISDetectedSeq : SequenceOfInteractive from AIS; | |
2083 | myAISCurDetected : Integer from Standard; | |
2084 | -- This variables is used by following functions: | |
2085 | -- InitDetected(), MoreDetected(), NextDetected(), DetectedCurrentShape(), DetectedCurrentObject(). | |
2086 | myZDetectionFlag: Boolean from Standard; | |
2087 | -- This variables is used by SetZDetection() and ZDetection() methods | |
2088 | ||
2089 | -- abd: | |
2090 | myIsAutoActivateSelMode : Boolean from Standard; | |
2091 | ||
2092 | friends | |
2093 | class LocalContext from AIS | |
2094 | ||
2095 | end InteractiveContext; |