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