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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
--
-- Package: Visual3d.cdl
-- Author: NW,JPB,CAL
-- Created: Lundi 7 Octobre 1991
-- Updated: Vendredi 2 Octobre 1992
-- Mercredi 31 mars 1993
-- 1/08/97 ; PCT : ajout texture mapping
-- 11-97: CAL; retrait de la dependance avec math.
-- 15/01/98 ; FMN : Suppression Hidden Line
-- 16-09-98 ; BGN : Ajout TypeOfTriedronEcho,
-- TypeOfTriedronPosition.
-- 22-09-98; BGN: S3989 (anciennement S3819): report
-- dans Aspect des TypeOfTriedron*
-- 14-01-00; GG : IMP140100 Add ViewManager pointer
-- 25-01-00; EUG: G003 Add backfacing model enum.
--
-- Copyright: MatraDatavision 1991,1992,1993
--
-- Purpose: Specifications definitives
--
--
-- Date: Mercredi 31 mars 1993
--
--
-- File: Visual3d.cdl
-- Created: Lundi 7 Octobre 1991
-- Author: NW,JPB,CAL
--
---Copyright: MatraDatavision 1991,1992,1993
--
package Visual3d
---Version:
---Purpose: This package contains the group of classes necessary
-- for the implementation of commands for the 3D visualiser.
-- Use of this package is reserved to the visualiser.
--
-- The visualiser manages the structures, the views, the
-- light sources, and object picking.
---Keywords: View, Light, Plane, Pick
---Warning:
---References:
uses
gp,
TCollection,
TColStd,
Quantity,
Aspect,
Graphic3d,
Image,
MMgt,
Xw,
WNT,
OSD
is
---------------------------
-- Category: The exceptions
---------------------------
exception ClipDefinitionError inherits OutOfRange;
---Category: The exceptions
exception ContextPickDefinitionError inherits OutOfRange;
---Category: The exceptions
exception DepthCueingDefinitionError inherits OutOfRange;
---Category: The exceptions
exception LightDefinitionError inherits OutOfRange;
---Category: The exceptions
exception PickError inherits OutOfRange;
---Category: The exceptions
exception TransformError inherits OutOfRange;
---Category: The exceptions
exception ViewDefinitionError inherits OutOfRange;
---Category: The exceptions
exception ViewManagerDefinitionError inherits OutOfRange;
---Category: The exceptions
exception ViewMappingDefinitionError inherits OutOfRange;
---Category: The exceptions
exception ViewOrientationDefinitionError inherits OutOfRange;
---Category: The exceptions
exception ZClippingDefinitionError inherits OutOfRange;
---Category: The exceptions
exception TransientDefinitionError inherits OutOfRange;
---Category: The exceptions
exception LayerDefinitionError inherits OutOfRange;
---Category: The exceptions
-----------------------------
-- Category: The enumerations
-----------------------------
enumeration TypeOfAnswer is TOA_YES,
TOA_NO,
TOA_COMPUTE
end TypeOfAnswer;
---Purpose: The answer of the method AcceptDisplay
-- AcceptDisplay means is it possible to display the
-- specified structure in the specified view ?
-- TOA_YES yes
-- TOA_NO no
-- TOA_COMPUTE yes but we have to compute the representation
enumeration TypeOfLightSource is TOLS_AMBIENT,
TOLS_DIRECTIONAL,
TOLS_POSITIONAL,
TOLS_SPOT
end TypeOfLightSource;
---Purpose: Definition of all the type of light sources
--
-- TOLS_AMBIENT ambient light
-- TOLS_DIRECTIONAL directional light
-- TOLS_POSITIONAL positional light
-- TOLS_SPOT spot light
enumeration TypeOfModel is TOM_NONE,
TOM_INTERP_COLOR,
TOM_FACET,
TOM_VERTEX
end TypeOfModel;
---Purpose: Definition of the rendering (colour shading) model
-- TOM_NONE No interpolation, constant shading
-- (FLAT Shading)
-- TOM_INTERP_COLOR Linear interpolation of color
-- (Gouraud Shading)
-- TOM_FACET Interpolation of color based on
-- dot products
-- (Quick Phong Shading)
-- TOM_VERTEX Interpolation of color based on
-- normals
-- (Phong Shading)
---Category: The enumerations
enumeration TypeOfOrder is TOO_TOPFIRST,
TOO_BOTTOMFIRST
end TypeOfOrder;
---Purpose: Definition of the order of selection
-- TOO_TOPFIRST the root structure first
-- TOO_BOTTOMFIRST the leaf structure first
-- Allows exploration of a PickPath in a PickDescriptor.
---Category: The enumerations
enumeration TypeOfProjection is TOP_PERSPECTIVE,
TOP_PARALLEL
end TypeOfProjection;
---Purpose: Definition of the type of 3D projection
--
-- TOP_PERSPECTIVE perspective projection (centre of
-- projection at a distance finite from
-- plane of projection)
-- TOP_PARALLEL parallel projection (point of
-- projection at infinity)
---Category: The enumerations
enumeration TypeOfVisualization is TOV_WIREFRAME,
TOV_SHADING
end TypeOfVisualization;
---Purpose: Modes of visualisation of objects in a view
--
-- TOV_WIREFRAME wireframe visualisation
-- TOV_SHADING shaded visualisation
---Category: The enumerations
enumeration TypeOfSurfaceDetail is TOD_NONE,
TOD_ENVIRONMENT,
TOD_ALL
end TypeOfSurfaceDetail;
---Purpose: Modes of visualisation of objects in a view
--
-- TOD_NONE no texture mapping
-- TOD_ENVIRONMENT only environnement mapping
-- TOD_ALL environnement + texture mapping
---Category: The enumerations
enumeration TypeOfBackfacingModel is
TOBM_AUTOMATIC, TOBM_FORCE, TOBM_DISABLE
end TypeOfBackfacingModel;
---Purpose : Modes of display of back faces in the view
--
-- TOBM_AUTOMATIC graphic's structure setting is in use
-- TOBM_FORCE force display of back faces
-- TOBM_DISABLE disable display of back faces
---Category : Enumerations
------------------------
-- Category: The classes
------------------------
class ClipPlane;
---Purpose: This class allows the creation and update of a
-- clipping plane in the space model.
---Category: The classes
class ContextPick;
---Purpose: This class allows the creation and update of a
-- pick context for one view of the viewer.
-- A context allows the control of different parameters
-- before the activation of a pick :
--
-- * pick aperture.
-- * the depth of pick, the number of sub-structures selected.
-- * the order of picking, the possibility to traverse
-- the pick structures starting from the roots or the leaves.
---Category: The classes
class ContextView;
---Purpose: This class manages the creation and update of a
-- visualisation context for one view in the viewer.
--
-- A context is defined by :
-- * Antialiasing.
-- * ZClipping.
-- * Depth-cueing.
-- * The type of visualisation.
-- * The light sources.
---Category: The classes
class Light;
---Purpose: This class defines and updates light sources.
-- There is no limit to the number of light sources defined.
-- Only the number of active sources is limited.
---Category: The classes
class PickDescriptor;
---Purpose: A PickDescriptor contains information on the picks.
-- It contains a certain number of PickPaths.
---Category: The classes
class PickPath;
---Purpose: A PickPath is a vector ( elem_num, pick_id, struct_id ).
-- It is one of the constituents of a PickDescriptor.
-- There are many Pickpaths in a PickDescriptor.
-- Each PickPath describes a structure or an sub-structure.
-- The pick-id is set by the SetPickId method from Group.
---Category: The classes
class View;
---Purpose: Creation and editing of a view in a 3D visualiser.
--
-- A 3D view is composed of an 'orientation' part defined
-- by the position of the observer, the viewing direction,
-- and a 'mapping' part defined by the type of projection
-- (parallel or perspective), and by the window-viewport
-- couple which allows passage from the projected coordinate
-- space into the screen space.
---Category: The classes
class ViewManager;
---Purpose: 3D Visualiser
---Category: The classes
class ViewMapping;
---Purpose: This class describes a projection and a system of
-- coordinates called NPC.(Normalized Projection Coordinates)
---Category: The classes
class ViewOrientation;
---Purpose: This class describes the manner in which the
-- observer looks at the visualised scene.
-- It defines a coordinates system called VRC
-- (View Reference Coordinates) with 3 axes U,V,N
---Category: The classes
class TransientManager;
---Purpose: 3D Transient Visualiser
---Category: The classes
class Layer;
---Purpose: 2D Layer
---Category: The classes
class LayerItem;
---Purpose: 2D Layer presentation unit
---Category: The classes
---------------------
-- Category: Pointers
---------------------
pointer ViewPtr to View from Visual3d;
---Category: Pointers
pointer ViewManagerPtr to ViewManager from Visual3d;
---Category: Pointers
---------------------------------
-- Category: Instantiated classes
---------------------------------
imported NListOfLayerItem;
class SequenceOfPickPath instantiates
Sequence from TCollection (PickPath from Visual3d);
---Category: Instantiated classes
class HSequenceOfPickPath instantiates
HSequence from TCollection
(PickPath from Visual3d, SequenceOfPickPath);
---Category: Instantiated classes
class SetOfClipPlane instantiates
Set from TCollection (ClipPlane from Visual3d);
---Category: Instantiated classes
class HSetOfClipPlane instantiates
HSet from TCollection
(ClipPlane from Visual3d, SetOfClipPlane);
---Category: Instantiated classes
class SetOfLight instantiates
Set from TCollection (Light from Visual3d);
---Category: Instantiated classes
class HSetOfLight instantiates
HSet from TCollection
(Light from Visual3d, SetOfLight);
---Category: Instantiated classes
class SetOfView instantiates
Set from TCollection (View from Visual3d);
---Category: Instantiated classes
class HSetOfView instantiates
HSet from TCollection
(View from Visual3d, SetOfView);
---Category: Instantiated classes
end Visual3d;
|