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