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