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, Plane, 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 -- clipping plane in the space model.
211 ---Category: The classes
214 ---Purpose: This class allows the creation and update of a
215 -- pick context for one view of the viewer.
216 -- A context allows the control of different parameters
217 -- before the activation of a pick :
220 -- * the depth of pick, the number of sub-structures selected.
221 -- * the order of picking, the possibility to traverse
222 -- the pick structures starting from the roots or the leaves.
223 ---Category: The classes
226 ---Purpose: This class manages the creation and update of a
227 -- visualisation context for one view in the viewer.
229 -- A context is defined by :
233 -- * The type of visualisation.
234 -- * The light sources.
235 ---Category: The classes
238 ---Purpose: This class defines and updates light sources.
239 -- There is no limit to the number of light sources defined.
240 -- Only the number of active sources is limited.
241 ---Category: The classes
243 class PickDescriptor;
244 ---Purpose: A PickDescriptor contains information on the picks.
245 -- It contains a certain number of PickPaths.
246 ---Category: The classes
249 ---Purpose: A PickPath is a vector ( elem_num, pick_id, struct_id ).
250 -- It is one of the constituents of a PickDescriptor.
251 -- There are many Pickpaths in a PickDescriptor.
252 -- Each PickPath describes a structure or an sub-structure.
253 -- The pick-id is set by the SetPickId method from Group.
254 ---Category: The classes
257 ---Purpose: Creation and editing of a view in a 3D visualiser.
259 -- A 3D view is composed of an 'orientation' part defined
260 -- by the position of the observer, the viewing direction,
261 -- and a 'mapping' part defined by the type of projection
262 -- (parallel or perspective), and by the window-viewport
263 -- couple which allows passage from the projected coordinate
264 -- space into the screen space.
265 ---Category: The classes
268 ---Purpose: 3D Visualiser
269 ---Category: The classes
272 ---Purpose: This class describes a projection and a system of
273 -- coordinates called NPC.(Normalized Projection Coordinates)
274 ---Category: The classes
276 class ViewOrientation;
277 ---Purpose: This class describes the manner in which the
278 -- observer looks at the visualised scene.
279 -- It defines a coordinates system called VRC
280 -- (View Reference Coordinates) with 3 axes U,V,N
281 ---Category: The classes
283 class TransientManager;
284 ---Purpose: 3D Transient Visualiser
285 ---Category: The classes
289 ---Category: The classes
292 ---Purpose: 2D Layer presentation unit
293 ---Category: The classes
295 ---------------------
296 -- Category: Pointers
297 ---------------------
299 pointer ViewPtr to View from Visual3d;
300 ---Category: Pointers
302 pointer ViewManagerPtr to ViewManager from Visual3d;
303 ---Category: Pointers
305 ---------------------------------
306 -- Category: Instantiated classes
307 ---------------------------------
309 imported NListOfLayerItem;
311 class SequenceOfPickPath instantiates
312 Sequence from TCollection (PickPath from Visual3d);
313 ---Category: Instantiated classes
315 class HSequenceOfPickPath instantiates
316 HSequence from TCollection
317 (PickPath from Visual3d, SequenceOfPickPath);
318 ---Category: Instantiated classes
320 class SetOfClipPlane instantiates
321 Set from TCollection (ClipPlane from Visual3d);
322 ---Category: Instantiated classes
324 class HSetOfClipPlane instantiates
325 HSet from TCollection
326 (ClipPlane from Visual3d, SetOfClipPlane);
327 ---Category: Instantiated classes
329 class SetOfLight instantiates
330 Set from TCollection (Light from Visual3d);
331 ---Category: Instantiated classes
333 class HSetOfLight instantiates
334 HSet from TCollection
335 (Light from Visual3d, SetOfLight);
336 ---Category: Instantiated classes
338 class SetOfView instantiates
339 Set from TCollection (View from Visual3d);
340 ---Category: Instantiated classes
342 class HSetOfView instantiates
343 HSet from TCollection
344 (View from Visual3d, SetOfView);
345 ---Category: Instantiated classes