b311480e |
1 | -- Created on: 1997-04-22 |
2 | -- Created by: Guest Design |
3 | -- Copyright (c) 1997-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 | |
17 | class MultipleConnectedInteractive from AIS inherits InteractiveObject from AIS |
18 | |
19 | |
20 | ---Purpose: Defines an Interactive Object by gathering together |
21 | -- several object presentations. This is done through a |
22 | -- list of interactive objects. These can also be |
23 | -- Connected objects. That way memory-costly |
24 | -- calculations of presentation are avoided. |
25 | |
26 | |
27 | uses |
28 | |
29 | |
30 | TypeOfPresentation3d from PrsMgr, |
31 | InteractiveObject from AIS, |
32 | Boolean from Standard, |
33 | SequenceOfInteractive from AIS, |
34 | KindOfInteractive from AIS, |
35 | PresentationManager3d from PrsMgr, |
7fd59977 |
36 | Presentation from Prs3d, |
37 | Projector from Prs3d, |
38 | Transformation from Geom, |
39 | Integer from Standard, |
40 | Selection from SelectMgr |
41 | |
42 | is |
43 | |
44 | |
45 | Create (aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView) |
6e33d3ce |
46 | returns MultipleConnectedInteractive from AIS; |
7fd59977 |
47 | ---Purpose: Initializes the Interactive Object with multiple |
48 | -- presentation connections. If aTypeOfPresentation3d |
49 | -- does not have the affectation PrsMgr_TOP_AllView, |
50 | -- it is projector dependent. |
51 | |
52 | Connect(me : mutable; |
53 | anotherIObj : InteractiveObject from AIS); |
54 | ---Purpose: Add anotherIObj in the presentation of me |
55 | |
56 | |
57 | Type(me) returns KindOfInteractive from AIS |
58 | is redefined virtual; |
59 | |
60 | Signature(me) returns Integer from Standard |
61 | is redefined virtual; |
62 | |
63 | HasConnection(me) returns Boolean from Standard; |
64 | ---Purpose: Returns true if the object is connected to others. |
65 | |
66 | ConnectedTo(me) returns SequenceOfInteractive from AIS; |
67 | ---Purpose: |
68 | -- Returns the connection references of the previous |
69 | -- Interactive Objects in view. |
70 | ---C++: inline |
71 | ---C++: return const& |
72 | |
73 | Disconnect(me:mutable; |
74 | anotherIObj : InteractiveObject from AIS); |
75 | ---Purpose: Removes the connection anotherIObj to an entity. |
76 | |
77 | DisconnectAll(me:mutable); |
78 | ---Purpose: Clears all the connections to objects. |
79 | |
80 | Compute(me:mutable; |
81 | aPresentationManager : PresentationManager3d from PrsMgr; |
6e33d3ce |
82 | aPresentation : Presentation from Prs3d; |
7fd59977 |
83 | aMode : Integer from Standard = 0) |
84 | ---Level: Internal |
85 | ---Purpose: this method is redefined virtual; |
86 | -- when the instance is connected to another |
87 | -- InteractiveObject,this method doesn't |
88 | -- compute anything, but just uses the |
89 | -- presentation of this last object, with |
90 | -- a transformation if there's one stored. |
792c785c |
91 | is redefined virtual protected; |
7fd59977 |
92 | |
7fd59977 |
93 | Compute(me : mutable; |
94 | aProjector : Projector from Prs3d; |
95 | aTrsf : Transformation from Geom; |
6e33d3ce |
96 | aPresentation : Presentation from Prs3d) |
7fd59977 |
97 | is redefined; |
98 | ---Purpose: computes the presentation according to a point of view |
99 | -- given by <aProjector>. |
100 | -- To be Used when the associated degenerated Presentations |
101 | -- have been transformed by <aTrsf> which is not a Pure |
102 | -- Translation. The HLR Prs can't be deducted automatically |
103 | -- WARNING :<aTrsf> must be applied |
104 | -- to the object to display before computation !!! |
105 | |
106 | Compute(me:mutable; |
107 | aProjector: Projector from Prs3d; |
6e33d3ce |
108 | aPresentation: Presentation from Prs3d) |
7fd59977 |
109 | is redefined ; |
110 | |
6e33d3ce |
111 | ComputeSelection(me:mutable; aSelection : Selection from SelectMgr; |
7fd59977 |
112 | aMode : Integer from Standard) |
113 | is redefined virtual private; |
114 | |
115 | |
116 | |
117 | fields |
118 | |
119 | myReferences : SequenceOfInteractive from AIS; |
120 | myPreviousReferences : SequenceOfInteractive from AIS; |
121 | |
122 | end MultipleConnectedInteractive; |