7fd59977 |
1 | -- File: AIS_ConnectedShape.cdl |
2 | -- Created: Wed Jan 8 17:57:55 1997 |
3 | -- Author: Robert COUBLANC |
4 | -- <rob@robox.paris1.matra-dtv.fr> |
5 | --Modified by rob on Jul-28-97 |
6 | ---Copyright: Matra Datavision 1997 |
7 | |
8 | |
9 | class ConnectedShape from AIS inherits ConnectedInteractive from AIS |
10 | |
11 | ---Purpose: Constructs a Connected Interactive Object with an |
12 | -- AIS_Shape presentation as its reference Interactive Object. |
13 | -- In topological decomposition of the shape, this class |
14 | -- assigns the same owners to the sensitive primitives |
15 | -- as those in AIS_Shape. Like AIS_Shape, it allows a |
16 | -- presentation of hidden parts. These are calculated |
17 | -- automatically from the shape of its reference entity. |
18 | |
19 | |
20 | |
21 | uses |
22 | |
23 | Shape from TopoDS, |
24 | Projector from Prs3d, |
25 | Presentation from Prs3d, |
26 | Selection from SelectMgr, |
27 | Integer from Standard, |
28 | Shape from AIS, |
29 | TypeOfPresentation3d from PrsMgr, |
30 | GraphicObject from Graphic2d, |
31 | PresentationManager3d from PrsMgr, |
32 | PresentationManager2d from PrsMgr, |
33 | InteractiveObject from AIS, |
34 | KindOfInteractive from AIS, |
35 | Location from TopLoc, |
36 | Transformation from Geom |
37 | raises |
38 | NotImplemented from Standard |
39 | |
40 | is |
41 | |
42 | Create (aTypeOfPresentation : TypeOfPresentation3d from PrsMgr |
43 | =PrsMgr_TOP_ProjectorDependant) |
44 | returns mutable ConnectedShape from AIS; |
45 | ---Purpose: Initializes the type of 3d presentation aTypeOfPresentation |
46 | |
47 | Create (aInteractiveShape : Shape from AIS; |
48 | aTypeOfPresentation : TypeOfPresentation3d from PrsMgr |
49 | =PrsMgr_TOP_ProjectorDependant) |
50 | returns mutable ConnectedShape from AIS; |
51 | ---Purpose: Initializes the entity aInteractiveShape and the type of 3d presentation aTypeOfPresentation. |
52 | |
53 | Create(aConnectedShape : ConnectedShape from AIS; |
54 | aTypeOfPresentation : TypeOfPresentation3d from PrsMgr |
55 | =PrsMgr_TOP_ProjectorDependant) |
56 | returns mutable ConnectedShape from AIS; |
57 | ---Purpose: Initializes the entity aConnectedShape and the type of 3d presentation aTypeOfPresentation. |
58 | |
59 | ---Category: Redefined methods... |
60 | |
61 | Type(me) returns KindOfInteractive from AIS |
62 | is redefined virtual; |
63 | |
64 | Signature(me) returns Integer from Standard |
65 | is redefined virtual; |
66 | |
67 | AcceptShapeDecomposition(me) |
68 | returns Boolean from Standard is redefined; |
69 | |
70 | |
71 | |
72 | |
73 | Connect(me : mutable; |
74 | anotherIObj : InteractiveObject from AIS) is redefined ; |
75 | ---Purpose: Establishes the connection between the Connected |
76 | -- Interactive Object, anotherIobj, and its reference |
77 | -- entity. If there is already a previous connection with |
78 | -- an Interactive Object, this connection is removed. |
79 | |
80 | Connect(me:mutable; |
81 | anotherIobj: InteractiveObject from AIS; |
82 | aLocation : Location from TopLoc) is redefined; |
83 | ---Purpose: Establishes the connection between the Connected |
84 | -- Interactive Object, anotherIobj, and its reference |
85 | -- entity. If there is already a previous connection with |
86 | -- an Interactive Object, this connection is removed. |
87 | -- This syntax also initiates the location of the Connected Interactive Object. |
88 | |
89 | |
90 | Compute(me:mutable; |
91 | aProjector : Projector from Prs3d; |
92 | aPresentation: mutable Presentation from Prs3d) |
93 | is redefined virtual private; |
94 | |
95 | Compute(me : mutable; |
96 | aProjector : Projector from Prs3d; |
97 | aTrsf : Transformation from Geom; |
98 | aPresentation : mutable Presentation from Prs3d) |
99 | is redefined virtual private; |
100 | |
101 | Compute(me : mutable; |
102 | aPresentationManager : PresentationManager3d from PrsMgr; |
103 | aPresentation : mutable Presentation from Prs3d; |
104 | aMode : Integer from Standard = 0) |
105 | ---Level: Public |
106 | ---Purpose: this method is redefined virtual; |
107 | -- when the instance is connected to another |
108 | -- InteractiveObject,this method doesn't |
109 | -- compute anything, but just uses the |
110 | -- presentation of this last object, with |
111 | -- a transformation if there's one stored. |
112 | is redefined; |
113 | |
114 | |
115 | |
116 | ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr; |
117 | aMode : Integer from Standard) |
118 | is redefined virtual private; |
119 | ---Purpose: |
120 | -- Recovers and calculates any sensitive primitive, |
121 | -- aSelection, available in Shape mode, specified by |
122 | -- aMode . As a rule, these are sensitive faces. |
123 | -- This method is defined as virtual. This enables you to |
124 | -- implement it in the creation of a new class of |
125 | -- Interactive Object. You need to do this and in so |
126 | -- doing, redefine this method, if you create a class |
127 | -- which enriches the list of signatures and types. |
128 | |
129 | Compute(me:mutable; |
130 | aPresentationManager: PresentationManager2d from PrsMgr; |
131 | aPresentation: mutable GraphicObject from Graphic2d; |
132 | aMode: Integer from Standard = 0) |
133 | ---Level: Internal |
134 | ---Purpose: this method should fill the presentation according to the |
135 | -- enumerated mode of the application and to the display parameter |
136 | -- of the application. |
137 | |
138 | raises NotImplemented from Standard |
139 | is redefined; |
140 | |
141 | Shape(me:mutable) returns Shape from TopoDS; |
142 | ---C++: return const& |
143 | ---Purpose: Returns the topological shape which is the reference |
144 | -- for the connected shape. Sets hilight mode to index |
145 | -- 0. This returns a wireframe presentation. |
146 | |
147 | |
148 | UpdateShape(me:mutable;WithLocation:Boolean from Standard = Standard_True) |
149 | is static private; |
150 | |
151 | Compute(me:mutable; |
152 | aProjector : Projector from Prs3d; |
153 | aPresentation: mutable Presentation from Prs3d; |
154 | aShape : Shape from TopoDS) |
155 | is private; |
156 | |
157 | |
158 | fields |
159 | |
160 | myOwnSh : Shape from TopoDS; -- used for HLR and selection... |
161 | |
162 | end ConnectedShape; |