7fd59977 |
1 | -- File: PrsMgr_PresentationManager3d.cdl |
2 | -- Created: Thu Oct 21 12:45:31 1993 |
3 | -- Author: Jean-Louis FRENKEL |
4 | -- <jlf@stylox> |
5 | -- Modified by rob Aug 20 98 : |
6 | -- new Methods : Is3D() , AddToImmediateList (Prs) |
7 | -- BeginDraw redefined |
8 | -- new field : myStrList |
9 | -- => allows users to store independant Graphic Structures |
10 | -- which will be displayed in immediate mode when EndDraw |
11 | -- is applied |
12 | ---Copyright: Matra Datavision 1993 |
13 | |
14 | |
15 | class PresentationManager3d from PrsMgr inherits PresentationManager from PrsMgr |
16 | |
17 | ---Purpose: A framework to manage 3D displays, graphic entities |
18 | -- and their updates. |
19 | -- Used in the AIS package (Application Interactive |
20 | -- Services), to enable the advanced user to define the |
21 | -- default display mode of a new interactive object which |
22 | -- extends the list of signatures and types. |
23 | -- Definition of new display types is handled by calling |
24 | -- the presentation algorithms provided by the StdPrs package. |
25 | |
26 | uses |
27 | ListOfTransient from TColStd, |
28 | StructureManager from Graphic3d, |
29 | PresentableObject from PrsMgr, |
30 | Length,NameOfColor from Quantity, |
31 | Transformation from Geom, |
32 | NameOfMaterial from Graphic3d, |
33 | --NameOfMaterialPhysic from Graphic3d, |
34 | --NameOfPhysicalMaterial from Graphic3d, |
35 | Presentation from PrsMgr, |
36 | Presentation3d from PrsMgr, |
37 | View from Viewer, |
38 | ShadingAspect from Prs3d, |
39 | Presentation from Prs3d |
40 | is |
41 | |
42 | Create(aStructureManager: StructureManager from Graphic3d) |
43 | returns mutable PresentationManager3d from PrsMgr; |
44 | ---Purpose: |
45 | -- Creates a framework to manage displays and graphic |
46 | -- entities with the 3D view aStructureManager. |
47 | |
48 | Is3D(me) returns Boolean from Standard is redefined; |
49 | |
50 | Color(me: mutable; |
51 | aPresentableObject: mutable PresentableObject from PrsMgr; |
52 | aColor: NameOfColor from Quantity = Quantity_NOC_YELLOW; |
53 | aMode: Integer from Standard = 0) |
54 | ---Purpose: Highlights the graphic object aPresentableObject in |
55 | -- the color aColor. |
56 | -- aPresentableObject has the display mode aMode; |
57 | -- this has the default value of 0, that is, the wireframe display mode. |
58 | is static; |
59 | |
60 | |
61 | BoundBox(me: mutable; aPresentableObject: mutable PresentableObject from PrsMgr; |
62 | aMode: Integer from Standard = 0) |
63 | ---Purpose: highlights the boundbox of the presentation |
64 | |
65 | is static; |
66 | |
67 | ---Category: Immediate display methods. |
68 | -- |
69 | |
70 | BeginDraw(me:mutable) is redefined static; |
71 | |
72 | AddToImmediateList(me:mutable;aPrs:Presentation from Prs3d); |
73 | ---Purpose: stores <aPrs> in a list of structure to be displayed |
74 | -- in immediate mode. will be taken in account in EndDraw Method. |
75 | |
76 | EndDraw(me: mutable; aView: View from Viewer; DoubleBuffer: Boolean from Standard = Standard_False) |
77 | is redefined static; |
78 | |
79 | |
80 | ---Category: references to other presentation. |
81 | |
82 | Connect(me: mutable; |
83 | aPresentableObject: PresentableObject from PrsMgr; |
84 | anOtherObject: mutable PresentableObject from PrsMgr; |
85 | aMode: Integer from Standard = 0; |
86 | anOtherMode: Integer from Standard = 0) |
87 | is static; |
88 | |
89 | ---Category: Transformation methods. |
90 | |
91 | Transform (me: mutable; |
92 | aPresentableObject: PresentableObject from PrsMgr; |
93 | aTransformation: Transformation from Geom; |
94 | aMode: Integer from Standard = 0) |
95 | ---Purpose: |
96 | -- Sets the transformation aTransformation for the |
97 | -- presentable object aPresentableObject. |
98 | -- aPresentableObject has the display mode aMode; |
99 | -- this has the default value of 0, that is, the wireframe |
100 | -- display mode. |
101 | is static; |
102 | |
103 | Place (me: mutable; aPresentableObject: PresentableObject from PrsMgr; |
104 | X,Y,Z: Length from Quantity; |
105 | aMode: Integer from Standard = 0) |
106 | ---Purpose: |
107 | -- Sets a position to move the presentable object |
108 | -- aPresentableObject to. This position is defined by the |
109 | -- lengths along the x, y and z axes: X, Y and Z respectively. |
110 | -- aPresentableObject has the display mode aMode; |
111 | -- this has the default value of 0, that is, the wireframe display mode. |
112 | is static; |
113 | |
114 | Multiply (me: mutable; |
115 | aPresentableObject: PresentableObject from PrsMgr; |
116 | aTransformation: Transformation from Geom; |
117 | aMode: Integer from Standard = 0) |
118 | ---Purpose: |
119 | -- Defines the transformation aTransformation for the |
120 | -- presentable object aPresentableObject. |
121 | -- aPresentableObject has the display mode aMode; |
122 | -- this has the default value of 0, that is, the wireframe |
123 | -- display mode. |
124 | is static; |
125 | |
126 | Move (me: mutable; aPresentableObject: PresentableObject from PrsMgr; |
127 | X,Y,Z: Length from Quantity; |
128 | aMode: Integer from Standard = 0) |
129 | ---Purpose: |
130 | -- Sets a position to move the presentable object |
131 | -- aPresentableObject to. This position is defined by the |
132 | -- lengths along the x, y and z axes: X, Y and Z respectively. |
133 | -- aPresentableObject has the display mode aMode; |
134 | -- this has the default value of 0, that is, the wireframe |
135 | -- display mode. |
136 | is static; |
137 | |
138 | StructureManager(me) returns mutable StructureManager from Graphic3d |
139 | is static; |
140 | ---C++: inline |
141 | ---C++: return const& |
142 | ---Purpose: Returns the structure manager. |
143 | |
144 | SetShadingAspect(me: mutable; |
145 | aPresentableObject: PresentableObject from PrsMgr; |
146 | aColor: NameOfColor from Quantity; |
147 | aMaterial: NameOfMaterial from Graphic3d; |
148 | --aMaterial: NameOfPhysicalMaterial from Graphic3d; |
149 | aMode: Integer from Standard = 0) |
150 | ---Purpose: this method will change the color and the aspect |
151 | -- of the presentations containg shaded structures. |
152 | is static; |
153 | |
154 | |
155 | SetShadingAspect(me: mutable; |
156 | aPresentableObject: PresentableObject from PrsMgr; |
157 | aShadingAspect: ShadingAspect from Prs3d; |
158 | aMode: Integer from Standard = 0) |
159 | ---Purpose: this method will change the color and the aspect |
160 | -- of the presentations containg shaded structures. |
161 | is static; |
162 | |
163 | |
164 | CastPresentation(me; aPresentableObject: PresentableObject from PrsMgr; |
165 | aMode: Integer from Standard = 0) |
166 | returns mutable Presentation3d from PrsMgr |
167 | is static ; |
168 | |
169 | newPresentation(me: mutable; aPresentableObject: PresentableObject from PrsMgr) |
170 | returns mutable Presentation from PrsMgr |
171 | ---Level: Internal |
172 | ---Purpose: Creates a new presentation in the presentation manager. |
173 | is redefined static private; |
174 | |
175 | fields |
176 | |
177 | myStructureManager : StructureManager from Graphic3d; |
178 | myStrList : ListOfTransient from TColStd; |
179 | |
180 | end PresentationManager3d from PrsMgr; |