1 -- Created on: 1991-10-07
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
21 -- Package: Visual3d.cdl
22 -- Updated: Vendredi 2 Octobre 1992
23 -- Mercredi 31 mars 1993
24 -- 1/08/97 ; PCT : ajout texture mapping
25 -- 11-97: CAL; retrait de la dependance avec math.
26 -- 15/01/98 ; FMN : Suppression Hidden Line
27 -- 16-09-98 ; BGN : Ajout TypeOfTriedronEcho,
28 -- TypeOfTriedronPosition.
29 -- 22-09-98; BGN: S3989 (anciennement S3819): report
30 -- dans Aspect des TypeOfTriedron*
31 -- 14-01-00; GG : IMP140100 Add ViewManager pointer
32 -- Purpose: Specifications definitives
38 ---Purpose: This package contains the group of classes necessary
39 -- for the implementation of commands for the 3D visualiser.
40 -- Use of this package is reserved to the visualiser.
42 -- The visualiser manages the structures, the views, the
43 -- light sources, and object picking.
45 ---Keywords: View, Light, Pick
65 ---------------------------
66 -- Category: The exceptions
67 ---------------------------
69 exception ClipDefinitionError inherits OutOfRange;
70 ---Category: The exceptions
72 exception ContextPickDefinitionError inherits OutOfRange;
73 ---Category: The exceptions
75 exception DepthCueingDefinitionError inherits OutOfRange;
76 ---Category: The exceptions
78 exception LightDefinitionError inherits OutOfRange;
79 ---Category: The exceptions
81 exception PickError inherits OutOfRange;
82 ---Category: The exceptions
84 exception TransformError inherits OutOfRange;
85 ---Category: The exceptions
87 exception ViewDefinitionError inherits OutOfRange;
88 ---Category: The exceptions
90 exception ViewManagerDefinitionError inherits OutOfRange;
91 ---Category: The exceptions
93 exception ViewMappingDefinitionError inherits OutOfRange;
94 ---Category: The exceptions
96 exception ViewOrientationDefinitionError inherits OutOfRange;
97 ---Category: The exceptions
99 exception ZClippingDefinitionError inherits OutOfRange;
100 ---Category: The exceptions
102 exception TransientDefinitionError inherits OutOfRange;
103 ---Category: The exceptions
105 exception LayerDefinitionError inherits OutOfRange;
106 ---Category: The exceptions
108 -----------------------------
109 -- Category: The enumerations
110 -----------------------------
112 enumeration TypeOfAnswer is TOA_YES,
116 ---Purpose: The answer of the method AcceptDisplay
117 -- AcceptDisplay means is it possible to display the
118 -- specified structure in the specified view ?
121 -- TOA_COMPUTE yes but we have to compute the representation
123 enumeration TypeOfLightSource is TOLS_AMBIENT,
127 end TypeOfLightSource;
128 ---Purpose: Definition of all the type of light sources
130 -- TOLS_AMBIENT ambient light
131 -- TOLS_DIRECTIONAL directional light
132 -- TOLS_POSITIONAL positional light
133 -- TOLS_SPOT spot light
135 enumeration TypeOfModel is TOM_NONE,
140 ---Purpose: Definition of the rendering (colour shading) model
141 -- TOM_NONE No interpolation, constant shading
143 -- TOM_INTERP_COLOR Linear interpolation of color
145 -- TOM_FACET Interpolation of color based on
147 -- (Quick Phong Shading)
148 -- TOM_VERTEX Interpolation of color based on
151 ---Category: The enumerations
153 enumeration TypeOfOrder is TOO_TOPFIRST,
156 ---Purpose: Definition of the order of selection
157 -- TOO_TOPFIRST the root structure first
158 -- TOO_BOTTOMFIRST the leaf structure first
159 -- Allows exploration of a PickPath in a PickDescriptor.
160 ---Category: The enumerations
162 enumeration TypeOfProjection is TOP_PERSPECTIVE,
164 end TypeOfProjection;
165 ---Purpose: Definition of the type of 3D projection
167 -- TOP_PERSPECTIVE perspective projection (centre of
168 -- projection at a distance finite from
169 -- plane of projection)
170 -- TOP_PARALLEL parallel projection (point of
171 -- projection at infinity)
172 ---Category: The enumerations
174 enumeration TypeOfVisualization is TOV_WIREFRAME,
176 end TypeOfVisualization;
177 ---Purpose: Modes of visualisation of objects in a view
179 -- TOV_WIREFRAME wireframe visualisation
180 -- TOV_SHADING shaded visualisation
181 ---Category: The enumerations
183 enumeration TypeOfSurfaceDetail is TOD_NONE,
186 end TypeOfSurfaceDetail;
187 ---Purpose: Modes of visualisation of objects in a view
189 -- TOD_NONE no texture mapping
190 -- TOD_ENVIRONMENT only environnement mapping
191 -- TOD_ALL environnement + texture mapping
192 ---Category: The enumerations
194 enumeration TypeOfBackfacingModel is
195 TOBM_AUTOMATIC, TOBM_FORCE, TOBM_DISABLE
196 end TypeOfBackfacingModel;
197 ---Purpose : Modes of display of back faces in the view
199 -- TOBM_AUTOMATIC graphic's structure setting is in use
200 -- TOBM_FORCE force display of back faces
201 -- TOBM_DISABLE disable display of back faces
202 ---Category : Enumerations
204 ------------------------
205 -- Category: The classes
206 ------------------------
209 ---Purpose: This class allows the creation and update of a
210 -- pick context for one view of the viewer.
211 -- A context allows the control of different parameters
212 -- before the activation of a pick :
215 -- * the depth of pick, the number of sub-structures selected.
216 -- * the order of picking, the possibility to traverse
217 -- the pick structures starting from the roots or the leaves.
218 ---Category: The classes
221 ---Purpose: This class manages the creation and update of a
222 -- visualisation context for one view in the viewer.
224 -- A context is defined by :
228 -- * The type of visualisation.
229 -- * The light sources.
230 ---Category: The classes
233 ---Purpose: This class defines and updates light sources.
234 -- There is no limit to the number of light sources defined.
235 -- Only the number of active sources is limited.
236 ---Category: The classes
238 class PickDescriptor;
239 ---Purpose: A PickDescriptor contains information on the picks.
240 -- It contains a certain number of PickPaths.
241 ---Category: The classes
244 ---Purpose: A PickPath is a vector ( elem_num, pick_id, struct_id ).
245 -- It is one of the constituents of a PickDescriptor.
246 -- There are many Pickpaths in a PickDescriptor.
247 -- Each PickPath describes a structure or an sub-structure.
248 -- The pick-id is set by the SetPickId method from Group.
249 ---Category: The classes
252 ---Purpose: Creation and editing of a view in a 3D visualiser.
254 -- A 3D view is composed of an 'orientation' part defined
255 -- by the position of the observer, the viewing direction,
256 -- and a 'mapping' part defined by the type of projection
257 -- (parallel or perspective), and by the window-viewport
258 -- couple which allows passage from the projected coordinate
259 -- space into the screen space.
260 ---Category: The classes
263 ---Purpose: 3D Visualiser
264 ---Category: The classes
267 ---Purpose: This class describes a projection and a system of
268 -- coordinates called NPC.(Normalized Projection Coordinates)
269 ---Category: The classes
271 class ViewOrientation;
272 ---Purpose: This class describes the manner in which the
273 -- observer looks at the visualised scene.
274 -- It defines a coordinates system called VRC
275 -- (View Reference Coordinates) with 3 axes U,V,N
276 ---Category: The classes
278 class TransientManager;
279 ---Purpose: 3D Transient Visualiser
280 ---Category: The classes
284 ---Category: The classes
287 ---Purpose: 2D Layer presentation unit
288 ---Category: The classes
290 ---------------------
291 -- Category: Pointers
292 ---------------------
294 pointer ViewPtr to View from Visual3d;
295 ---Category: Pointers
297 pointer ViewManagerPtr to ViewManager from Visual3d;
298 ---Category: Pointers
300 ---------------------------------
301 -- Category: Instantiated classes
302 ---------------------------------
304 imported NListOfLayerItem;
306 class SequenceOfPickPath instantiates
307 Sequence from TCollection (PickPath from Visual3d);
308 ---Category: Instantiated classes
310 class HSequenceOfPickPath instantiates
311 HSequence from TCollection
312 (PickPath from Visual3d, SequenceOfPickPath);
313 ---Category: Instantiated classes
315 class SetOfLight instantiates
316 Set from TCollection (Light from Visual3d);
317 ---Category: Instantiated classes
319 class HSetOfLight instantiates
320 HSet from TCollection
321 (Light from Visual3d, SetOfLight);
322 ---Category: Instantiated classes
324 class SetOfView instantiates
325 Set from TCollection (View from Visual3d);
326 ---Category: Instantiated classes
328 class HSetOfView instantiates
329 HSet from TCollection
330 (View from Visual3d, SetOfView);
331 ---Category: Instantiated classes