0025540: Visualization - discretization of the circle differs in shaded and wireframe...
[occt.git] / src / SelectMgr / SelectMgr_SelectableObject.cdl
CommitLineData
b311480e 1-- Created on: 1995-02-20
2-- Created by: Mister rmi
3-- Copyright (c) 1995-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.
7fd59977 16
17deferred class SelectableObject from SelectMgr inherits PresentableObject from PrsMgr
18
19 ---Purpose: A framework to supply the structure of the object to be
20 -- selected. At the first pick, this structure is created by
21 -- calling the appropriate algorithm and retaining this
22 -- framework for further picking.
23 -- This abstract framework is inherited in Application
24 -- Interactive Services (AIS), notably in AIS_InteractiveObject.
25 -- Consequently, 3D selection should be handled by the
26 -- relevant daughter classes and their member functions
27 -- in AIS. This is particularly true in the creation of new interactive objects.
28
29
30uses
31
32 SelectionManager from SelectMgr,
33 Selection from SelectMgr,
34 SequenceOfSelection from SelectMgr,
35 TypeOfPresentation3d from PrsMgr,
6262338c 36 Drawer from Prs3d,
7fd59977 37 Presentation from Prs3d,
59f45b7c 38 PresentationManager from PrsMgr,
7fd59977 39 PresentationManager3d from PrsMgr,
40 SequenceOfOwner from SelectMgr,
41 NameOfColor from Quantity,
42 EntityOwner from SelectMgr,
a1954302 43 TransModeFlags from Graphic3d,
44 ZLayerId from Graphic3d
7fd59977 45
46raises
47 NotImplemented from Standard
48
49is
50
51
52 ---Category: deferred Methods
53
54
55 Initialize(aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView);
56
6e33d3ce 57 ComputeSelection(me:mutable; aSelection : Selection from SelectMgr;
0717ddc1 58 aMode : Integer) is deferred;
7fd59977 59 ---Purpose: Recovers and calculates any sensitive primitive,
60 -- aSelection, available in Shape mode, specified by
61 -- aMode. As a rule, these are sensitive faces.
62 -- This method is defined as virtual. This enables you to
63 -- implement it in the creation of a new class of AIS
64 -- Interactive Object. You need to do this and in so
65 -- doing, redefine this method, if you create a class
66 -- which enriches the list of signatures and types.
67
68 NbPossibleSelection(me) returns Integer from Standard is virtual;
69 ---Level: Public
70 ---Purpose: defines the number of different modes of selection
71 -- (or decomposition) for an Object.
72
73
74
75 ---Category:
76
77
78 UpdateSelection (me:mutable) is static;
79 ---Purpose: re-computes the sensitive primitives for all modes
80
81 UpdateSelection (me:mutable; aMode: Integer from Standard) is static;
82 ---Purpose: re-computes the sensitive primitives which correspond to
83 -- the <amode>th selection mode.
84
85
6e33d3ce 86 AddSelection(me:mutable ;aSelection: Selection from SelectMgr;
7fd59977 87 aMode : Integer)
88 is static;
89 ---Purpose: Adds the selection aSelection with the selection mode
90 -- index aMode to this framework.
91
92
93 ClearSelections(me:mutable; update: Boolean from Standard = Standard_False) is static;
94 ---Level: Public
95 ---Purpose: Empties all the selections in the SelectableObject
96 -- <update> parameter defines whether all object's
97 -- selections should be flagged for further update or not.
98 -- This improved method can be used to recompute an
99 -- object's selection (without redisplaying the object
100 -- completely) when some selection mode is activated not for the first time.
101
102 Selection(me;aMode : Integer)
103 returns any Selection from SelectMgr
104 is static;
105 ---C++: return const&
106 ---Purpose: Returns the selection Selection having the selection mode aMode.
107
108 HasSelection(me; aMode: Integer)
109 returns Boolean from Standard is static ;
110 --- Purpose: Returns true if a selection corresponding to the
111 -- selection mode aMode is present in this framework.
112
113
114
115 Init(me:mutable) is static;
116 ---Purpose: Begins the iteration scanning for sensitive primitives.
117 ---C++: inline
118
119
120 More(me) returns Boolean is static;
121 ---Purpose: Continues the iteration scanning for sensitive primitives.
122 ---C++: inline
123
124
125
126 Next(me:mutable) is static;
127 ---Purpose: Continues the iteration scanning for sensitive primitives.
128 ---C++: inline
129
130
131
132 CurrentSelection(me) returns any Selection from SelectMgr;
133 ---Purpose: Returns the current selection in this framework.
134 ---C++: return const&
135 ---C++: inline
136
137
0717ddc1 138 ResetTransformation(me:mutable) is redefined static;
7fd59977 139
0717ddc1 140 UpdateTransformation(me:mutable) is redefined virtual;
7fd59977 141 ---Purpose: Recomputes the location of the selection aSelection.
142
913a4c4a 143 UpdateTransformations(me:mutable;aSelection: Selection from SelectMgr) is virtual;
144 ---Level: Public
7fd59977 145 ---Purpose: Updates locations in all sensitive entities from <aSelection>
146 -- and in corresponding entity owners.
147
148 HilightSelected ( me : mutable; PM : PresentationManager3d from PrsMgr;
149 Seq : SequenceOfOwner from SelectMgr ) raises NotImplemented from Standard is virtual;
150 ---Purpose: Method which draws selected owners ( for fast presentation draw )
151
152 ClearSelected ( me : mutable ) is virtual;
153 ---Purpose: Method which clear all selected owners belonging
154 -- to this selectable object ( for fast presentation draw )
155
156 HilightOwnerWithColor ( me : mutable; thePM : PresentationManager3d from PrsMgr;
157 theColor : NameOfColor from Quantity;
158 theOwner : EntityOwner from SelectMgr ) raises NotImplemented from Standard is virtual;
159 ---Purpose: Method which hilight an owner belonging to
160 -- this selectable object ( for fast presentation draw )
161
162 IsAutoHilight ( me ) returns Boolean from Standard is virtual;
163 ---Purpose: If returns True, the old mechanism for highlighting
164 -- selected objects is used (HilightSelected Method may be empty).
165 -- If returns False, the HilightSelected method will be
166 -- fully responsible for highlighting selected entity
167 -- owners belonging to this selectable object.
168
169 SetAutoHilight ( me : mutable; newAutoHilight : Boolean from Standard ) is virtual;
170 ---Purpose: Set AutoHilight property to true or false
171
172 -- SetTransformPersistence( me : mutable;
173 -- aFlag : TransModeFlags from Graphic3d ) is redefined;
174 ---Level: Public
175 ---Purpose: Sets up Transform Persistence Mode for this object
176 ---Category: Graphic attributes management
177
178 GetHilightPresentation( me: mutable;
179 TheMgr: PresentationManager3d from PrsMgr ) returns Presentation from Prs3d is static;
180
181 GetSelectPresentation( me: mutable;
182 TheMgr: PresentationManager3d from PrsMgr ) returns Presentation from Prs3d is static;
a1954302 183
59f45b7c 184 SetZLayer ( me : mutable;
a1954302 185 theLayerId : ZLayerId from Graphic3d )
59f45b7c 186 is redefined virtual;
a1954302 187 ---Purpose: Set Z layer ID and update all presentations of the selectable object.
188 -- The layers mechanism allows drawing objects in higher layers in overlay of objects in lower layers.
59f45b7c 189
6262338c 190 SetAttributes(me:mutable; theDrawer: Drawer from Prs3d) is virtual;
191 ---Purpose: Initializes the drawing tool theDrawer.
192
193 Attributes(me) returns any Drawer from Prs3d;
194 ---C++: return const&
195 ---C++: inline
196 ---Purpose: Returns the attributes settings.
197
198 UnsetAttributes(me:mutable) is virtual;
199 ---Purpose: Clears settings provided by the drawing tool theDrawer.
200
7f917335 201 SetHilightAttributes(me:mutable; theDrawer: Drawer from Prs3d) is virtual;
202 ---Purpose: Initializes the hilight drawing tool theDrawer.
203
204 HilightAttributes(me) returns any Drawer from Prs3d;
205 ---C++: return const&
206 ---C++: inline
207 ---Purpose: Returns the hilight attributes settings.
208
209 UnsetHilightAttributes(me:mutable) is virtual;
210 ---Purpose: Clears settings provided by the hilight drawing tool theDrawer.
211
212 InitDefaultHilightAttributes(myclass; theDrawer : Drawer from Prs3d);
213 ---Purpose: Initializes theDrawer by default hilight settings.
214
7fd59977 215fields
216
217 myselections : SequenceOfSelection is protected;
6262338c 218 myDrawer : Drawer from Prs3d is protected;
7f917335 219 myHilightDrawer : Drawer from Prs3d is protected;
7fd59977 220 mycurrent : Integer;
221 myAutoHilight : Boolean from Standard;
222
223 mySelectionPrs : Presentation from Prs3d;
224 myHilightPrs : Presentation from Prs3d;
7fd59977 225
226end SelectableObject;