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