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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
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
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.
38 -- The visualiser manages the structures, the views, the
39 -- light sources, and object picking.
41 ---Keywords: View, Light, Pick
61 ---------------------------
62 -- Category: The exceptions
63 ---------------------------
65 exception ClipDefinitionError inherits OutOfRange;
66 ---Category: The exceptions
68 exception ContextPickDefinitionError inherits OutOfRange;
69 ---Category: The exceptions
71 exception DepthCueingDefinitionError inherits OutOfRange;
72 ---Category: The exceptions
74 exception LightDefinitionError inherits OutOfRange;
75 ---Category: The exceptions
77 exception PickError inherits OutOfRange;
78 ---Category: The exceptions
80 exception TransformError inherits OutOfRange;
81 ---Category: The exceptions
83 exception ViewDefinitionError inherits OutOfRange;
84 ---Category: The exceptions
86 exception ViewManagerDefinitionError inherits OutOfRange;
87 ---Category: The exceptions
89 exception ViewMappingDefinitionError inherits OutOfRange;
90 ---Category: The exceptions
92 exception ViewOrientationDefinitionError inherits OutOfRange;
93 ---Category: The exceptions
95 exception ZClippingDefinitionError inherits OutOfRange;
96 ---Category: The exceptions
98 exception TransientDefinitionError inherits OutOfRange;
99 ---Category: The exceptions
101 exception LayerDefinitionError inherits OutOfRange;
102 ---Category: The exceptions
104 -----------------------------
105 -- Category: The enumerations
106 -----------------------------
108 enumeration TypeOfAnswer is TOA_YES,
112 ---Purpose: The answer of the method AcceptDisplay
113 -- AcceptDisplay means is it possible to display the
114 -- specified structure in the specified view ?
117 -- TOA_COMPUTE yes but we have to compute the representation
119 enumeration TypeOfLightSource is TOLS_AMBIENT,
123 end TypeOfLightSource;
124 ---Purpose: Definition of all the type of light sources
126 -- TOLS_AMBIENT ambient light
127 -- TOLS_DIRECTIONAL directional light
128 -- TOLS_POSITIONAL positional light
129 -- TOLS_SPOT spot light
131 enumeration TypeOfModel is TOM_NONE,
136 ---Purpose: Definition of the rendering (colour shading) model
137 -- TOM_NONE No interpolation, constant shading
139 -- TOM_INTERP_COLOR Linear interpolation of color
141 -- TOM_FACET Interpolation of color based on
143 -- (Quick Phong Shading)
144 -- TOM_VERTEX Interpolation of color based on
147 ---Category: The enumerations
149 enumeration TypeOfOrder is TOO_TOPFIRST,
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
158 enumeration TypeOfProjection is TOP_PERSPECTIVE,
160 end TypeOfProjection;
161 ---Purpose: Definition of the type of 3D projection
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
170 enumeration TypeOfVisualization is TOV_WIREFRAME,
172 end TypeOfVisualization;
173 ---Purpose: Modes of visualisation of objects in a view
175 -- TOV_WIREFRAME wireframe visualisation
176 -- TOV_SHADING shaded visualisation
177 ---Category: The enumerations
179 enumeration TypeOfSurfaceDetail is TOD_NONE,
182 end TypeOfSurfaceDetail;
183 ---Purpose: Modes of visualisation of objects in a view
185 -- TOD_NONE no texture mapping
186 -- TOD_ENVIRONMENT only environnement mapping
187 -- TOD_ALL environnement + texture mapping
188 ---Category: The enumerations
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
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
200 ------------------------
201 -- Category: The classes
202 ------------------------
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 :
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
217 ---Purpose: This class manages the creation and update of a
218 -- visualisation context for one view in the viewer.
220 -- A context is defined by :
224 -- * The type of visualisation.
225 -- * The light sources.
226 ---Category: The classes
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
234 class PickDescriptor;
235 ---Purpose: A PickDescriptor contains information on the picks.
236 -- It contains a certain number of PickPaths.
237 ---Category: The classes
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
248 ---Purpose: Creation and editing of a view in a 3D visualiser.
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
259 ---Purpose: 3D Visualiser
260 ---Category: The classes
262 class TransientManager;
263 ---Purpose: 3D Transient Visualiser
264 ---Category: The classes
268 ---Category: The classes
271 ---Purpose: 2D Layer presentation unit
272 ---Category: The classes
274 ---------------------
275 -- Category: Pointers
276 ---------------------
278 pointer ViewPtr to View from Visual3d;
279 ---Category: Pointers
281 pointer ViewManagerPtr to ViewManager from Visual3d;
282 ---Category: Pointers
284 ---------------------------------
285 -- Category: Instantiated classes
286 ---------------------------------
288 imported NListOfLayerItem;
290 class SequenceOfPickPath instantiates
291 Sequence from TCollection (PickPath from Visual3d);
292 ---Category: Instantiated classes
294 class HSequenceOfPickPath instantiates
295 HSequence from TCollection
296 (PickPath from Visual3d, SequenceOfPickPath);
297 ---Category: Instantiated classes
299 class SetOfLight instantiates
300 Set from TCollection (Light from Visual3d);
301 ---Category: Instantiated classes
303 class HSetOfLight instantiates
304 HSet from TCollection
305 (Light from Visual3d, SetOfLight);
306 ---Category: Instantiated classes
308 class SetOfView instantiates
309 Set from TCollection (View from Visual3d);
310 ---Category: Instantiated classes
312 class HSetOfView instantiates
313 HSet from TCollection
314 (View from Visual3d, SetOfView);
315 ---Category: Instantiated classes