b311480e |
1 | -- Created on: 1996-12-11 |
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 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible |
18 | -- Quantity_Color instead the restricted NameOfColor. |
19 | -- Add SetCurrentFacingModel() methods |
7fd59977 |
20 | -- GG : IMP140100 Add HasPresentation() and Presentation() methods |
21 | -- Add SetAspect() method |
22 | -- SAN : OCC4895 22/03/04 High-level interface for controlling polygon offsets |
7fd59977 |
23 | |
24 | |
25 | deferred class InteractiveObject from AIS inherits SelectableObject from SelectMgr |
26 | |
27 | ---Purpose: |
28 | -- Defines a class of objects with display and selection services. |
29 | -- Entities which are visualized and selected are |
30 | -- Interactive Objects. You can make use of classes of |
31 | -- standard Interactive Objects for which all necessary |
32 | -- methods have already been programmed, or you can |
33 | -- implement your own classes of Interactive Objects. |
34 | -- Specific attributes of entities such as arrow aspect for |
35 | -- dimensions must be loaded in a Drawer. This Drawer |
36 | -- is then applied to the Interactive Object in view. |
37 | -- There are four types of Interactive Object in AIS: the |
38 | -- construction element or Datum, the Relation, which |
39 | -- includes both dimensions and constraints, the Object, |
40 | -- and finally, when the object is of an unknown type, the None type. |
41 | -- Inside these categories, a signature, or index, |
42 | -- provides the possibility of additional characterization. |
43 | -- By default, the Interactive Object has a None type |
44 | -- and a signature of 0. If you want to give a particular |
45 | -- type and signature to your interactive object, you must |
46 | -- redefine the methods, Signature and Type. |
47 | -- Warning |
48 | -- In the case of attribute methods, methods for |
49 | -- standard attributes are virtual. They must be |
50 | -- redefined by the inheriting classes. Setcolor for a |
51 | -- point and Setcolor for a plane, for example, do not |
52 | -- affect the same attributes in the Drawer. |
53 | |
54 | uses |
55 | Trsf from gp, |
56 | NameOfColor from Quantity, |
57 | Color from Quantity, |
58 | Ratio from Quantity, |
59 | ListOfTransient from TColStd, |
60 | ListOfInteger from TColStd, |
61 | Box from Bnd, |
62 | NameOfMaterial from Graphic3d, |
63 | MaterialAspect from Graphic3d, |
64 | Drawer from AIS, |
65 | PToContext from AIS, |
66 | TypeOfPresentation3d from PrsMgr, |
67 | InteractiveContext from AIS, |
68 | KindOfInteractive from AIS, |
69 | TypeOfFacingModel from Aspect, |
7fd59977 |
70 | Transformation from Geom, |
71 | Presentation from Prs3d, |
72 | BasicAspect from Prs3d, |
73 | -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets |
74 | PresentationManager from PrsMgr, |
75 | Presentation from PrsMgr |
76 | -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets |
77 | |
78 | is |
79 | Initialize (aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView) ; |
80 | ---Purpose: The TypeOfPresention3d means that the interactive object |
81 | -- may have a presentation dependant of the view of Display |
82 | |
83 | |
84 | |
85 | ---Category: Virtual methods to be redefined... |
86 | |
87 | Type (me) returns KindOfInteractive from AIS is virtual; |
88 | ---Purpose: |
89 | -- Returns the kind of Interactive Object: |
90 | -- - None |
91 | -- - Datum |
92 | -- - Relation |
93 | -- - Object |
94 | -- By default, the interactive object has a None type. |
95 | -- Because specific shapes entail different behavior |
96 | -- according to their sub-shapes, you may need to |
97 | -- create a Local Context. This will allow you to |
98 | -- specify the additional characteristics which you |
99 | -- need to handle these shapes. |
100 | |
101 | Signature(me) returns Integer from Standard is virtual; |
102 | ---Purpose: Specifies additional characteristics of Interactive |
103 | -- Objects. A signature is, in fact, an index with integer |
104 | -- values assigned different properties. |
105 | -- This method is frequently used in conjuction with |
106 | -- Type to give a particular type and signature to an |
107 | -- Interactive Object. By default, the Interactive Object |
108 | -- has a None type and a signature of 0. Among the |
109 | -- datums, this signature is attributed to the shape |
110 | -- The remaining datums have the following default signatures: |
111 | -- - Point signature 1 |
112 | -- - Axis signature 2 |
113 | -- - Trihedron signature 3 |
114 | -- - PlaneTrihedron signature 4 |
115 | -- - Line signature 5 |
116 | -- - Circle signature 6 |
117 | -- - Plane signature 7. |
118 | |
119 | |
120 | AcceptShapeDecomposition(me) returns Boolean from Standard is virtual; |
121 | ---C++: inline |
122 | ---Purpose: Informs the graphic context that the interactive Object |
123 | -- may be decomposed into sub-shapes for dynamic selection. |
124 | -- The most used Interactive Object is AIS_Shape. |
125 | -- Activation methods for standard selection modes are |
126 | -- proposed in the Interactive Context. These include |
127 | -- selection by vertex or by edges. For datums with the |
128 | -- same behavior as AIS_Shape, such as vetices and |
129 | -- edges, we must redefine the virtual method so that |
130 | -- AcceptShapeDecomposition returns false. |
131 | -- Rule for selection : |
132 | -- Mode 0 : Selection of the interactive Object itself |
133 | -- Mode 1 : Selection of vertices |
134 | -- Mode 2 : Selection Of Edges |
135 | -- Mode 3 : Selection Of Wires |
136 | -- Mode 4 : Selection Of Faces ... |
137 | |
138 | |
139 | SetCurrentFacingModel(me: mutable; |
140 | aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE); |
141 | ---Purpose: change the current facing model apply on polygons for |
142 | -- SetColor(), SetTransparency(), SetMaterial() methods |
143 | -- default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is |
144 | -- applying both on the front and back face. |
145 | |
146 | CurrentFacingModel(me) returns TypeOfFacingModel from Aspect; |
147 | ---Purpose: Returns the current facing model which is in effect. |
148 | |
149 | SetColor(me:mutable;aColor:Color from Quantity) is virtual; |
150 | |
151 | SetColor(me:mutable;aColor:NameOfColor from Quantity) is virtual; |
152 | ---Purpose: only the interactive obj knowns which Drawer attribute |
153 | -- is affected by the color (ex: for a wire, it's the |
154 | -- wireaspect field of the drawer, but for a vertex, only |
155 | -- the point aspect field is affected by the color) |
156 | -- WARNING : Do not forget to set the corresponding fields |
157 | -- here (hasOwnColor and myOwnColor) |
158 | |
159 | UnsetColor(me:mutable) is virtual; |
160 | ---Purpose: Removes color settings. Only the Interactive Object |
161 | -- knows which Drawer attribute is affected by the color |
162 | -- setting. For a wire, for example, wire aspect is the |
163 | -- attribute affected. For a vertex, however, only point |
164 | -- aspect is affected by the color setting. |
165 | |
166 | SetWidth(me:mutable; aValue:Real from Standard) is virtual; |
167 | ---Purpose: Allows you to provide the setting aValue for width. |
168 | -- Only the Interactive Object knows which Drawer |
169 | -- attribute is affected by the width setting. |
170 | |
171 | UnsetWidth(me:mutable) is virtual; |
172 | |
173 | AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is virtual; |
174 | ---Purpose: Returns true if the class of objects accepts the display mode aMode. |
175 | -- The interactive context can have a default mode of |
176 | -- representation for the set of Interactive Objects. This |
177 | -- mode may not be accepted by a given class of |
178 | -- objects. Consequently, this virtual method allowing us |
179 | -- to get information about the class in question must be implemented. |
180 | DefaultDisplayMode(me) returns Integer from Standard is virtual; |
181 | ---Purpose: Returns the default display mode. This method is to |
182 | -- be implemented when the main mode is not mode 0. |
183 | |
184 | |
185 | Redisplay (me:mutable; AllModes:Boolean from Standard =Standard_False); |
186 | ---Purpose: Updates the active presentation; if <AllModes> = Standard_True |
187 | -- all the presentations inside are recomputed. |
188 | |
189 | |
190 | SetInfiniteState(me:mutable;aFlag:Boolean from Standard = Standard_True); |
191 | ---Purpose: Sets the infinite state flag aFlage. |
192 | -- if <aFlag> = True , the interactiveObject is |
193 | -- considered as infinite, i.e. its graphic presentations |
194 | -- are not taken in account for View FitAll... |
195 | |
196 | IsInfinite(me) returns Boolean from Standard; |
197 | ---C++: inline |
198 | ---Purpose: |
199 | -- Returns true if the interactive object is infinite. In this |
200 | -- case, its graphic presentations are not taken into |
201 | -- account in the fit-all view. |
202 | |
203 | |
204 | ---Category: Link To InteractiveContext |
205 | |
206 | HasInteractiveContext(me) returns Boolean from Standard; |
207 | ---Purpose: Indicates whether the Interactive Object has a pointer |
208 | -- to an interactive context. |
209 | |
210 | GetContext(me) returns InteractiveContext from AIS; |
211 | ---Purpose: Returns the context pointer to the interactive context. |
212 | |
213 | SetContext(me:mutable; aCtx : InteractiveContext from AIS) is virtual; |
214 | ---Purpose: Sets the interactive context aCtx and provides a link |
215 | -- to the default drawing tool or "Drawer" if there is none. |
216 | |
217 | HasOwner (me) returns Boolean from Standard; |
218 | ---Purpose: Returns true if the object has an owner attributed to it. |
219 | -- The owner can be a shape for a set of sub-shapes or |
220 | -- a sub-shape for sub-shapes which it is composed of, |
221 | -- and takes the form of a transient. |
222 | |
223 | GetOwner (me) returns any Transient from Standard; |
224 | ---Purpose: Returns the owner of the Interactive Object. |
225 | -- The owner can be a shape for a set of sub-shapes or |
226 | -- a sub-shape for sub-shapes which it is composed of, |
227 | -- and takes the form of a transient. |
228 | -- There are two types of owners: |
229 | -- - Direct owners, decomposition shapes such as |
230 | -- edges, wires, and faces. |
231 | -- - Users, presentable objects connecting to sensitive |
232 | -- primitives, or a shape which has been decomposed. |
233 | ---C++: inline |
234 | ---C++: return const& |
235 | |
236 | |
237 | |
238 | SetOwner (me : mutable; |
239 | ApplicativeEntity : Transient from Standard); |
240 | ---Purpose: Allows you to attribute the owner ApplicativeEntity to |
241 | -- an Interactive Object. This can be a shape for a set of |
242 | -- sub-shapes or a sub-shape for sub-shapes which it |
243 | -- is composed of. The owner takes the form of a transient. |
244 | ---C++: inline |
245 | |
246 | ClearOwner(me:mutable); |
247 | ---Purpose: Each Interactive Object has methods which allow us |
248 | -- to attribute an Owner to it in the form of a Transient. |
249 | -- This method removes the owner from the graphic entity. |
250 | |
251 | |
252 | HasUsers(me) returns Boolean from Standard; |
253 | |
254 | Users(me) returns ListOfTransient from TColStd; |
255 | ---C++: inline |
256 | ---C++: return const& |
257 | |
258 | |
259 | AddUser(me:mutable; aUser : Transient from Standard); |
260 | |
261 | ClearUsers(me:mutable); |
262 | |
263 | |
264 | |
265 | ---Category: "STANDARD" LOCAL ATTRIBUTES : |
266 | -- |
267 | -- -Local DisplayMode |
268 | -- -Color |
269 | -- -width of lines or points |
270 | -- -typeOfLine or Marker Aspect |
271 | -- -material name (if needed) |
272 | -- -transparency (if needed) |
273 | -- |
274 | -- Specific attributes of entities (such as |
275 | -- arrow aspect for dimensions) must be |
276 | -- loaded in a Drawer; this drawer is then |
277 | -- applied to InteractiveObject WARNING : |
278 | -- Here the Methods for standard attributes |
279 | -- are virtual and do nothing they must be |
280 | -- redefined by the inheriting classes |
281 | -- (setcolor for a point and setcolor for a plane |
282 | -- don't affect the same attributes in the Drawer) |
283 | |
284 | |
285 | HasDisplayMode (me) |
286 | returns Boolean from Standard; |
287 | ---Purpose: |
288 | -- Returns true if the Interactive Object has a display |
289 | -- mode setting. Otherwise, it is displayed in Neutral Point. |
290 | ---C++: inline |
291 | |
292 | SetDisplayMode(me : mutable; aMode : Integer from Standard); |
293 | ---Purpose: Sets the display mode aMode for the interactive object. |
294 | -- An object can have its own temporary display mode, |
295 | -- which is different from that proposed by the interactive context. |
296 | -- The range of possibilities currently proposed is the following: |
297 | -- - AIS_WireFrame |
298 | -- - AIS_Shaded |
7fd59977 |
299 | -- This range can, however, be extended through the creation of new display modes. |
300 | |
301 | UnsetDisplayMode(me : mutable); |
302 | ---Purpose: Removes display mode settings from the interactive object. |
303 | ---C++: inline |
304 | |
305 | DisplayMode(me) |
306 | returns Integer; |
307 | ---C++: inline |
308 | ---Purpose: Returns the display mode setting of the Interactive Object. |
309 | -- The range of possibilities is the following: |
310 | -- - AIS_WireFrame |
311 | -- - AIS_Shaded |
7fd59977 |
312 | -- This range can, however, be extended through the |
313 | -- creation of new display modes. |
314 | |
315 | |
316 | HasSelectionMode(me) returns Boolean from Standard; |
317 | ---Purpose: Allows you to change the selection mode of an |
318 | -- Interactive Object. |
319 | -- The default selection mode setting is 0. |
320 | -- For shapes, for example, the selection modes are as follows: |
321 | -- - mode 0 - selection of the shape itself |
322 | -- - mode 1 - selection of vertices |
323 | -- - mode 2 - selection of edges |
324 | -- - mode 3 - selection of wires |
325 | -- - mode 4 - selection of faces |
326 | -- - mode 5 - selection of shells |
327 | -- - mode 6 - selection of solids |
328 | -- - mode 7 - selection of compounds |
329 | -- For trihedra, on the other hand, the selection modes are the following four: |
330 | -- - mode 0 - selection of a trihedron |
331 | -- - mode 1 - selection of its origin |
332 | -- - mode 2 - selection of its axes |
333 | -- - mode 3 - selection of its planes |
334 | |
335 | SelectionMode(me) returns Integer from Standard; |
336 | ---Purpose: Returns the selection mode of the interactive object. |
337 | |
338 | SetSelectionMode(me:mutable; aMode: Integer from Standard); |
339 | ---Purpose: You can change the default selection mode index |
340 | -- aMode of an Interactive Object. |
341 | -- This is only of interest if you decide that mode 0 |
342 | -- adopted by convention will not do. |
343 | |
344 | UnsetSelectionMode(me:mutable); |
345 | ---Purpose: You can change the default selection mode index of |
346 | -- an Interactive Object. |
347 | -- This is only of interest if you decide that the 0 mode |
348 | -- adopted by convention will not do. |
349 | ---C++: inline |
350 | |
351 | |
352 | SelectionPriority(me) returns Integer from Standard; |
353 | ---C++: inline |
354 | ---Purpose: Returns the selection priority setting. -1 indicates that there is none. |
355 | -- You can modify the selection priority of an owner to |
356 | -- make one entity more selectionable than another one. |
357 | -- The default selection priority for an owner is 5, for |
358 | -- example. To increase selection priority, choose a |
359 | -- setting between 5 and 10. An entity with priority 7 will |
360 | -- take priority over one with a setting of 6 if both |
361 | -- objects are selected at the same time. |
362 | -- You could give vertices priority 8, edges priority 7, |
363 | -- faces priority 6, and shapes priority 5. If a vertex, an |
364 | -- edge and a face are simultaneously detected during |
365 | -- selection, only the vertex will then be highlighted. |
366 | -- For trihedra, for example, the default priorities are the following four: |
367 | -- - priority 1 - a trihedron |
368 | -- - priority 5 - its origin |
369 | -- - priority 3 - its axes |
370 | -- - priority 2 - its planes |
371 | |
372 | SetSelectionPriority(me:mutable; aPriority : Integer from Standard); |
373 | ---C++: inline |
374 | ---Purpose: Allows you to provide a setting aPriority for selection priority. |
375 | -- You can modify selection priority of an owner to make |
376 | -- one entity more selectionable than another one. The |
377 | -- default selection priority for an owner is 5, for |
378 | -- example. To increase selection priority, choose a |
379 | -- setting between 5 and 10. An entity with priority 7 will |
380 | -- take priority over one with a setting of 6. |
381 | |
382 | UnsetSelectionPriority(me:mutable); |
383 | ---C++: inline |
384 | ---Purpose: Removes the setting for selection priority. SelectionPriority then returns -1. |
385 | |
386 | HasSelectionPriority(me) returns Boolean from Standard; |
387 | ---C++: inline |
388 | ---Purpose: Returns true if there is a setting for selection priority. |
389 | -- You can modify selection priority of an owner to make |
390 | -- one entity more selectionable than another one. The |
391 | -- default selection priority for an owner is 5, for |
392 | -- example. To increase selection priority, choose a |
393 | -- setting between 5 and 10. An entity with priority 7 will |
394 | -- take priority over one with a setting of 6. |
395 | |
396 | HasHilightMode(me) returns Boolean from Standard; |
397 | ---C++: inline |
398 | ---Purpose: Returns true if the Interactive Object is in highlight mode. |
399 | |
400 | HilightMode(me) returns Integer from Standard ; |
401 | ---C++: inline |
402 | ---Purpose: Returns the setting for highlight mode. |
403 | -- At dynamic detection, the presentation echoed by the |
404 | -- Interactive Context, is by default the presentation |
405 | -- already on the screen. You can specify a Highlight |
406 | -- presentation mode which is valid no matter what the |
407 | -- active representation of the object. It makes no |
408 | -- difference whether this choice is temporary or |
409 | -- definitive. To do this, we use the following functions: |
410 | -- - SetHilightMode |
411 | -- - UnSetHilightMode |
412 | -- In the case of a shape, whether it is visualized in |
413 | -- wireframe presentation or with shading, we want to |
414 | -- systematically highlight the wireframe presentation. |
415 | -- Consequently, we set the highlight mode to 0. |
416 | |
417 | SetHilightMode(me:mutable;anIndex : Integer from Standard); |
418 | ---C++: inline |
419 | ---Purpose: Sets the highlight mode anIndex for the interactive object. |
420 | -- If, for example, you want to systematically highlight |
421 | -- the wireframe presentation of a shape - whether |
422 | -- visualized in wireframe presentation or with shading - |
423 | -- you set the highlight mode to 0. |
424 | |
425 | UnsetHilightMode(me:mutable); |
426 | ---C++: inline |
427 | ---Purpose: Allows the user to take a given Prs for hilight |
428 | -- ex : for a shape which would be displayed in shading mode |
429 | -- the hilight Prs is the wireframe mode. |
430 | -- if No specific hilight mode is defined, the displayed Prs |
431 | -- will be the hilighted one. |
432 | |
433 | HasColor (me) returns Boolean from Standard; |
434 | ---C++: inline |
435 | ---Purpose: Returns true if the Interactive Object has color. |
436 | |
437 | Color(me) returns NameOfColor from Quantity is virtual; |
438 | ---C++: inline |
439 | ---Purpose: Returns the color setting of the Interactive Object. |
440 | |
441 | Color(me; aColor: out Color from Quantity) is virtual; |
442 | ---C++: inline |
443 | |
444 | HasWidth(me) returns Boolean from Standard; |
445 | ---C++: inline |
446 | ---Purpose: Returns true if the Interactive Object has width. |
447 | |
448 | Width(me) returns Real from Standard ; |
449 | --- Purpose: Returns the width setting of the Interactive Object. |
450 | |
451 | HasMaterial(me) returns Boolean from Standard ; |
452 | ---Purpose: Returns true if the Interactive Object has a setting for material. |
453 | Material(me) returns NameOfMaterial from Graphic3d is virtual; |
454 | ---Purpose: Returns the current material setting. |
455 | -- This will be on of the following materials: |
456 | -- - Brass |
457 | -- - Bronze |
458 | -- - Gold |
459 | -- - Pewter |
460 | -- - Silver |
461 | -- - Stone. |
462 | |
463 | SetMaterial(me:mutable;aName:NameOfMaterial from Graphic3d) is virtual; |
464 | ---Purpose: Sets the name aName for material defining this |
465 | -- display attribute for the interactive object. |
466 | -- Material aspect determines shading aspect, color and |
467 | -- transparency of visible entities. |
468 | |
469 | |
470 | SetMaterial(me:mutable;aName:MaterialAspect from Graphic3d) is virtual; |
471 | --- Purpose: Sets the material aMat defining this display attribute |
472 | -- for the interactive object. |
473 | -- Material aspect determines shading aspect, color and |
474 | -- transparency of visible entities. |
475 | |
476 | UnsetMaterial(me:mutable) is virtual; |
477 | ---Purpose: Removes the setting for material. |
478 | |
479 | SetTransparency(me:mutable;aValue : Real from Standard=0.6) is virtual; |
480 | ---Purpose: Attributes a setting aValue for transparency. |
481 | -- The transparency value should be between 0.0 and 1.0. |
482 | -- At 0.0 an object will be totally opaque, and at 1.0, fully transparent. |
483 | -- Warning At a value of 1.0, there may be nothing visible. |
484 | |
485 | IsTransparent(me) returns Boolean from Standard; |
486 | ---C++: inline |
487 | ---Purpose: Returns true if there is a transparency setting. |
488 | |
489 | Transparency(me) returns Real from Standard is virtual; |
490 | ---Purpose: Returns the transparency setting. |
491 | -- This will be between 0.0 and 1.0. |
492 | -- At 0.0 an object will be totally opaque, and at 1.0, fully transparent. |
493 | |
494 | UnsetTransparency(me:mutable) is virtual; |
495 | ---Purpose: Removes the transparency setting. The object is opaque by default. |
496 | |
497 | SetAttributes(me:mutable; aDrawer: Drawer from AIS) is virtual; |
498 | ---Purpose: Initializes the drawing tool aDrawer. |
499 | |
500 | Attributes(me) returns any Drawer from AIS; |
501 | ---C++: return const& |
502 | ---C++: inline |
503 | ---Purpose: Returns the attributes settings. |
504 | |
505 | UnsetAttributes(me:mutable) is virtual; |
506 | ---Purpose: Clears settings provided by the drawing tool aDrawer. |
507 | |
508 | ---Category: information about Prs to be recomputed |
509 | -- after local attributes change... to be removed... |
510 | |
511 | RecomputeEveryPrs(me) returns Boolean is virtual private; |
512 | |
513 | MustRecomputePrs(me;aMode : Integer from Standard) is private; |
514 | |
515 | ListOfRecomputeModes(me)returns ListOfInteger from TColStd is private; |
516 | ---C++: return const& |
517 | SetRecomputeOk(me:mutable) is private; |
518 | |
7fd59977 |
519 | State(me:mutable;theState: Integer from Standard) ; |
520 | ---C++: inline |
521 | State(me) returns Integer from Standard ; |
522 | ---C++: inline |
523 | |
7fd59977 |
524 | SetTransformation ( me : mutable; |
525 | aTranformation: Transformation from Geom; |
526 | postConcatenate: Boolean from Standard = Standard_False; |
527 | updateSelection: Boolean from Standard = Standard_True) |
528 | is static; |
529 | ---Level: Public |
530 | ---Purpose: Transforms all presentations of the object |
531 | -- and replace the actual transformation matrix if <postConcatenate> is FALSE. |
532 | -- Note that the selection must be updated only at the end of |
533 | -- object animation when <updateSelection> is TRUE |
534 | ---Category: Transformation method |
535 | |
536 | UnsetTransformation ( me : mutable ) |
537 | is static; |
538 | ---Level: Public |
539 | ---Purpose: Deactivate the current transformation |
540 | ---Category: Transformation method |
541 | |
542 | Transformation ( me : mutable ) returns Transformation from Geom |
543 | is static; |
544 | ---Level: Public |
545 | ---Purpose: Returns the current transformation associated |
546 | -- to the first available presentation of this object. |
547 | ---Category: Inquire transformation method |
548 | |
549 | HasTransformation ( me ) returns Boolean from Standard |
550 | is static; |
551 | ---Level: Public |
552 | ---Purpose: Returns TRUE when this object is transformed |
553 | ---Category: Inquire transformation method |
554 | |
555 | HasPresentation ( me ) returns Boolean from Standard |
556 | is static; |
557 | ---Level: Public |
558 | ---Purpose: Returns TRUE when this object has a presentation |
559 | -- in the current DisplayMode() |
560 | ---Category: Inquire transformation method |
561 | |
562 | Presentation ( me ) returns Presentation from Prs3d |
563 | is static; |
564 | ---Level: Public |
565 | ---Purpose: Returns the current presentation of this object |
566 | -- according to the current DisplayMode() |
567 | ---Category: Inquire transformation method |
568 | |
569 | SetAspect ( me : mutable; anAspect: any BasicAspect from Prs3d; |
570 | globalChange: Boolean from Standard = Standard_True) |
571 | is static; |
572 | ---Level: Public |
573 | ---Purpose: Sets the graphic basic aspect to the current presentation. |
574 | -- When <globalChange> is TRUE , the full object presentation |
575 | -- is changed. |
576 | -- When <globalChange> is FALSE , only the current group |
577 | -- of the object presentation is changed. |
578 | ---Category: Graphic attributes management |
579 | |
580 | -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets |
581 | SetPolygonOffsets ( me : mutable; |
582 | aMode : Integer from Standard; |
60be1f9b |
583 | aFactor : ShortReal from Standard = 1.0; |
584 | aUnits : ShortReal from Standard = 0.0 ) is virtual; |
7fd59977 |
585 | ---Level: Public |
586 | ---Purpose: Sets up polygon offsets for this object. |
587 | -- It modifies all existing presentations of <anObj> (if any), |
588 | -- so it is reasonable to call this method after <anObj> has been displayed. |
589 | -- Otherwise, Compute() method should pass Graphic3d_AspectFillArea3d |
590 | -- aspect from <myDrawer> to Graphic3d_Group to make polygon offsets work. |
591 | -- |
592 | -- <aMode> parameter can contain various combinations of |
593 | -- Aspect_PolygonOffsetMode enumeration elements (Aspect_POM_None means |
594 | -- that polygon offsets are not changed). |
595 | -- If <aMode> is different from Aspect_POM_Off and Aspect_POM_None, then <aFactor> and <aUnits> |
596 | -- arguments are used by graphic renderer to calculate a depth offset value: |
597 | -- |
598 | -- offset = <aFactor> * m + <aUnits> * r, where |
599 | -- m - maximum depth slope for the polygon currently being displayed, |
600 | -- r - minimum window coordinates depth resolution (implementation-specific). |
601 | -- |
602 | -- Deafult settings for OCC 3D viewer: mode = Aspect_POM_Fill, factor = 1., units = 0. |
603 | -- |
604 | -- Negative offset values move polygons closer to the viewport, |
605 | -- while positive values shift polygons away. |
606 | -- Consult OpenGL reference for details (glPolygonOffset function description). |
607 | -- |
608 | -- NOTE: This method has a side effect - it creates own shading aspect |
609 | -- if not yet created, so it is better to set up object material, |
610 | -- color, etc. first. |
611 | ---Category: Graphic attributes management |
612 | |
613 | HasPolygonOffsets ( me ) |
614 | returns Boolean from Standard |
615 | is virtual; |
616 | ---Level: Public |
617 | ---Purpose: Returns Standard_True if <myDrawer> has non-null shading aspect |
618 | ---Category: Inquire methods |
619 | |
620 | PolygonOffsets ( me; |
621 | aMode : out Integer from Standard; |
60be1f9b |
622 | aFactor : out ShortReal from Standard; |
623 | aUnits : out ShortReal from Standard ) is virtual; |
7fd59977 |
624 | ---Level: Public |
625 | ---Purpose: Retrieves current polygon offsets settings from <myDrawer>. |
626 | ---Category: Inquire methods |
627 | |
628 | fields |
629 | |
630 | myCTXPtr : PToContext from AIS; |
631 | |
632 | -- The reference to applicative World... |
633 | |
634 | myOwner : Transient from Standard; |
635 | myUsers : ListOfTransient from TColStd; |
636 | |
637 | -- The Information Fields |
638 | |
639 | myDrawer : Drawer from AIS is protected ; |
640 | myTransparency : Real from Standard is protected; |
641 | -- GER61351 myOwnColor : NameOfColor from Quantity is protected; |
642 | myOwnColor : Color from Quantity is protected; |
643 | myOwnMaterial : NameOfMaterial from Graphic3d is protected; |
644 | ---myOwnMaterial : NameOfPhysicalMaterial from Graphic3d is protected; |
645 | mySelPriority : Integer from Standard; |
646 | myDisplayMode : Integer from Standard ; |
647 | mySelectionMode : Integer from Standard; |
648 | myHilightMode : Integer from Standard is protected; |
649 | myOwnWidth : Real from Standard is protected; |
650 | myInfiniteState : Boolean from Standard is protected; |
651 | hasOwnColor : Boolean from Standard is protected; |
652 | hasOwnMaterial : Boolean from Standard is protected ; |
653 | myCurrentFacingModel: TypeOfFacingModel from Aspect is protected; |
654 | |
655 | -- the management field (to be removed)... |
656 | myRecomputeEveryPrs : Boolean from Standard is protected; |
657 | |
658 | myToRecomputeModes : ListOfInteger from TColStd is protected; |
659 | mystate : Integer from Standard; |
660 | myHasTransformation : Boolean from Standard; |
661 | |
662 | |
663 | friends |
664 | class InteractiveContext from AIS |
665 | |
666 | end InteractiveObject; |
667 | |