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