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