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