0024001: Stereographic rendering support
[occt.git] / src / Visual3d / Visual3d.cdl
1 -- Created on: 1991-10-07
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 -- Package: Visual3d.cdl
18 -- Updated: Vendredi 2 Octobre 1992
19 --      Mercredi 31 mars 1993
20 --      1/08/97 ; PCT : ajout texture mapping
21 --      11-97: CAL; retrait de la dependance avec math.
22 --      15/01/98 ; FMN : Suppression Hidden Line 
23 --      16-09-98 ; BGN : Ajout TypeOfTriedronEcho, 
24 --                               TypeOfTriedronPosition.
25 --              22-09-98; BGN: S3989 (anciennement S3819): report
26 --                             dans Aspect des TypeOfTriedron*
27 --      14-01-00; GG : IMP140100 Add ViewManager pointer
28 -- Purpose: Specifications definitives
29
30 package Visual3d
31
32     ---Version:
33
34     ---Purpose: This package contains the group of classes necessary
35     --      for the implementation of commands for the 3D visualiser.
36     --      Use of this package is reserved to the visualiser.
37     --
38     --      The visualiser manages the structures, the views, the
39     --      light sources, and object picking.
40
41     ---Keywords: View, Light, Pick
42     ---Warning:
43     ---References:
44
45 uses
46
47     gp,
48     TCollection,
49     TColStd,
50     Quantity,
51     Aspect,
52     Graphic3d,
53     Image,
54     MMgt,
55     WNT,
56     OSD,
57     Font
58
59 is
60
61     ---------------------------
62     -- Category: The exceptions
63     ---------------------------
64
65     exception ClipDefinitionError inherits OutOfRange;
66     ---Category: The exceptions
67
68     exception ContextPickDefinitionError inherits OutOfRange;
69     ---Category: The exceptions
70
71     exception DepthCueingDefinitionError inherits OutOfRange;
72     ---Category: The exceptions
73
74     exception LightDefinitionError inherits OutOfRange;
75     ---Category: The exceptions
76
77     exception PickError inherits OutOfRange;
78     ---Category: The exceptions
79
80     exception TransformError inherits OutOfRange;
81     ---Category: The exceptions
82
83     exception ViewDefinitionError inherits OutOfRange;
84     ---Category: The exceptions
85
86     exception ViewManagerDefinitionError inherits OutOfRange;
87     ---Category: The exceptions
88
89     exception ViewMappingDefinitionError inherits OutOfRange;
90     ---Category: The exceptions
91
92     exception ViewOrientationDefinitionError inherits OutOfRange;
93     ---Category: The exceptions
94
95     exception ZClippingDefinitionError inherits OutOfRange;
96     ---Category: The exceptions
97
98     exception TransientDefinitionError inherits OutOfRange;
99     ---Category: The exceptions
100
101     exception LayerDefinitionError inherits OutOfRange;
102     ---Category: The exceptions
103
104     -----------------------------
105     -- Category: The enumerations
106     -----------------------------
107
108     enumeration TypeOfAnswer is TOA_YES,
109                     TOA_NO,
110                     TOA_COMPUTE
111     end TypeOfAnswer;
112     ---Purpose: The answer of the method AcceptDisplay
113     --      AcceptDisplay  means is it possible to display the
114     --             specified structure in the specified view ?
115     --      TOA_YES yes
116     --      TOA_NO  no
117     --      TOA_COMPUTE yes but we have to compute the representation
118
119     enumeration TypeOfLightSource is    TOLS_AMBIENT,
120                         TOLS_DIRECTIONAL,
121                         TOLS_POSITIONAL,
122                         TOLS_SPOT
123     end TypeOfLightSource;
124     ---Purpose: Definition of all the type of light sources
125     --
126     --      TOLS_AMBIENT    ambient light
127     --      TOLS_DIRECTIONAL    directional light
128     --      TOLS_POSITIONAL positional light
129     --      TOLS_SPOT       spot light
130
131     enumeration TypeOfModel is  TOM_NONE,
132                     TOM_INTERP_COLOR,
133                     TOM_FACET,
134                     TOM_VERTEX
135     end TypeOfModel;
136     ---Purpose: Definition of the rendering (colour shading) model
137     --  TOM_NONE        No interpolation, constant shading
138     --              (FLAT Shading)
139     --  TOM_INTERP_COLOR    Linear interpolation of color
140     --              (Gouraud Shading)
141     --  TOM_FACET       Interpolation of color based on
142     --              dot products
143     --              (Quick Phong Shading)
144     --  TOM_VERTEX      Interpolation of color based on
145     --              normals
146     --              (Phong Shading)
147     ---Category: The enumerations
148
149     enumeration TypeOfOrder is  TOO_TOPFIRST,
150                     TOO_BOTTOMFIRST
151     end TypeOfOrder;
152     ---Purpose: Definition of the order of selection
153     --      TOO_TOPFIRST    the root structure first
154     --      TOO_BOTTOMFIRST the leaf structure first
155     --      Allows exploration of a PickPath in a PickDescriptor.
156     ---Category: The enumerations
157
158     enumeration TypeOfProjection is TOP_PERSPECTIVE,
159                     TOP_PARALLEL
160     end TypeOfProjection;
161     ---Purpose: Definition of the type of 3D projection
162     --
163     --      TOP_PERSPECTIVE perspective projection (centre of
164     --              projection at a  distance finite from
165     --              plane of projection)
166     --      TOP_PARALLEL    parallel projection (point of
167     --              projection at infinity)
168     ---Category: The enumerations
169
170     enumeration TypeOfVisualization is  TOV_WIREFRAME,
171                         TOV_SHADING
172     end TypeOfVisualization;
173     ---Purpose: Modes of visualisation of objects in a view
174     --
175     --      TOV_WIREFRAME   wireframe visualisation
176     --      TOV_SHADING     shaded visualisation
177     ---Category: The enumerations
178
179     enumeration TypeOfSurfaceDetail is  TOD_NONE, 
180                         TOD_ENVIRONMENT, 
181                         TOD_ALL
182     end TypeOfSurfaceDetail;
183     ---Purpose: Modes of visualisation of objects in a view
184     --
185     --      TOD_NONE        no texture mapping
186     --      TOD_ENVIRONMENT only environnement mapping
187     --      TOD_ALL     environnement + texture mapping
188     ---Category: The enumerations
189
190         enumeration TypeOfBackfacingModel is
191                 TOBM_AUTOMATIC, TOBM_FORCE, TOBM_DISABLE
192         end TypeOfBackfacingModel;
193         ---Purpose  : Modes of display of back faces in the view
194         --
195         --            TOBM_AUTOMATIC graphic's structure setting is in use
196         --            TOBM_FORCE     force display of back faces
197         --            TOBM_DISABLE   disable display of back faces
198         ---Category : Enumerations
199
200     ------------------------
201     -- Category: The classes
202     ------------------------
203
204     class ContextPick;
205     ---Purpose: This class allows the creation and update of a
206     --      pick context for one view of the viewer.
207     --      A context allows the control of different parameters
208     --      before the activation of a pick :
209     --
210     --      * pick aperture.
211     --      * the depth of pick, the number of sub-structures selected.
212     --      * the order of picking, the possibility to traverse
213     --        the pick structures starting from the roots or the leaves.
214     ---Category: The classes
215
216     class ContextView;
217     ---Purpose: This class manages the creation and update of a
218     --      visualisation context for one view in the viewer.
219     --
220     --      A context is defined by :
221     --      * Antialiasing.
222     --      * ZClipping.
223     --      * Depth-cueing.
224     --      * The type of visualisation.
225     --      * The light sources.
226     ---Category: The classes
227
228     class Light;
229     ---Purpose: This class defines and updates light sources.
230     --      There is no limit to the number of light sources defined.
231     --      Only the number of active sources is limited.
232     ---Category: The classes
233
234     class PickDescriptor;
235     ---Purpose: A PickDescriptor contains information on the picks.
236     --      It contains a certain number of PickPaths.
237     ---Category: The classes
238
239     class PickPath;
240     ---Purpose: A PickPath is a vector ( elem_num, pick_id, struct_id ).
241     --      It is one of the constituents of a PickDescriptor.
242     --      There are many Pickpaths in a PickDescriptor.
243     --      Each PickPath describes a structure or an sub-structure.
244     --      The pick-id is set by the SetPickId method from Group.
245     ---Category: The classes
246
247     class View;
248     ---Purpose: Creation and editing of a view in a 3D visualiser.
249     --
250     --      A 3D view is composed of an 'orientation' part defined
251     --      by the position of the observer, the viewing direction,
252     --      and a 'mapping' part defined by the type of projection
253     --      (parallel or perspective), and by the window-viewport
254     --      couple which allows passage from the projected coordinate
255     --      space into the screen space.
256     ---Category: The classes
257
258     class ViewManager;
259     ---Purpose: 3D Visualiser
260     ---Category: The classes
261
262     class TransientManager;
263     ---Purpose: 3D Transient Visualiser
264     ---Category: The classes
265
266     class Layer;
267     ---Purpose: 2D Layer
268     ---Category: The classes
269
270         class LayerItem;
271     ---Purpose: 2D Layer presentation unit
272     ---Category: The classes
273
274         ---------------------
275         -- Category: Pointers
276         ---------------------
277
278         pointer ViewPtr to View from Visual3d;
279         ---Category: Pointers
280
281         pointer ViewManagerPtr to ViewManager from Visual3d;
282         ---Category: Pointers
283
284     ---------------------------------
285     -- Category: Instantiated classes
286     ---------------------------------
287
288         imported NListOfLayerItem;
289     
290     class SequenceOfPickPath instantiates
291             Sequence from TCollection (PickPath from Visual3d);
292     ---Category: Instantiated classes
293
294     class HSequenceOfPickPath instantiates
295             HSequence from TCollection
296             (PickPath from Visual3d, SequenceOfPickPath);
297     ---Category: Instantiated classes
298
299     class SetOfLight instantiates
300             Set from TCollection (Light from Visual3d);
301     ---Category: Instantiated classes
302
303     class HSetOfLight instantiates
304             HSet from TCollection
305             (Light from Visual3d, SetOfLight);
306     ---Category: Instantiated classes
307
308     class SetOfView instantiates
309             Set from TCollection (View from Visual3d);
310     ---Category: Instantiated classes
311
312     class HSetOfView instantiates
313             HSet from TCollection
314             (View from Visual3d, SetOfView);
315     ---Category: Instantiated classes
316
317 end Visual3d;