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